MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / binary

Method binary

aiscript-vm/src/parser/mod.rs:1687–1699  ·  view source on GitHub ↗
(&mut self, _can_assign: bool)

Source from the content-addressed store, hash-verified

1685 }
1686
1687 fn binary(&mut self, _can_assign: bool) -> Option<Expr<'gc>> {
1688 let operator = self.previous;
1689 let rule = get_rule(operator.kind);
1690 let left = Box::new(self.previous_expr.take()?);
1691 let right = Box::new(self.parse_precedence(rule.precedence + 1)?);
1692
1693 Some(Expr::Binary {
1694 left,
1695 operator,
1696 right,
1697 line: operator.line,
1698 })
1699 }
1700
1701 fn and(&mut self, _can_assign: bool) -> Option<Expr<'gc>> {
1702 let left = Box::new(self.previous_expr.take()?);

Callers

nothing calls this directly

Calls 2

get_ruleFunction · 0.85
parse_precedenceMethod · 0.80

Tested by

no test coverage detected