Document Conventions
These are common syntaxes used in this document that refer to parts of the parser.
A name within chevrons (< >
) refers to one of these:
-
IDENT
Alphabetic character or underscore followed by alphanumeric characters or underscores. Short for 'identifier'.
Example
text # This is valid ✅ te_xt # This is valid ✅ _text # This is valid ✅ 42 # This is invalid ❌ 42text # This is invalid ❌ te xt # This is invalid ❌
-
DECLARATION
<IDENT> damn <TYPE>
More info about types is available here.
Example
identifier damn Number(x damn Number,)
-
A header with the same name, but different casing
A name within chevrons (< >
), and suffixed by horizontal ellipses (...
) refers to the below:
<IDENT...>
An arbitrary ( at least one ) number ofIDENT
is allowed, based on requirements.
A token suffixed by a question mark (?
) refers to the below:
-
<IDENT>?
AnIDENT
is optional. -
<IDENT...>?
An arbitrary number ofIDENT
is allowed, including 0. -
(<IDENT...>)?
Parantheses and everything within are optional.
A <TERM>
is an identifier, number, string or expression.