This commit is contained in:
Yura Dupyn 2026-02-07 15:21:44 +01:00
parent d45207342c
commit cd84d74ec7
12 changed files with 581 additions and 569 deletions

View file

@ -1,8 +1,8 @@
import { Expr, ExprBinding, FieldAssignment, FieldPattern, MatchBranch, Pattern, ProductPattern } from '../value';
import { Cursor } from './cursor';
import { ExprScanError, exprStart, ExprStartToken, IdentifierKind, identifierScanner, isNextTokenExprStart, isNextTokenProductPatternStart, patternStart, PatternStartToken, skipWhitespaceAndComments } from './scanner';
import { char, CodePoint, SourceText, Span } from './source_text';
import { Result } from '../result';
import { Expr, ExprBinding, FieldAssignment, FieldPattern, MatchBranch, Pattern, ProductPattern } from '../expr';
// CONVENTION: Every parser is responsible to consume whitespace/comments at the end.
// Every parser is not responsible for cleaning up whitespace/comments at the start - only the final `parse` that's exposed to the public.
@ -465,3 +465,4 @@ export function parse(source: SourceText): Result<Expr, ParseError> {
return Result.error(e as ParseError);
}
}