Skip to content

Instantly share code, notes, and snippets.

@rrichardson
Last active August 29, 2015 14:04
Show Gist options
  • Save rrichardson/904fdf1181ebaf86dbd5 to your computer and use it in GitHub Desktop.
Save rrichardson/904fdf1181ebaf86dbd5 to your computer and use it in GitHub Desktop.
fn init_parser() -> *mut h::HParser {
unsafe {
let token1 = h::h_token(hello.as_ptr(), from_uint(hello.char_len()).expect("uint conversion failed"));
let token2 = h::h_token(world.as_ptr(), from_uint(world.char_len()).expect("uint conversion failed"));
let token3 = h::h_token(there.as_ptr(), from_uint(there.char_len()).expect("uint conversion failed"));
let token4 = h::h_token(bang.as_ptr(), from_uint(bang.char_len()).expect("uint conversion failed"));
h::h_sequence(token1, h::h_choice(token2, token3, token4, ptr::null<h::HParser>()) , ptr::null<h::HParser>())
}
}
------
Compiling hammer v0.1.0 (file:/home/rick/Projects/hammer/src/bindings/rust)
/home/rick/Projects/hammer/src/bindings/rust/src/main.rs:17:73: 17:83 error: unresolved name `h::HParser`.
/home/rick/Projects/hammer/src/bindings/rust/src/main.rs:17 h::h_sequence(token1, h::h_choice(token2, token3, token4, ptr::null<h::HParser>()) , ptr::null<h::HParser>())
^~~~~~~~~~
/home/rick/Projects/hammer/src/bindings/rust/src/main.rs:17:100: 17:110 error: unresolved name `h::HParser`.
/home/rick/Projects/hammer/src/bindings/rust/src/main.rs:17 h::h_sequence(token1, h::h_choice(token2, token3, token4, ptr::null<h::HParser>()) , ptr::null<h::HParser>())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment