mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-15 08:55:04 +01:00
refactorings
This commit is contained in:
parent
7eeaf548d0
commit
2f1f4a9798
12 changed files with 85 additions and 100 deletions
|
|
@ -92,7 +92,7 @@ export function tokenize(file: LoadedFile): Token[] {
|
|||
|
||||
finish: while (i < input.length) {
|
||||
const next = input[i];
|
||||
const span: Span = { start: i, end: i + 1, file };
|
||||
const span: Span = new Span(i, i + 1, file);
|
||||
|
||||
if (next === "/" && input[i + 1] === "/") {
|
||||
while (input[i] !== "\n") {
|
||||
|
|
@ -206,7 +206,7 @@ export function tokenize(file: LoadedFile): Token[] {
|
|||
default:
|
||||
throw new CompilerError(
|
||||
`invalid escape character: ${input[i]}`,
|
||||
{ start: span.end - 1, end: span.end, file }
|
||||
new Span(span.end - 1, span.end, file)
|
||||
);
|
||||
}
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue