Add Rust target
This commit is contained in:
1 parent
5fc712c6ee
commit
89f1f84857
64 files changed
+3441
-27
No files matched your search
@@ -0,0 +1,18 @@
|
||||
use testparser::*;
|
||||
|
||||
fn main() {
|
||||
let mut context = p_context_new(b"a");
|
||||
assert_eq!(P_UNEXPECTED_TOKEN, p_parse(&mut context));
|
||||
assert_eq!(1, p_position(&context).row);
|
||||
assert_eq!(2, p_position(&context).col);
|
||||
assert_eq!(TOKEN___EOF, p_token(&context));
|
||||
p_context_delete(context);
|
||||
|
||||
let mut context = p_context_new(b"a b");
|
||||
assert_eq!(P_SUCCESS, p_parse(&mut context));
|
||||
p_context_delete(context);
|
||||
|
||||
let mut context = p_context_new(b"bb");
|
||||
assert_eq!(P_SUCCESS, p_parse(&mut context));
|
||||
p_context_delete(context);
|
||||
}
|
||||
Reference in new issue
Block a user