Add accessor methods on Grammar

This commit is contained in:
Max Brunsfeld 2014-06-09 21:05:25 -07:00
parent b4a34dd7c2
commit 54a555168d
10 changed files with 47 additions and 44 deletions

View file

@ -5,7 +5,7 @@ namespace tree_sitter_examples {
using tree_sitter::Grammar;
using namespace tree_sitter::rules;
extern const Grammar javascript({
extern const Grammar javascript = Grammar({
{ "program", repeat(sym("statement")) },
// Statements
@ -181,8 +181,5 @@ namespace tree_sitter_examples {
{ "null", keyword("null") },
{ "true", keyword("true") },
{ "false", keyword("false") },
}, {
// ubiquitous_tokens
{ "comment" }
});
}).ubiquitous_tokens({ "comment" });
}