[−][src]Enum glitter_lang::ast::Expression
The types of possible expressions which form an expression tree
The gist format has three types of valid expressions:
- Named expressions
- Group Expressions
- Literal Expressions
The interpreter transforms these expressions to their final output after they have been parsed from the input string.
Named expressions take one of two forms: the plain form with no arguments, or with arguments
\name
plain form\name(\exp1\exp2...\expn)
any number of expressions, no separaters
Group expressions are set of expressions, which are not comma seperated. There are a few base group types:
\()
parentheses - wrap with parens\{}
curly braces - wrap with curly braces\[]
square brackets - wrap contents with square brackets\<>
angle brackets - wrap contenst with angle brackets
By nesting groups of expressions, we can create an implicit tree.
A literal expression is any valid utf8 characters between single quites, except for single quotes and backslashes.
'hello''we''are''literal''expressions''I am one including whitespace'
Variants
An expression with a name and optional arguments which represents git repository stats
An expression which represents terminal text formatting
A group of sub-expressions which forms an expression tree
Literal(String)
Literal characters including whitespace, surrounded by single quotes
Trait Implementations
impl Eq for Expression
[src]
impl Clone for Expression
[src]
fn clone(&self) -> Expression
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl PartialEq<Expression> for Expression
[src]
fn eq(&self, other: &Expression) -> bool
[src]
fn ne(&self, other: &Expression) -> bool
[src]
impl Debug for Expression
[src]
impl Display for Expression
[src]
Auto Trait Implementations
impl Send for Expression
impl Unpin for Expression
impl Sync for Expression
impl UnwindSafe for Expression
impl RefUnwindSafe for Expression
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,