Struct llvm_kaleidoscope_rs::parser::Parser [−][src]
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.