Add operator rule
This commit is contained in:
parent
6cbe562241
commit
54eb8252a9
@ -20,6 +20,10 @@ peg::parser! {
|
||||
rule expression_kind() -> ExpressionKind =
|
||||
primary()
|
||||
|
||||
//TODO maybe make this more complex
|
||||
rule operator() -> &'input str =
|
||||
$( ['+' | '-' | '*' | '/' | '%' | '<' | '>' | '=' | '!' | '$' | '&' | '?' | '^' | '`']+ )
|
||||
|
||||
rule primary() -> ExpressionKind =
|
||||
float_literal() / nat_literal() / bool_literal() / string_literal() / paren_expr() /
|
||||
list_expr()
|
||||
|
Loading…
Reference in New Issue
Block a user