Commit 6e399a549fed1976c5efa32484a97a1cedf2e8cf
- Diff rendering mode:
- inline
- side by side
runtime/stackdgrammar.rb
(5 / 12)
|   | |||
| 405 | 405 | end | |
| 406 | 406 | s0 << r1 | |
| 407 | 407 | if r1 | |
| 408 | s4, i4 = [], index | ||
| 409 | loop do | ||
| 410 | r5 = _nt_space | ||
| 411 | if r5 | ||
| 412 | s4 << r5 | ||
| 413 | else | ||
| 414 | break | ||
| 415 | end | ||
| 416 | end | ||
| 417 | if s4.empty? | ||
| 418 | @index = i4 | ||
| 408 | i4 = index | ||
| 409 | r5 = _nt_identifier | ||
| 410 | if r5 | ||
| 419 | 411 | r4 = nil | |
| 420 | 412 | else | |
| 421 | r4 = instantiate_node(SyntaxNode,input, i4...index, s4) | ||
| 413 | @index = i4 | ||
| 414 | r4 = instantiate_node(SyntaxNode,input, index...index) | ||
| 422 | 415 | end | |
| 423 | 416 | s0 << r4 | |
| 424 | 417 | end |
|   | |||
| 20 | 20 | end | |
| 21 | 21 | ||
| 22 | 22 | rule boolean do | |
| 23 | ("t" / "f") space+ <Boolean> | ||
| 23 | ("t" / "f") !(identifier) <Boolean> | ||
| 24 | 24 | end | |
| 25 | 25 | ||
| 26 | 26 | rule integer do |

