| 1 | module scheme |
| 2 | |
| 3 | struct SyntaxPatternConstants { |
| 4 | nodes map[u64]int |
| 5 | } |
| 6 | |
| 7 | struct PlainSyntaxMatch {} |
| 8 | struct SharedSyntaxMatch {} |
| 9 | |
| 10 | // Only completed, capture-free compound matches enter this invocation-local |
| 11 | // table. Repetition lengths and captured values retain their original writes. |
| 12 | struct SyntaxMatchMemo { |
| 13 | mut: |
| 14 | completed map[u64]bool |
| 15 | } |
| 16 | |
| 17 | @[inline] |
| 18 | fn syntax_match_key(pattern i32, input i32) u64 { |
| 19 | return (u64(u32(pattern)) << 32) | u64(u32(input)) |
| 20 | } |
| 21 |