@@ -52,6 +52,7 @@ export class Symbol {
52
52
static isContainer ( type : string ) : boolean {
53
53
switch ( type ) {
54
54
case 'constant' :
55
+ case 'parameter' :
55
56
case 'event' :
56
57
case 'net' :
57
58
case 'port' :
@@ -84,6 +85,8 @@ export class Symbol {
84
85
switch ( name ) {
85
86
case 'constant' :
86
87
return vscode . SymbolKind . Constant ;
88
+ case 'parameter' :
89
+ return vscode . SymbolKind . Constant ;
87
90
case 'event' :
88
91
return vscode . SymbolKind . Event ;
89
92
case 'function' :
@@ -165,7 +168,7 @@ export class Ctags {
165
168
vscode . workspace . getConfiguration ( ) . get ( 'verilog.ctags.path' , 'none' )
166
169
) ;
167
170
if ( binPath !== 'none' ) {
168
- let command : string = binPath + ' -f - --fields=+K --sort=no --excmd=n "' + filepath + '"' ;
171
+ let command : string = binPath + ' -f - --fields=+K --sort=no --excmd=n --fields-SystemVerilog=+{parameter} "' + filepath + '"' ;
169
172
this . logger . info ( 'Executing Command: ' + command ) ;
170
173
return new Promise ( ( resolve , _reject ) => {
171
174
child_process . exec ( command , ( _error : Error , stdout : string , _stderr : string ) => {
@@ -185,7 +188,11 @@ export class Ctags {
185
188
name = parts [ 0 ] ;
186
189
// pattern = parts[2];
187
190
type = parts [ 3 ] ;
188
- if ( parts . length == 5 ) {
191
+ // override "type" for parameters (See #102)
192
+ if ( parts . length == 6 && parts [ 5 ] === 'parameter:' ) {
193
+ type = 'parameter' ;
194
+ }
195
+ if ( parts . length >= 5 ) {
189
196
scope = parts [ 4 ] . split ( ':' ) ;
190
197
parentType = scope [ 0 ] ;
191
198
parentScope = scope [ 1 ] ;
0 commit comments