firefly-compiler 0.5.8 → 0.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -160,7 +160,7 @@ extend self: JsEmitter {
160
160
  emitLetDefinition(definition: DLet, mutable: Bool, async: Bool): String {
161
161
  let mutability = if(mutable) {"let"} else {"const"}
162
162
  let valueCode = self.emitTerm(definition.value, async)
163
- let assignmentCode = if(valueCode != "(void 0)") {" = " + valueCode} else {""}
163
+ let assignmentCode = if(!mutable || valueCode != "(void 0)") {" = " + valueCode} else {""}
164
164
  mutability + " " + escapeKeyword(definition.name) + assignmentCode + ";"
165
165
  }
166
166
 
@@ -710,7 +710,7 @@ const mutability_ = (mutable_
710
710
  ? "let"
711
711
  : "const");
712
712
  const valueCode_ = ff_compiler_JsEmitter.JsEmitter_emitTerm(self_, definition_.value_, async_);
713
- const assignmentCode_ = ((valueCode_ !== "(void 0)")
713
+ const assignmentCode_ = (((!mutable_) || (valueCode_ !== "(void 0)"))
714
714
  ? (" = " + valueCode_)
715
715
  : "");
716
716
  return ((((mutability_ + " ") + ff_compiler_JsEmitter.escapeKeyword_(definition_.name_)) + assignmentCode_) + ";")
@@ -2511,7 +2511,7 @@ const mutability_ = (mutable_
2511
2511
  ? "let"
2512
2512
  : "const");
2513
2513
  const valueCode_ = (await ff_compiler_JsEmitter.JsEmitter_emitTerm$(self_, definition_.value_, async_, $task));
2514
- const assignmentCode_ = ((valueCode_ !== "(void 0)")
2514
+ const assignmentCode_ = (((!mutable_) || (valueCode_ !== "(void 0)"))
2515
2515
  ? (" = " + valueCode_)
2516
2516
  : "");
2517
2517
  return ((((mutability_ + " ") + ff_compiler_JsEmitter.escapeKeyword_(definition_.name_)) + assignmentCode_) + ";")
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly compiler",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.5.8",
7
+ "version": "0.5.9",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly language support",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.5.8",
7
+ "version": "0.5.9",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"