Node

Struct Node 

Source
pub struct Node { /* private fields */ }

Implementations§

Source§

impl Node

Source

pub fn new_list_node(child_nodes: Vec<Node>) -> Node

Source

pub fn new_parsing_error_node( pos: CodePosition, error: ParsingError, message: impl Into<Box<str>>, ) -> Node

Source

pub fn new_assignment_node(lvalue: Node, rvalue: Node) -> Node

Source

pub fn new_escape_sequence_node(pos: CodePosition, char: char) -> Node

Source

pub fn new_unicode_escape_sequence_node( pos: CodePosition, hex_codepoint: impl Into<Box<str>>, ) -> Node

Source

pub fn new_unprocessed_variable_name_node( pos: CodePosition, variable_name: impl Into<Box<str>>, ) -> Node

Source

pub fn new_variable_name_node( pos: CodePosition, variable_name: impl Into<Box<str>>, type_constraint: Option<Box<str>>, ) -> Node

Source

pub fn new_argument_separator_node( pos: CodePosition, original_text: impl Into<Box<str>>, ) -> Node

Source

pub fn new_function_call_node( pos: CodePosition, argument_list: Vec<Node>, function_name: impl Into<Box<str>>, ) -> Node

Source

pub fn new_function_call_previous_node_value_node( pos: CodePosition, leading_whitespace: impl Into<Box<str>>, trailing_whitespace: impl Into<Box<str>>, argument_list: Vec<Node>, ) -> Node

Source

pub fn new_function_definition_node( pos: CodePosition, function_definition: FunctionDefinition, parameter_list: Vec<Node>, ) -> Node

Source

pub fn new_if_statement_part_if_node( pos: CodePosition, if_body: AST, condition: ConditionalNode, ) -> Node

Source

pub fn new_if_statement_part_else_node(pos: CodePosition, if_body: AST) -> Node

Source

pub fn new_if_statement_node(pos: CodePosition, nodes: Vec<Node>) -> Node

Source

pub fn new_loop_statement_part_loop_node( pos: CodePosition, loop_body: AST, ) -> Node

Source

pub fn new_loop_statement_part_while_node( pos: CodePosition, loop_body: AST, condition: ConditionalNode, ) -> Node

Source

pub fn new_loop_statement_part_until_node( pos: CodePosition, loop_body: AST, condition: ConditionalNode, ) -> Node

Source

pub fn new_loop_statement_part_repeat_node( pos: CodePosition, loop_body: AST, var_pointer_node: Node, repeat_count_node: Node, ) -> Node

Source

pub fn new_loop_statement_part_for_each_node( pos: CodePosition, loop_body: AST, var_pointer_node: Node, composite_or_text_node: Node, ) -> Node

Source

pub fn new_loop_statement_part_else_node( pos: CodePosition, loop_body: AST, ) -> Node

Source

pub fn new_loop_statement_node(pos: CodePosition, nodes: Vec<Node>) -> Node

Source

pub fn new_continue_break_statement_node( pos: CodePosition, number_node: Option<Box<Node>>, continue_node: bool, ) -> Node

Source

pub fn new_try_statement_part_try_node(pos: CodePosition, try_body: AST) -> Node

Source

pub fn new_try_statement_part_soft_try_node( pos: CodePosition, try_body: AST, ) -> Node

Source

pub fn new_try_statement_part_non_try_node( pos: CodePosition, try_body: AST, ) -> Node

Source

pub fn new_try_statement_part_catch_node( pos: CodePosition, try_body: AST, errors: Option<Vec<Node>>, ) -> Node

Source

pub fn new_try_statement_part_else_node( pos: CodePosition, try_body: AST, ) -> Node

Source

pub fn new_try_statement_part_finally_node( pos: CodePosition, try_body: AST, ) -> Node

Source

pub fn new_try_statement_node(pos: CodePosition, nodes: Vec<Node>) -> Node

Source

pub fn new_operation_statement_node( pos: CodePosition, operation_expression: OperationExpression, ) -> Node

Source

pub fn new_return_statement_node( pos: CodePosition, return_value: Option<Node>, ) -> Node

Source

pub fn new_throw_statement_node( pos: CodePosition, throw_value: Node, message_value: Option<Node>, ) -> Node

Source

pub fn new_int_value_node(pos: CodePosition, value: i32) -> Node

Source

pub fn new_long_value_node(pos: CodePosition, value: i64) -> Node

Source

pub fn new_float_value_node(pos: CodePosition, value: f32) -> Node

Source

pub fn new_double_value_node(pos: CodePosition, value: f64) -> Node

Source

pub fn new_char_value_node(pos: CodePosition, value: char) -> Node

Source

pub fn new_text_value_node( pos: CodePosition, value: impl Into<Box<str>>, ) -> Node

Source

pub fn new_null_value_node(pos: CodePosition) -> Node

Source

pub fn new_void_value_node(pos: CodePosition) -> Node

Source

pub fn new_array_value_node(pos: CodePosition, child_nodes: Vec<Node>) -> Node

Source

pub fn new_struct_definition_node( pos: CodePosition, struct_definition: StructDefinition, ) -> Node

Source

pub fn new_class_definition_node( pos: CodePosition, class_definition: ClassDefinition, ) -> Node

Source

pub fn pos(&self) -> CodePosition

Source

pub fn child_nodes(&self) -> &[Node]

Source

pub fn node_data(&self) -> &NodeData

Source

pub fn operator(&self) -> Option<Operator>

Source

pub fn left_side_operand(&self) -> Option<&Node>

Source

pub fn into_left_side_operand(self) -> Option<Node>

Source

pub fn middle_operand(&self) -> Option<&Node>

Source

pub fn into_middle_operand(self) -> Option<Node>

Source

pub fn right_side_operand(&self) -> Option<&Node>

Source

pub fn into_right_side_operand(self) -> Option<Node>

Source

pub fn operands(&self) -> (Option<&Node>, Option<&Node>, Option<&Node>)

Source

pub fn into_operands(self) -> (Option<Node>, Option<Node>, Option<Node>)

Trait Implementations§

Source§

impl Clone for Node

Source§

fn clone(&self) -> Node

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Node

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Node

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Node

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

§

impl Freeze for Node

§

impl RefUnwindSafe for Node

§

impl Send for Node

§

impl Sync for Node

§

impl Unpin for Node

§

impl UnwindSafe for Node

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V