MCPcopy Index your code
hub / github.com/endbasic/endbasic / parse_function

Method parse_function

core/src/parser.rs:1519–1523  ·  view source on GitHub ↗

Parses a `FUNCTION` definition.

(&mut self, function_pos: LineCol)

Source from the content-addressed store, hash-verified

1517
1518 /// Parses a `FUNCTION` definition.
1519 fn parse_function(&mut self, function_pos: LineCol) -> Result<Statement> {
1520 let (name, name_pos, params) = self.parse_callable_signature(false, true)?;
1521 let (body, end_pos) = self.parse_callable_body(function_pos, Token::Function)?;
1522 Ok(Statement::Callable(CallableSpan { name, name_pos, params, body, end_pos }))
1523 }
1524
1525 /// Parses a `SUB` definition.
1526 fn parse_sub(&mut self, sub_pos: LineCol) -> Result<Statement> {

Callers 1

parse_oneMethod · 0.80

Calls 3

CallableInterface · 0.85
parse_callable_bodyMethod · 0.80

Tested by

no test coverage detected