David Majda
eb4badab24
Refactor named rules AST representation
...
PEG.js grammar rules are represented by |rule| nodes in the AST. Until
now, all such nodes had a |displayName| property which was either |null|
or stored rule's human-readable name. This commit gets rid of the
|displayName| property and starts representing rules with a
human-readable name using a new |named| node (a child of the |rule|
node).
This change simplifies code generation code a bit as tests for
|displayName| can be removed (see changes in generate-code.js). It also
separates different concerns from each other nicely.
12 years ago
David Majda
ef25ec08c2
Extract |varyAll| calls one level up
...
DRY + less code.
12 years ago
David Majda
112e4122d0
Jasmine: Convert remaining error reporting tests
12 years ago
David Majda
94aaf4ec75
Jasmine: Convert error position reporting tests
12 years ago
David Majda
1825dd4a42
Jasmine: Convert start rule tests
12 years ago
David Majda
f61813238d
Jasmine: Convert complex example tests
12 years ago
David Majda
022a51f94e
Jasmine: Convert cache tests
12 years ago
David Majda
e9f7255d47
Jasmine: Convert initializer tests
12 years ago
David Majda
f5f40f68d2
Jasmine: Convert choice matching tests
12 years ago
David Majda
1b0789fbae
Jasmine: Convert sequence matching tests
12 years ago
David Majda
ae8a89c9e4
Jasmine: Convert labeled matching tests
12 years ago
David Majda
b013ba8cc9
Jasmine: Convert simple and matching tests
12 years ago
David Majda
343e9db525
Jasmine: Convert simple not matching tests
12 years ago
David Majda
2bb25efa44
Jasmine: Convert semantic and code tests
12 years ago
David Majda
f04096189f
Jasmine: Convert semantic not code tests
12 years ago
David Majda
ccf31f8822
Jasmine: Convert optional matching tests
12 years ago
David Majda
669668fc1b
Jasmine: Convert zero or more matching tests
12 years ago
David Majda
1ab06ff906
Jasmine: Convert one or more matching tests
12 years ago
David Majda
03716a562d
Jasmine: Convert action code tests
12 years ago
David Majda
b06bd774f5
Jasmine: Convert rule reference matching tests
12 years ago
David Majda
14c11b4dfc
Jasmine: Convert class matching tests
12 years ago
David Majda
75ab03dc85
Jasmine: Convert any matching tests
12 years ago
David Majda
ec48742032
Jasmine: Convert literal matching tests
12 years ago