Skip to content

Instantly share code, notes, and snippets.

@willmurphyscode
Created January 19, 2018 12:37
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/2095ce909840fddf84ca67ee2d0568e7 to your computer and use it in GitHub Desktop.
Save willmurphyscode/2095ce909840fddf84ca67ee2d0568e7 to your computer and use it in GitHub Desktop.
named!(single_token<&[u8], Token>,
alt!(
left_paren |
right_paren |
addition_sign |
subtraction_sign |
multiplication_sign |
division_sign |
operand
)
);
named!(tokens<&[u8], Vec<Token>>,
ws!(many0!(single_token))
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment