Report the unexpected token for P_UNEXPECTED_TOKEN returns - close #11
This commit is contained in:
1 parent
fa7a781a5d
commit
fff9700f91
3 files changed
+8
No files matched your search
@@ -17,11 +17,13 @@ unittest
|
||||
p_context_init(&context, input);
|
||||
assert(p_parse(&context) == P_UNEXPECTED_TOKEN);
|
||||
assert(p_position(&context) == p_position_t(2, 3));
|
||||
assert(context.token == TOKEN_a);
|
||||
|
||||
input = "12";
|
||||
p_context_init(&context, input);
|
||||
assert(p_parse(&context) == P_UNEXPECTED_TOKEN);
|
||||
assert(p_position(&context) == p_position_t(0, 0));
|
||||
assert(context.token == TOKEN_num);
|
||||
|
||||
input = "a 12\n\nab";
|
||||
p_context_init(&context, input);
|
||||
|
||||
Reference in new issue
Block a user