Skip to content

Commit

Permalink
fix vs code syntax - 2 String
Browse files Browse the repository at this point in the history
  • Loading branch information
issacto committed Jul 31, 2023
1 parent fa1a3a6 commit 4f8f5e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vs code extension/server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
//TODO: Make regex exclude keywords inside quotes.
//TODO: Make regex' more efficient. Somewhat slow on large files.
const delimiters =
[[/(?<!^[0-9]{6}\* *)(?=([^']*'[^']*')*[^']*$)BEFORE(-| )EACH/, /(?<!^[0-9]{6}\* *)(?=([^']*'[^']*')*[^']*$)END-BEFORE/],
[/(?<!^[0-9]{6}\* *)(?=([^']*'[^']*')*[^']*$)(?<!END-)MOCK/, /(?<!^[0-9]{6}\* *)(?=([^']*'[^']*')*[^']*$)END-MOCK/],
[/(?<!^[0-9]{6}\* *)(?=([^']*'[^']*')*[^']*$)AFTER(-| )EACH/, /(?<!^[0-9]{6}\* *)(?=([^']*'[^']*')*[^']*$)END-AFTER/]];
[[/(?<!^[0-9]{6}\* *)(?=([^']*'[^']*')*[^']*$)(?=([^"]*"[^"]*")*[^"]*$)BEFORE(-| )EACH/, /(?<!^[0-9]{6}\* *)(?=([^']*'[^']*')*[^']*$)(?=([^"]*"[^"]*")*[^"]*$)END-BEFORE/],
[/(?<!^[0-9]{6}\* *)(?=([^']*'[^']*')*[^']*$)(?=([^"]*"[^"]*")*[^"]*$)(?<!END-)MOCK/, /(?<!^[0-9]{6}\* *)(?=([^']*'[^']*')*[^']*$)(?=([^"]*"[^"]*")*[^"]*$)END-MOCK/],
[/(?<!^[0-9]{6}\* *)(?=([^']*'[^']*')*[^']*$)(?=([^"]*"[^"]*")*[^"]*$)AFTER(-| )EACH/, /(?<!^[0-9]{6}\* *)(?=([^']*'[^']*')*[^']*$)(?=([^"]*"[^"]*")*[^"]*$)END-AFTER/]];

const delimitererrors = [];
let error;
Expand Down

0 comments on commit 4f8f5e6

Please sign in to comment.