Expand description
Binary operator expression parsing
This module handles parsing of all binary operators with proper precedence:
- Pipe operator (|>)
- Ternary operator (?:)
- Null coalescing (??)
- Error context wrapping (!!)
- Logical operators (||, &&)
- Comparison operators (>, <, >=, <=, ==, !=, ~=, ~>, ~<)
- Range operator (..)
- Arithmetic operators (+, -, *, /, %, ^)
Functionsยง
- parse_
additive_ expr - Parse additive expression (a + b, a - b)
- parse_
and_ expr - Parse logical AND expression (a && b)
- parse_
assignment_ expr - Parse assignment expression (target = value or target += value)
- parse_
comparison_ expr - Parse comparison expression (a > b, a == b, etc.)
- parse_
comparison_ op - Parse comparison operator
- parse_
context_ expr - Parse error context expression (lhs !! rhs).
- parse_
exponential_ expr - Parse exponential expression (a ** b)
- parse_
multiplicative_ expr - Parse multiplicative expression (a * b, a / b, a % b)
- parse_
null_ coalesce_ expr - Parse null coalescing expression (a ?? b)
- parse_
or_ expr - Parse logical OR expression (a || b)
- parse_
pipe_ expr - Parse pipe expression (a |> b |> c) Pipes the left value into the right function
- parse_
range_ expr - Parse a range expression with Rust-style syntax. Supports: start..end, start..=end, ..end, ..=end, start.., ..
- parse_
shift_ expr - Parse shift expression (a << b, a >> b)
- parse_
ternary_ expr - Parse ternary expression (condition ? then : else)
- parse_
unary_ expr - Parse unary expression (!a, -a)