[][src]Enum nyar_ast::ast::AST

pub enum AST {
    None,
    Program(Vec<AST>),
    EmptyStatement,
    ImportStatement {
        data: ImportStatement,
        modifier: Annotation,
    },
    UnaryOperators {
        base: Box<AST>,
        prefix: Vec<String>,
        postfix: Vec<String>,
        modifier: Annotation,
    },
    InfixOperators {
        operator: String,
        lhs: Box<AST>,
        rhs: Box<AST>,
        modifier: Annotation,
    },
    NumberLiteral {
        handler: String,
        data: String,
    },
    Number(Number),
    StringLiteral {
        handler: String,
        data: String,
    },
    String(String),
    CommentLiteral {
        handler: String,
        data: String,
    },
    Boolean(bool),
}

Variants

None
  • None: It doesn't look like anything to me
Program(Vec<AST>)
  • Program:
EmptyStatement
  • EmptyStatement: Nothing
ImportStatement

Fields of ImportStatement

data: ImportStatementmodifier: Annotation
UnaryOperators
  • UnaryOperators
  • base

Fields of UnaryOperators

base: Box<AST>prefix: Vec<String>postfix: Vec<String>modifier: Annotation
InfixOperators
  • InfixOperators

Fields of InfixOperators

operator: Stringlhs: Box<AST>rhs: Box<AST>modifier: Annotation
NumberLiteral
  • Number: raw number represent

Fields of NumberLiteral

handler: Stringdata: String
Number(Number)
StringLiteral

Fields of StringLiteral

handler: Stringdata: String
String(String)
  • String: raw string
CommentLiteral
  • Comment: raw comment with handler

Fields of CommentLiteral

handler: Stringdata: String
Boolean(bool)

Methods

impl AST[src]

pub fn parse_string(self) -> AST[src]

pub fn parse_integer(self) -> AST[src]

pub fn save(self, path: &str) -> Result<()>[src]

pub fn load(path: &str) -> AST[src]

Trait Implementations

impl Clone for AST[src]

impl Debug for AST[src]

impl<'de> Deserialize<'de> for AST[src]

impl PartialEq<AST> for AST[src]

impl Serialize for AST[src]

impl StructuralPartialEq for AST[src]

Auto Trait Implementations

impl RefUnwindSafe for AST

impl Send for AST

impl Sync for AST

impl Unpin for AST

impl UnwindSafe for AST

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.