Skip to main content

Module functions

Module functions 

Source
Expand description

Function expression parsing

This module handles parsing of function-related expressions:

  • Function expressions (anonymous functions)
  • Arrow functions
  • Function calls
  • Method calls
  • Argument lists
  • Type annotations

Functions§

parse_arg_list
Parse argument list with support for named arguments Returns (positional_args, named_args)
parse_arrow_function
Parse arrow function
parse_function_expr
Parse function expression (anonymous function)
parse_pipe_lambda
Parse pipe lambda: |x| expr, |x, y| x + y, || 42, |x| { … } Reuses the same AST node as arrow functions (Expr::FunctionExpr).
parse_regular_function_expr
Parse regular function expression