mirror of
https://github.com/danog/parser.git
synced 2025-01-23 05:21:22 +01:00
parser: support greater than
This commit is contained in:
parent
8f5a00b16d
commit
8a515e760f
@ -303,6 +303,7 @@ pub enum InfixOp {
|
||||
Mul,
|
||||
Concat,
|
||||
LessThan,
|
||||
GreaterThan,
|
||||
Equals,
|
||||
Identical,
|
||||
NotEquals,
|
||||
@ -319,6 +320,7 @@ impl From<TokenKind> for InfixOp {
|
||||
TokenKind::Asterisk => Self::Mul,
|
||||
TokenKind::Slash => Self::Div,
|
||||
TokenKind::LessThan => Self::LessThan,
|
||||
TokenKind::GreaterThan => Self::GreaterThan,
|
||||
TokenKind::Dot => Self::Concat,
|
||||
TokenKind::DoubleEquals => Self::Equals,
|
||||
TokenKind::TripleEquals => Self::Identical,
|
||||
|
@ -1195,7 +1195,7 @@ fn infix_binding_power(t: &TokenKind) -> Option<(u8, u8)> {
|
||||
TokenKind::Asterisk | TokenKind::Slash => (13, 14),
|
||||
TokenKind::Plus | TokenKind::Minus => (11, 12),
|
||||
TokenKind::Dot => (11, 11),
|
||||
TokenKind::LessThan => (9, 10),
|
||||
TokenKind::LessThan | TokenKind::GreaterThan => (9, 10),
|
||||
TokenKind::DoubleEquals | TokenKind::TripleEquals | TokenKind::BangEquals | TokenKind::BangDoubleEquals => (7, 8),
|
||||
TokenKind::BooleanAnd => (5, 6),
|
||||
TokenKind::BooleanOr => (3, 4),
|
||||
|
Loading…
x
Reference in New Issue
Block a user