Struct llvm_kaleidoscope_rs::parser::Parser[][src]

pub struct Parser<I> where
    I: Iterator<Item = char>, 
{ /* fields omitted */ }
Expand description

Parser for the kaleidoscope language.

Implementations

Implement the global variable int CurTok; from the tutorial.

Panics

Panics if the parser doesn’t have a current token.

Advance the cur_tok by getting the next token from the lexer.

Implement the fucntion int getNextToken(); from the tutorial.

definition ::= ‘def’ prototype expression

Implement std::unique_ptr<FunctionAST> ParseDefinition(); from the tutorial.

external ::= ‘extern’ prototype

Implement std::unique_ptr<PrototypeAST> ParseExtern(); from the tutorial.

toplevelexpr ::= expression

Implement std::unique_ptr<FunctionAST> ParseTopLevelExpr(); from the tutorial.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.