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

Method parse_or_test

parser/src/parser/parser.rs:2028–2040  ·  view source on GitHub ↗

https://docs.python.org/3/reference/expressions.html#boolean-operations

(&mut self)

Source from the content-addressed store, hash-verified

2026
2027 // https://docs.python.org/3/reference/expressions.html#boolean-operations
2028 fn parse_or_test(&mut self) -> Result<Expression, ParsingError> {
2029 let node = self.start_node();
2030 let mut expr = self.parse_and_test()?;
2031 if self.eat(Kind::Or) {
2032 let rhs = self.parse_or_test()?;
2033 expr = Expression::BoolOp(Box::new(BoolOperation {
2034 node: self.finish_node(node),
2035 op: BooleanOperator::Or,
2036 values: vec![expr, rhs],
2037 }));
2038 }
2039 Ok(expr)
2040 }
2041
2042 // https://docs.python.org/3/reference/expressions.html#boolean-operations
2043 fn parse_and_test(&mut self) -> Result<Expression, ParsingError> {

Callers 2

parse_comp_forMethod · 0.80

Calls 4

start_nodeMethod · 0.80
parse_and_testMethod · 0.80
eatMethod · 0.80
finish_nodeMethod · 0.80

Tested by

no test coverage detected