From 43d7995fe8cdf05c170dc7c4e0dd68a0228d5cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Presteg=C3=A5rdshus?= Date: Mon, 5 Mar 2018 11:04:15 +0100 Subject: [PATCH] added matching of functions with return value to docSymbolProvider --- package.json | 2 +- src/providers/DocumentSymbolProvider.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index eb667fe..69ec6af 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/providers/DocumentSymbolProvider.ts b/src/providers/DocumentSymbolProvider.ts index c08cbef..e750e6e 100644 --- a/src/providers/DocumentSymbolProvider.ts +++ b/src/providers/DocumentSymbolProvider.ts @@ -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 { return new Promise((resolve, reject) => {