Sigil Assignments

Current lexer sigils and their uses in the language.

Sigils are defined in the bcts crate (lexer.rs).

Single-Character Sigils

Punctuation

Adapt

Hash

Percent

Type Constructors / Modifiers

Arithmetic Operators

Structural

Braces (Balanced Pairs)

Earmuff Braces (Pipe-Delimited)

Asymmetric Braces (close with })

Two-Character Sigils

Arithmetic Variants - Optional (?)

Early-return none on overflow or division by zero.

Arithmetic Variants - Checked (!)

Early-return an error on overflow or division by zero.

Assignment Operators

Compound assignment, as bare arithmetic. Reserved, not yet used in parser.

Range

Comparison Operators

Other

Three-Character Sigils

Assignment Variants - Optional (?)

Compound assignment, as optional arithmetic. Reserved, not yet used in parser.

Assignment Variants - Checked (!)

Compound assignment, as checked arithmetic. Reserved, not yet used in parser. The lexer takes the longest sigil, so +!= is one sigil rather than + and !=; a != b is unaffected.

Available Characters

Characters not currently assigned as sigil start characters:

& \ ^ `

Note: _ is considered a word character (identifier start).

Spacing

What a sigil operator attaches to is decided by how it was written: one against both its neighbours or against neither goes between them, one against only what follows it is a prefix operator, and one against only what precedes it is a postfix operator. See Section 2.4 of the spec.