Allow multiple lexer modes to be specified for a lexer pattern - close #35

This commit is contained in:
josh committed 2025-03-11 20:40:10 -04:00
1 parent 54bb3307cd
commit eb9d9026fc
11 files changed
+166 -30

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import testparser;
import std.stdio;
int main()
{
return 0;
}
unittest
{
string input = `abc.def`;
p_context_t context;
p_context_init(&context, input);
assert(p_parse(&context) == P_SUCCESS);
writeln("pass1");
input = `abc . abc`;
p_context_init(&context, input);
assert(p_parse(&context) == P_SUCCESS);
writeln("pass2");
}