Skip to content

Commit

Permalink
added matching of functions with return value to docSymbolProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikpre committed Mar 5, 2018
1 parent 7e959c8 commit 43d7995
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "systemverilog",
"displayName": "SystemVerilog - Language Support",
"description": "Language support for Verilog / SystemVerilog",
"version": "0.2.12",
"version": "0.2.13",
"publisher": "eirikpre",
"author": {
"name": "Eirik Prestegårdshus",
Expand Down
2 changes: 1 addition & 1 deletion src/providers/DocumentSymbolProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class SystemVerilogDocumentSymbolProvider implements DocumentSymbolProvid
// XXX: Does not match virtual interface instantiantion, eg virtual intf u_virtInterface;
// XXX: Does not match input/output/inout ports, eg input logic din, ..
// TODO: Match labels with SymbolKind.Enum
public regex: RegExp = new RegExp('^\\s*(?!return|begin|end|else|join|fork|for|if)(?:(?:virtual|static|automatic)\\s+)?([:\\w]+)(?:\\s+(?:virtual|static|automatic))?(?:\\s+|\\s*#\\s*\\([\\s\\S]*?\\)\\s*)(?:\\[.*?\\]\\s*)?(?!for|if|return)(\\w+(?:\\s*,\\s*\\w+)*?)\\s*(?:\\([\\s\\S]*?\\)|extends\\s*\\w+)?\\s*;','mg');
public regex: RegExp = new RegExp('^\\s*(?!return|begin|end|else|join|fork|for|if)(?:(?:virtual|static|automatic)\\s+)?([:\\w]+)(?:\\s+(?:virtual|static|automatic))?(?:\\s+|\\s*#\\s*\\([\\s\\S]*?\\)\\s*|\\s+\\w+\\s+)(?:\\[.*?\\]\\s*)?(?!for|if|return)(\\w+(?:\\s*,\\s*\\w+)*?)\\s*(?:\\([\\s\\S]*?\\)|extends\\s*\\w+)?\\s*;','mg');

public provideDocumentSymbols(document: TextDocument, token?: CancellationToken): Thenable<SymbolInformation[]> {
return new Promise((resolve, reject) => {
Expand Down

0 comments on commit 43d7995

Please sign in to comment.