From e8cfb9ced079a43da0badf04e874926c248966e0 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 17 Apr 2018 17:13:22 -0700 Subject: [PATCH] Remove incorrect return statement This prevented conflicts between some tokens from being recorded properly. In the case of JavaScript, it prevented tree-sitter from recognizing the conflict between the forward slash operator and the regex token, allowing regexes to be merged into parse states containing '/' incorrectly. Refs tree-sitter/tree-sitter-javascript#71 --- src/compiler/build_tables/lex_table_builder.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/compiler/build_tables/lex_table_builder.cc b/src/compiler/build_tables/lex_table_builder.cc index 066ddf1c..e0cab5e2 100644 --- a/src/compiler/build_tables/lex_table_builder.cc +++ b/src/compiler/build_tables/lex_table_builder.cc @@ -310,7 +310,6 @@ class LexTableBuilderImpl : public LexTableBuilder { } else { record_conflict(accept_action.symbol, advance_symbol, MatchesLongerString); } - return; } }