Validate parse nodes correspond to expected tokens (#3295)

Can specify which tokens are allowed generally, and any additional
tokens that only occur when the parse node has an error.

---------

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
josh11b
2023-10-13 21:44:51 +00:00
committed by GitHub
co-authored by Richard Smith
parent 95a1cc8cba
commit a112f2e802
16 changed files with 312 additions and 113 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ namespace;
// CHECK:STDOUT: parse_tree: [
// CHECK:STDOUT: {kind: 'FileStart', text: ''},
// CHECK:STDOUT: {kind: 'NamespaceStart', text: 'namespace'},
// CHECK:STDOUT: {kind: 'InvalidParse', text: ';'},
// CHECK:STDOUT: {kind: 'InvalidParse', text: ';', has_error: yes},
// CHECK:STDOUT: {kind: 'Namespace', text: ';', has_error: yes, subtree_size: 3},
// CHECK:STDOUT: {kind: 'FileEnd', text: ''},
// CHECK:STDOUT: ]