Skip to content

Commit 15d01ea

Browse files
committed
skip strings when looking for parens
1 parent 0f67a6f commit 15d01ea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/parser/lexer.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ struct Lexer {
136136
if (peekLParen() || peekRParen()) {
137137
return true;
138138
}
139+
// Do not count the parentheses in strings.
140+
if (takeString()) {
141+
continue;
142+
}
139143
if (!curr) {
140144
++index;
141145
}

0 commit comments

Comments
 (0)