Struct ucglib::ast::tree::Token [] [src]

pub struct Token {
    pub typ: TokenType,
    pub fragment: String,
    pub pos: Position,
}

Defines a Token representing a building block of UCG syntax.

Token's are passed to the parser stage to be parsed into an AST.

Fields

Methods

impl Token
[src]

[src]

Constructs a new Token with a type and line and column information.

[src]

Trait Implementations

impl Debug for Token
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for Token
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for Token
[src]

impl Clone for Token
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialOrd for Token
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for Token
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Hash for Token
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Borrow<str> for Token
[src]

[src]

Immutably borrows from an owned value. Read more

impl<'a> From<&'a Token> for Positioned<String>
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for Token

impl Sync for Token