Parse and ast math expressions
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
8cc8488de4
commit
8c02dbd672
8 changed files with 196 additions and 51 deletions
|
|
@ -33,6 +33,7 @@ use winnow::stream::Location;
|
|||
use winnow::stream::Recoverable;
|
||||
use winnow::stream::Stream;
|
||||
use winnow::token::any;
|
||||
use winnow::token::literal;
|
||||
use winnow::token::one_of;
|
||||
use winnow::token::rest;
|
||||
use winnow::token::take_until;
|
||||
|
|
@ -535,7 +536,7 @@ fn ident<'input>(input: &mut Input<'input>) -> PResult<'input, NomoInput> {
|
|||
.context(ParseError::ctx().msg("Expected an ident, but found a literal instead"))
|
||||
.parse_next(input)?;
|
||||
|
||||
let literal_start = alpha1;
|
||||
let literal_start = alt((alpha1, "_"));
|
||||
|
||||
(
|
||||
literal_start,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue