Extract public compiler API into its own header file
This commit is contained in:
parent
0b4e1c8d0d
commit
9e2dc14182
53 changed files with 466 additions and 409 deletions
6
spec/fixtures/grammars/json.cpp
vendored
6
spec/fixtures/grammars/json.cpp
vendored
|
|
@ -1,5 +1,5 @@
|
|||
#include "test_grammars.h"
|
||||
#include "rules.h"
|
||||
#include "compiler.h"
|
||||
|
||||
using namespace tree_sitter;
|
||||
using namespace rules;
|
||||
|
|
@ -34,12 +34,12 @@ namespace test_grammars {
|
|||
comma_sep(sym("value")),
|
||||
aux_sym("right_bracket"), }) },
|
||||
{ "string", seq({
|
||||
character('"'),
|
||||
character({ '"' }),
|
||||
repeat(choice({
|
||||
pattern("[^\"]"),
|
||||
str("\\\""),
|
||||
})),
|
||||
character('"') }) },
|
||||
character({ '"' }) }) },
|
||||
{ "number", pattern("\\d+") }
|
||||
}, {
|
||||
{ "comma", str(",") },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue