Skip to content

Commit

Permalink
Undo
Browse files Browse the repository at this point in the history
  • Loading branch information
NeilKleistGao committed Dec 6, 2023
1 parent ee8d476 commit 3246845
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion shared/src/main/scala/mlscript/JSBackend.scala
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,12 @@ abstract class JSBackend(allowUnresolvedSymbols: Bool) {
case NoCases => if (isQuoted) L(createASTCall("NoCases", Nil)) else R(NoCases)
}

private def toJSOperator(op: Str) = op.takeWhile(_ =/= '.')
private def toJSOperator(op: Str) = op match {
case "+." => "+"
case "-." => "-"
case "*." => "*"
case _ => op
}

// * Desugar `Quoted` into AST constructor invokations.
// * e.g., `42 will be translated into Quoted(IntLit(42)),
Expand Down

0 comments on commit 3246845

Please sign in to comment.