File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,8 @@ static bool scan_ternary_qmark(TSLexer *lexer) {
169
169
advance (lexer );
170
170
171
171
if (lexer -> lookahead == '?' ) return false;
172
+ /* Optional chaining. */
173
+ if (lexer -> lookahead == '.' ) return false;
172
174
173
175
/* TypeScript optional arguments contain the ?: sequence, possibly
174
176
with whitespace. */
@@ -177,6 +179,8 @@ static bool scan_ternary_qmark(TSLexer *lexer) {
177
179
skip (lexer );
178
180
}
179
181
if (lexer -> lookahead == ':' ) return false;
182
+ if (lexer -> lookahead == ')' ) return false;
183
+ if (lexer -> lookahead == ',' ) return false;
180
184
181
185
lexer -> mark_end (lexer );
182
186
lexer -> result_symbol = TERNARY_QMARK ;
Original file line number Diff line number Diff line change 1
1
examples/redux/src/types/store.ts
2
2
examples/vscode/src/vs/platform/native/electron-main/nativeHostMainService.ts
3
- examples/vscode/src/vs/workbench/api/common/extHost.api.impl.ts
4
3
examples/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts
You can’t perform that action at this time.
0 commit comments