(
env: &mut Environment,
tokens: &[Token],
position: &mut usize,
)
| 3720 | } |
| 3721 | |
| 3722 | fn parse_global_variable_expression( |
| 3723 | env: &mut Environment, |
| 3724 | tokens: &[Token], |
| 3725 | position: &mut usize, |
| 3726 | ) -> Result<Box<dyn Expr>, Box<Diagnostic>> { |
| 3727 | let name = tokens[*position].to_string(); |
| 3728 | *position += 1; |
| 3729 | let result_type = if env.globals_types.contains_key(&name) { |
| 3730 | env.globals_types[name.as_str()].clone() |
| 3731 | } else { |
| 3732 | Box::new(UndefType) |
| 3733 | }; |
| 3734 | Ok(Box::new(GlobalVariableExpr { name, result_type })) |
| 3735 | } |
| 3736 | |
| 3737 | fn un_expected_query_start_error(tokens: &[Token], position: &mut usize) -> Box<Diagnostic> { |
| 3738 | let token: &Token = &tokens[*position]; |
no outgoing calls
no test coverage detected
searching dependent graphs…