Skip to content

Commit 18cba79

Browse files
committed
Simplifying R comment/string regex in Lexer
Signed-off-by: Elijah Cúchulainn Reid <[email protected]>
1 parent adc239c commit 18cba79

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

server/src/sas/Lexer.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -439,11 +439,7 @@ export class Lexer {
439439
).exec(lineContent.substring(pos));
440440
if (match) {
441441
const matchedText = match[0];
442-
if (
443-
matchedText.startsWith("'") ||
444-
matchedText.startsWith('"') ||
445-
matchedText.startsWith("#")
446-
) {
442+
if (/^('|"|#)/.test(matchedText)) {
447443
// do nothing to skip string and single line comment
448444
} else {
449445
token = this._foundEmbeddedCodeToken(this.curr, {

0 commit comments

Comments
 (0)