Skip to main content

GRAMMAR

Constant GRAMMAR 

Source
pub const GRAMMAR: &str = "const JS = require(\"./tree-sitter-javascript/grammar.js\")\n\nmodule.exports = grammar(JS, {\n  name: \'mozjs\',\n\n  /*extras: ($, original) => original.concat([\n    $.preproc,\n  ]),*/\n\n  rules: {\n    preproc: $ => token(\n      /#.*\\n/,\n    ),\n\n    statement: ($, original) => choice(\n      original,\n      $.preproc,\n    ),\n  }\n});\n";
Expand description

The source of the Mozjs tree-sitter grammar description.