add eslint

This commit is contained in:
nora 2023-07-31 14:11:51 +02:00
parent e951cd5ee1
commit 12fcc4f1bb
11 changed files with 1237 additions and 26 deletions

View file

@ -331,7 +331,7 @@ function lowerExpr(fcx: FuncContext, instrs: wasm.Instr[], expr: Expr) {
}
case "literal": {
switch (expr.value.kind) {
case "str":
case "str": {
const utf8 = encodeUtf8(expr.value.value);
const idx = appendData(fcx.cx, utf8);
@ -339,6 +339,7 @@ function lowerExpr(fcx: FuncContext, instrs: wasm.Instr[], expr: Expr) {
instrs.push({ kind: "i32.const", imm: utf8.length });
break;
}
case "int":
switch (expr.value.type) {
case "Int":
@ -573,11 +574,9 @@ function lowerExpr(fcx: FuncContext, instrs: wasm.Instr[], expr: Expr) {
// TODO: Actually do this instead of being naive.
const isPlace = (expr: Expr) =>
const _isPlace = (expr: Expr) =>
expr.kind === "ident" || expr.kind === "fieldAccess";
function project() {}
lowerExpr(fcx, instrs, expr.lhs);
switch (expr.lhs.ty!.kind) {