Allow rule terms to be marked as optional

This commit is contained in:
josh committed 2024-05-09 11:56:13 -04:00
1 parent 494afb7307
commit f3e4941ad8
14 files changed
+346 -5

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
import testparser;
import std.stdio;
int main()
{
return 0;
}
unittest
{
string input = "b";
p_context_t context;
p_context_init(&context, input);
assert(p_parse(&context) == P_SUCCESS);
input = "abcd";
p_context_init(&context, input);
assert(p_parse(&context) == P_SUCCESS);
input = "abdc";
p_context_init(&context, input);
assert(p_parse(&context) == P_SUCCESS);
}