From 844f73c193186a6dc49f1bd3b0088b8b36a38e42 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Mon, 26 May 2014 21:48:35 -0700 Subject: [PATCH] Remove unnecessary comment rule from JS grammar --- examples/grammars/javascript.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/examples/grammars/javascript.cc b/examples/grammars/javascript.cc index f396780d..b04e42d3 100644 --- a/examples/grammars/javascript.cc +++ b/examples/grammars/javascript.cc @@ -65,11 +65,9 @@ namespace tree_sitter_examples { sym("_terminator") }) }, { "var_declaration", seq({ keyword("var"), - comma_sep(seq({ - optional(sym("comment")), - choice({ - sym("assignment"), - sym("identifier") }) })), + comma_sep(err(choice({ + sym("assignment"), + sym("identifier") }))), sym("_terminator") }) }, { "expression_statement", seq({ err(sym("expression")),