Parameter

struct Parameter

A declared parameter — function, init, effect, or block argument. Mirrors the reference quirk: the span starts AFTER the name (the reference pushes its source location once the name is consumed); the name's own span rides along for the for-loop block-arg replacement.

Properties

let label_start: Int

The label token's span (the binder for name:, the underscore for _ name, or the external name for foo name); -1 = no label.

let label_end: Int

The exclusive ending byte offset of the label.

let name: String

The local binder name.

let name_start: Int

The inclusive starting byte offset of the name.

let name_end: Int

The exclusive ending byte offset of the name.

let mode: ParamMode?

The ownership or access mode, when explicitly written.

let mode_start: Int

The mode marker's span (consume mut spans both words); -1 = none.

let mode_end: Int

The exclusive ending byte offset of the mode.

let start: Int

The inclusive starting byte offset in the source.

let end: Int

The exclusive ending byte offset in the source.