pub enum ASTValue {
TokenValue(Token),
Unary(UnaryNode),
Binary(BinaryNode),
List(Vec<ASTValue>),
Mapping(Vec<(Token, ASTValue)>),
Slice(Location, Box<Option<ASTValue>>, Box<Option<ASTValue>>, Box<Option<ASTValue>>),
}
Expand description
This represents AST nodes corresponding to fragments of CFG source.
Variants§
TokenValue(Token)
This is a token in the CFG grammar.
Unary(UnaryNode)
This is a unary node.
Binary(BinaryNode)
This is a binary node.
List(Vec<ASTValue>)
This is a list node.
Mapping(Vec<(Token, ASTValue)>)
This is a mapping node.
Slice(Location, Box<Option<ASTValue>>, Box<Option<ASTValue>>, Box<Option<ASTValue>>)
This is a slice node. It’s produced when parsing slices.
Trait Implementations§
impl StructuralPartialEq for ASTValue
Auto Trait Implementations§
impl Freeze for ASTValue
impl RefUnwindSafe for ASTValue
impl Send for ASTValue
impl Sync for ASTValue
impl Unpin for ASTValue
impl UnwindSafe for ASTValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more