mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-15 00:45:04 +01:00
parser
This commit is contained in:
parent
91b183c002
commit
4e95bc05a3
9 changed files with 640 additions and 132 deletions
|
|
@ -3,6 +3,13 @@ export type Span = {
|
|||
end: number;
|
||||
};
|
||||
|
||||
export function spanMerge(a: Span, b: Span): Span {
|
||||
return {
|
||||
start: Math.min(a.start, b.start),
|
||||
end: Math.max(a.end, b.end),
|
||||
};
|
||||
}
|
||||
|
||||
export class CompilerError extends Error {
|
||||
msg: string;
|
||||
span: Span;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue