pub struct Parser { /* private fields */ }Implementations§
source§impl Parser
impl Parser
sourcepub fn parse_file(&mut self) -> Result<File>
pub fn parse_file(&mut self) -> Result<File>
parse source into golang file
including imports and type, var, const declarations
sourcepub fn expression(&mut self) -> Result<Expression>
pub fn expression(&mut self) -> Result<Expression>
parse source into golang Expression Expression = UnaryExpr | Expression binary_op Expression . UnaryExpr = PrimaryExpr | unary_op UnaryExpr .
sourcepub fn parse_stmt(&mut self) -> Result<Statement>
pub fn parse_stmt(&mut self) -> Result<Statement>
parse source into golang Statement