Expand description
A C expression parser and evaluator.
This crate provides methods for parsing and evaluating simple C expressions. In general, the crate can handle most arithmetic expressions that would appear in macros or the definition of constants, as well as string and character constants.
The main entry point for is [token::parse
], which parses a byte string and returns its
evaluated value.
Modules§
- expr
- Evaluating C expressions from tokens.
- literal
- Parsing C literals from byte slices.
- nom
- nom’s result types, re-exported.
- token
- Representation of a C token
Structs§
- Error
- Parsing errors specific to C parsing.
Enums§
- Error
Kind - Parsing errors specific to C parsing
Functions§
- assert_
full_ parse - If the input result indicates a succesful parse, but there is data left,
return an
Error::Partial
instead.