Skip to main content

Node

Trait Node 

Source
pub trait Node: Display + Debug {
    // Required methods
    fn token_literal(&self) -> &str;
    fn position(&self) -> Position;
}
Expand description

Node trait - base for all AST nodes

Required Methods§

Source

fn token_literal(&self) -> &str

Returns the literal string of the first token

Source

fn position(&self) -> Position

Returns the position of the node in source code

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§