Skip to content

Commit

Permalink
Remove proc name from proc details
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeroji committed Mar 19, 2019
1 parent 483e412 commit 63a1042
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function parseSymbols(lines:string[]): DocumentSymbol[] {
let symbol: DocumentSymbol = null;
const singleLineSymbols: SymbolKind[] = [SymbolKind.Variable];

let procMatcher = /(proc\s+)(((?:::)?(?:\w+::)*\w+)\s+(?:\w+|\{\s*(?:\w+|\{\s*\w+\s+[^}]+\s*\})?(?:\s+\w+|\s+\{\s*\w+\s+[^}]+\s*\})*\s*\}))/;
let procMatcher = /(proc\s+)(((?:::)?(?:\w+::)*\w+)\s+(\w+|\{\s*(?:\w+|\{\s*\w+\s+[^}]+\s*\})?(?:\s+\w+|\s+\{\s*\w+\s+[^}]+\s*\})*\s*\}))/;
let namespaceMatcher = /(namespace\s+eval\s+)(((?:::)?(?:\w+::)*\w+))/;
let variableMatcher = /(variable\s+)(((?:::)?(?:\w+::)*\w+)\s+((?!")[^\s;]+|"(?:\\ [\\"]|[^\\"])*"))(?=\s*;|\s*$)/;

Expand Down Expand Up @@ -158,7 +158,7 @@ function parseSymbols(lines:string[]): DocumentSymbol[] {
// [4] details
if (match = procMatcher.exec(line)) {
symbol = new DocumentSymbol();
symbol.detail = match[2];
symbol.detail = match[4];
symbol.kind = SymbolKind.Function;
} else if (match = namespaceMatcher.exec(line)) {
symbol = new DocumentSymbol();
Expand Down

0 comments on commit 63a1042

Please sign in to comment.