Skip to main content

Module control_flow

Module control_flow 

Source
Expand description

Control flow expression parsing

This module handles parsing of control flow expressions:

  • If/else expressions (conditionals)
  • While loops (loops)
  • For loops (loops)
  • Infinite loops (loops)
  • Let expressions (loops)
  • Match expressions (pattern_matching)
  • Try/catch expressions (conditionals)
  • Break/continue/return (loops)
  • Block expressions (loops)
  • Pattern matching (pattern_matching)
  • LINQ-style query expressions (this module)

Functions§

parse_async_let_expr
Parse async let expression: async let name = expr Spawns a task and binds a future handle to a local variable.
parse_async_scope_expr
Parse async scope expression: async scope { ... } Cancellation boundary – on scope exit, all pending tasks are cancelled in reverse order.
parse_block_expr
Parse block expression
parse_break_expr
Parse break expression
parse_for_expr
Parse for expression (including for await x in stream { })
parse_from_query_expr
Parse LINQ-style from query expression Syntax: from var in source [clauses…] select expr
parse_if_expr
Parse if expression
parse_let_expr
Parse let expression
parse_loop_expr
Parse loop expression
parse_match_expr
Parse match expression
parse_pattern
Parse pattern
parse_return_expr
Parse return expression
parse_while_expr
Parse while expression