Module full_moon::ast::punctuated[][src]

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

IntoIter

An iterator over owned values of type T. Refer to the module documentation for more details.

Iter

An iterator over borrowed values of type &T. Refer to the module documentation for more details.

IterMut

An iterator over borrowed values of type &mut T. Refer to the module documentation for more details.

Punctuated

A punctuated sequence of node T separated by TokenReference. Refer to the module documentation for more details.

Enums

Pair

A node T followed by the possible trailing TokenReference. Refer to the module documentation for more details.