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

Method call

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

Source from the content-addressed store, hash-verified

1801 }
1802
1803 fn call(&mut self, _can_assign: bool) -> Option<Expr<'gc>> {
1804 let callee = Box::new(self.previous_expr.take()?);
1805
1806 let (arguments, keyword_args) = self.argument_list()?;
1807 self.consume(TokenType::CloseParen, "Expect ')' after arguments.");
1808
1809 let is_constructor =
1810 matches!(&*callee, Expr::Variable { name, .. } if self.type_resolver.check_class(name));
1811 Some(Expr::Call {
1812 callee,
1813 is_constructor,
1814 arguments,
1815 keyword_args,
1816 error_handler: self.parse_error_handling(),
1817 line: self.previous.line,
1818 })
1819 }
1820
1821 fn index(&mut self, can_assign: bool) -> Option<Expr<'gc>> {
1822 let object = Box::new(self.previous_expr.take()?);

Callers

nothing calls this directly

Calls 3

argument_listMethod · 0.80
parse_error_handlingMethod · 0.80
consumeMethod · 0.45

Tested by

no test coverage detected