import Code from "@/components/Code.astro";
Identifiers & Datatypes
Upper and lowercase letters carry different meaning when at the start of a word.
A Datatype must always start with an uppercase letter, and an identifier must start with either a lowercase letter or an underscore.
Identifier
Identifier = (underscore | lowercase_letter), identifier_letter*
identifier_letter = underscore | lowercase_letter | uppercase_letter | decimal_digit
<Code
thpcode={identifier _identifier _123 _many_letters camelCase}
/>
Datatype
Datatype = uppercase_letter, indentifier_letter*
<Code
thpcode={Datatype PDO WEIRD_DATATYPE}
/>
Keywords
The following are (currently) THP keywords:
<Code
thpcode={val var fun}
/>
Keywords are scanned first as identifiers, then transformed to their respective tokens.