implement field accesses

This commit is contained in:
nora 2023-07-30 23:59:43 +02:00
parent 7f65dc0277
commit 2da011caf4
7 changed files with 224 additions and 96 deletions

View file

@ -18,6 +18,7 @@ export type DatalessToken =
| "]"
| ";"
| ":"
| "."
| ","
| "="
| "+"
@ -70,6 +71,7 @@ const SINGLE_PUNCT: string[] = [
"]",
";",
":",
".",
",",
"+",
"-",
@ -245,7 +247,7 @@ export function tokenize(input: string): Token[] {
} else if (isWhitespace(next)) {
// ignore
} else {
throw new CompilerError(`Invalid character: \`${next}\``, span);
throw new CompilerError(`invalid character: \`${next}\``, span);
}
}
}