Switch to new API - close #8
The new API is more C-like and will allow consistency across all future supported language targets.
This commit is contained in:
1 parent
e0e5e87338
commit
7a1b4064c1
15 files changed
+611
-481
No files matched your search
+5
-4
@@ -9,12 +9,13 @@ int main()
|
||||
unittest
|
||||
{
|
||||
string input = "abcdef";
|
||||
auto parser = new Parser(input);
|
||||
assert(parser.parse() == P_SUCCESS);
|
||||
p_context_t context;
|
||||
p_context_init(&context, input);
|
||||
assert(p_parse(&context) == P_SUCCESS);
|
||||
writeln("pass1");
|
||||
|
||||
input = "defabcdef";
|
||||
parser = new Parser(input);
|
||||
assert(parser.parse() == P_SUCCESS);
|
||||
p_context_init(&context, input);
|
||||
assert(p_parse(&context) == P_SUCCESS);
|
||||
writeln("pass2");
|
||||
}
|
||||
Reference in new issue
Block a user