Enum liquid_compiler::Token [−][src]
pub enum Token { Pipe, Dot, Colon, Comma, OpenSquare, CloseSquare, OpenRound, CloseRound, Question, Dash, Assignment, Identifier(String), StringLiteral(String), IntegerLiteral(i32), FloatLiteral(f64), BooleanLiteral(bool), DotDot, Comparison(ComparisonOperator), Or, }
Variants
Pipe
Dot
Colon
Comma
OpenSquare
CloseSquare
OpenRound
CloseRound
Question
Dash
Assignment
Identifier(String)
StringLiteral(String)
IntegerLiteral(i32)
FloatLiteral(f64)
BooleanLiteral(bool)
DotDot
Comparison(ComparisonOperator)
Or
Methods
impl Token
[src]
impl Token
pub fn to_value(&self) -> Result<Value>
[src]
pub fn to_value(&self) -> Result<Value>
Parses a token that can possibly represent a Value to said Value. Returns an Err if the token can not be interpreted as a Value.
pub fn to_arg(&self) -> Result<Argument>
[src]
pub fn to_arg(&self) -> Result<Argument>
Translates a Token to a Value, looking it up in the context if necessary
Trait Implementations
impl Clone for Token
[src]
impl Clone for Token
fn clone(&self) -> Token
[src]
fn clone(&self) -> Token
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Token
[src]
impl Debug for Token
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Token
[src]
impl PartialEq for Token
fn eq(&self, other: &Token) -> bool
[src]
fn eq(&self, other: &Token) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Token) -> bool
[src]
fn ne(&self, other: &Token) -> bool
This method tests for !=
.
impl Display for Token
[src]
impl Display for Token