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
PipeDotColonCommaOpenSquareCloseSquareOpenRoundCloseRoundQuestionDashAssignmentIdentifier(String)StringLiteral(String)IntegerLiteral(i32)FloatLiteral(f64)BooleanLiteral(bool)DotDotComparison(ComparisonOperator)Or
Methods
impl Token[src]
impl Tokenpub 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 Tokenfn clone(&self) -> Token[src]
fn clone(&self) -> TokenReturns 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 Tokenfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for Token[src]
impl PartialEq for Tokenfn eq(&self, other: &Token) -> bool[src]
fn eq(&self, other: &Token) -> boolThis 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) -> boolThis method tests for !=.
impl Display for Token[src]
impl Display for Token