Skip to content

Instantly share code, notes, and snippets.

@willmurphyscode
Created January 19, 2018 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willmurphyscode/bb6f2b30b69c24931b317c86c6555107 to your computer and use it in GitHub Desktop.
Save willmurphyscode/bb6f2b30b69c24931b317c86c6555107 to your computer and use it in GitHub Desktop.
pub fn parse(bytes: &[u8]) -> Result<Vec<Token>, TokenizationError> {
let parse_result = tokens(bytes).to_result();
match parse_result {
Ok(token_vec) => Ok(token_vec),
Err(_) => Err(TokenizationError {})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment