Skip to content

Commit db5aa42

Browse files
Cleanup for #531 (#535)
This fixes the things noted in #531 (mostly a draft PR so I don't forget): - [x] Double-check whether we need to parenthesize objects or literals in certain places. - Yes, we have to: - [x] objects - [ ] int and double literals - [x] Delete double-parens in stdlib (hotfixes from earlier).
1 parent 3a71933 commit db5aa42

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

effekt/shared/src/main/scala/effekt/generator/js/PrettyPrinter.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ object PrettyPrinter extends ParenPrettyPrinter {
4848
// to be used in really low precedence positions
4949
def toDocAsAtom(e: Expr): Doc = e match {
5050
case e: Variable => toDoc(e)
51-
case e: Object => toDoc(e)
5251
case e: ArrayLiteral => toDoc(e)
5352
case e: RawLiteral => toDoc(e)
5453
case e => parens(toDoc(e))

libraries/common/effekt.effekt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ extern io def inspect[R](value: R): Unit =
110110
// Strings
111111
// =======
112112
extern pure def infixConcat(s1: String, s2: String): String =
113-
js "((${s1}) + (${s2}))"
113+
js "${s1} + ${s2}"
114114
chez "(string-append ${s1} ${s2})"
115115
llvm """
116116
%spz = call %Pos @c_bytearray_concatenate(%Pos ${s1}, %Pos ${s2})

0 commit comments

Comments
 (0)