Skip to content

Commit 80456f6

Browse files
committed
Remove error recovery handling in scanner.h causing parser to get stuck | fix #134
1 parent 9308e58 commit 80456f6

File tree

9 files changed

+8961
-8777
lines changed

9 files changed

+8961
-8777
lines changed

common/scanner.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,6 @@ static inline bool is_bracket_end(TSLexer *lexer) {
132132

133133
static bool scan(Scanner *scanner, TSLexer *lexer, const bool *valid_symbols) {
134134
if (valid_symbols[ERROR_SENTINEL]) {
135-
if (scanner->indents.size > 1) {
136-
array_pop(&scanner->indents);
137-
lexer->result_symbol = DEDENT;
138-
return true;
139-
}
140-
141-
if (scanner->preprocessor_indents.size > 0) {
142-
array_pop(&scanner->preprocessor_indents);
143-
lexer->result_symbol = PREPROC_END;
144-
return true;
145-
}
146-
147135
return false;
148136
}
149137

fsharp/src/grammar.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8671,5 +8671,6 @@
86718671
"_type",
86728672
"_type_defn_body",
86738673
"_static_parameter"
8674-
]
8675-
}
8674+
],
8675+
"reserved": {}
8676+
}

fsharp/src/node-types.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4405,7 +4405,8 @@
44054405
},
44064406
{
44074407
"type": "line_comment",
4408-
"named": true
4408+
"named": true,
4409+
"extra": true
44094410
},
44104411
{
44114412
"type": "match",

fsharp/src/parser.c

Lines changed: 5555 additions & 5438 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)