Skip to content

Commit

Permalink
supprot added for highlighting of DPI imports
Browse files Browse the repository at this point in the history
  • Loading branch information
joecrop committed Mar 10, 2022
1 parent eac360e commit f6ab4f6
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion syntaxes/systemverilog.tmLanguage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ patterns:
- include: '#storage-scope'
- include: '#attributes'
- include: '#imports'
- include: '#imports-dpi-function'
- include: '#operators'
- include: '#constants'
- include: '#identifiers'
Expand All @@ -44,7 +45,7 @@ repository:
name: storage.type.function.systemverilog
'3':
name: storage.modifier.systemverilog
end: ;
end: (;)
endCaptures:
'0':
name: punctuation.definition.function.end.systemverilog
Expand Down Expand Up @@ -759,6 +760,45 @@ repository:
- include: '#operators'
- include: '#identifiers'
name: meta.import.systemverilog
imports-dpi-function:
begin: '[ \t\r\n]*\b(import|export)[ \t\r\n]+(\"[a-zA-Z_][a-zA-Z0-9_$]*\")[ \t\r\n]+(function)\b'
beginCaptures:
'1':
name: keyword.control.systemverilog
'2':
name: string.quoted.double.systemverilog
'3':
name: storage.type.function.systemverilog
end: '(;)'
endCaptures:
'1':
name: punctuation.module.instantiation.end.systemverilog
patterns:
- match: >-
[ \t\r\n]*(?:\b([a-zA-Z_][a-zA-Z0-9_$]*)(::))?([a-zA-Z_][a-zA-Z0-9_$]*\b[ \t\r\n]+)?(?:\b(signed|unsigned)\b[ \t\r\n]*)?(?:(\[[a-zA-Z0-9_:$\.\-\+\*/%`' \t\r\n\[\]\(\)]*\])[ \t\r\n]*)?(?:\b([a-zA-Z_][a-zA-Z0-9_$]*)\b[ \t\r\n]*)(?=\(|;)
captures:
'1':
name: support.type.scope.systemverilog
'2':
name: keyword.operator.scope.systemverilog
'3':
patterns:
- include: '#built-ins'
- match: '[a-zA-Z_][a-zA-Z0-9_$]*'
name: storage.type.user-defined.systemverilog
'4':
patterns:
- include: '#modifiers'
'5':
patterns:
- include: '#selects'
'6':
name: entity.name.function.systemverilog
- include: '#keywords'
- include: '#port-net-parameter'
- include: '#base-grammar'
- include: '#identifiers'
name: meta.import-dpi.systemverilog
tables:
begin: '[ \t\r\n]*\b(table)\b'
beginCaptures:
Expand Down

0 comments on commit f6ab4f6

Please sign in to comment.