Track rule component positions - close #41
This commit is contained in:
1 parent
7942a3be97
commit
1729546d69
7 files changed
+365
-5
No files matched your search
@@ -0,0 +1,27 @@
|
||||
import testparser;
|
||||
import std.stdio;
|
||||
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unittest
|
||||
{
|
||||
string input = " Hello\n\n 4200\n";
|
||||
p_context_t * context;
|
||||
context = p_context_new(input);
|
||||
assert(p_parse(context) == P_SUCCESS);
|
||||
|
||||
writeln();
|
||||
|
||||
input = "\n tok2";
|
||||
context = p_context_new(input);
|
||||
assert(p_parse(context) == P_SUCCESS);
|
||||
|
||||
writeln();
|
||||
|
||||
input = " tok1";
|
||||
context = p_context_new(input);
|
||||
assert(p_parse(context) == P_SUCCESS);
|
||||
}
|
||||
Reference in new issue
Block a user