Track token position in AST Token node

This commit is contained in:
josh committed 2024-05-27 22:10:05 -04:00
1 parent aaeb0c4db1
commit 911e9505b7
7 files changed
+125 -29

No files matched your search

+20
View File
@@ -1051,6 +1051,26 @@ EOF
expect(results.stderr).to eq ""
expect(results.status).to eq 0
end
it "stores the token position in the AST Token node" do
write_grammar <<EOF
ast;
token a;
token b;
token c;
drop /\\s+/;
Start -> T T T;
T -> a;
T -> b;
T -> c;
EOF
run_propane(language: language)
compile("spec/test_ast_token_positions.#{language}", language: language)
results = run_test
expect(results.stderr).to eq ""
expect(results.status).to eq 0
end
end
end
end