MCPcopy Create free account
hub / github.com/Glyphack/enderpy / parse_statement

Method parse_statement

parser/src/parser/parser.rs:1141–1148  ·  view source on GitHub ↗

https://docs.python.org/3/reference/compound_stmts.html#grammar-token-python-grammar-statement

(&mut self)

Source from the content-addressed store, hash-verified

1139
1140 // https://docs.python.org/3/reference/compound_stmts.html#grammar-token-python-grammar-statement
1141 fn parse_statement(&mut self) -> Result<Vec<Statement>, ParsingError> {
1142 if is_at_compound_statement(self.cur_token()) {
1143 let comp_stmt = self.parse_compound_statement()?;
1144 Ok(vec![comp_stmt])
1145 } else {
1146 self.parse_statement_list()
1147 }
1148 }
1149
1150 // https://docs.python.org/3/reference/simple_stmts.html#grammar-token-python-grammar-stmt-list
1151 fn parse_statement_list(&mut self) -> Result<Vec<Statement>, ParsingError> {

Callers 1

parse_suiteMethod · 0.80

Calls 4

is_at_compound_statementFunction · 0.85
cur_tokenMethod · 0.80
parse_statement_listMethod · 0.80

Tested by

no test coverage detected