mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-15 08:55:04 +01:00
minor cleanup
This commit is contained in:
parent
ba3a199249
commit
cc04638f1e
16 changed files with 22 additions and 21 deletions
|
|
@ -209,7 +209,7 @@ function resolveModule(
|
|||
|
||||
return { ...superFoldItem(item, this), defPath };
|
||||
},
|
||||
expr(expr) {
|
||||
expr(expr): Expr<Resolved> {
|
||||
switch (expr.kind) {
|
||||
case "block": {
|
||||
const prevScopeLength = scopes.length;
|
||||
|
|
@ -252,7 +252,7 @@ function resolveModule(
|
|||
|
||||
if (lhs.kind === "ident" || lhs.kind === "path") {
|
||||
const res =
|
||||
lhs.kind === "ident" ? resolveIdent(lhs.value) : lhs.res;
|
||||
lhs.kind === "ident" ? resolveIdent(lhs.value) : lhs.value.res;
|
||||
const segments =
|
||||
lhs.kind === "ident" ? [lhs.value.name] : lhs.segments;
|
||||
|
||||
|
|
@ -280,12 +280,12 @@ function resolveModule(
|
|||
}
|
||||
|
||||
const pathRes: Resolution = { kind: "item", id: pathResItem };
|
||||
|
||||
const span = lhs.span.merge(expr.field.span);
|
||||
return {
|
||||
kind: "path",
|
||||
segments: [...segments, expr.field.value],
|
||||
res: pathRes,
|
||||
span: lhs.span.merge(expr.field.span),
|
||||
value: { res: pathRes, span },
|
||||
span,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue