minor cleanup

This commit is contained in:
nora 2023-08-03 14:47:21 +02:00
parent ba3a199249
commit cc04638f1e
16 changed files with 22 additions and 21 deletions

View file

@ -428,7 +428,7 @@ function lowerExpr(
switch (lhs.kind) {
case "ident":
case "path": {
const res = lhs.kind === "path" ? lhs.res : lhs.value.res;
const { res } = lhs.value;
switch (res.kind) {
case "local": {
@ -510,7 +510,7 @@ function lowerExpr(
}
case "path":
case "ident": {
const res = expr.kind === "ident" ? expr.value.res : expr.res;
const { res } = expr.value;
switch (res.kind) {
case "local": {
@ -690,7 +690,7 @@ function lowerExpr(
todo("non constant calls");
}
const res = expr.lhs.kind === "ident" ? expr.lhs.value.res : expr.lhs.res;
const { res } = expr.lhs.value;
if (res.kind === "builtin") {
const assertArgs = (n: number) => {
if (expr.args.length !== n) throw new Error("nope");