mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-15 00:45:04 +01:00
add eslint
This commit is contained in:
parent
e951cd5ee1
commit
12fcc4f1bb
11 changed files with 1237 additions and 26 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue