Module full_moon::ast::punctuated

source ·
Expand description

A punctuated sequence of syntax tree nodes separated by punctuation (tokens).

Examples of punctuated sequences include:

  • Arguments in a function call are Punctuated<Expression>
  • Names and definitions in a local assignment are Punctuated<TokenReference> and Punctuated<Expression> respectively
  • The values of a return statement are Punctuated<Expression>

Everything with punctuation uses the Punctuated<T> type with the following logic.

let ast = parse("call(arg1, arg2, arg3)")?;
//                   ^^^^^ ~~~~~ ^^^^^

Structs

Enums