Execute user code blocks assigned to tokens

This commit is contained in:
josh committed 2022-09-24 17:31:40 -04:00
1 parent 92ce30f354
commit 672098ad32
6 files changed
+122 -8

No files matched your search

+15
View File
@@ -95,4 +95,19 @@ EOF
compile("spec/test_d_lexer2.d")
run
end
it "executes user code when matching lexer token" do
write_grammar <<EOF
token abc <<
writeln("abc!");
>>
token def;
Start -> Abcs def;
Abcs -> ;
Abcs -> abc Abcs;
EOF
build_parser
compile("spec/test_user_code.d")
run
end
end