purus 0.9.1 → 0.10.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "purus",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "description": "Purus - /ˈpuː.rus/ means pure✨ in Latin - is a beautiful, simple, and easy-to-use language. It compiles to JavaScript. It makes your fingers free from the Shift key. With Purus, you can write code almost without pressing the Shift key.",
5
5
  "main": "pkg/index.js",
6
6
  "module": "pkg/index.mjs",
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "homepage": "https://purus.work",
63
63
  "engines": {
64
- "node": ">=18"
64
+ "node": ">=20"
65
65
  },
66
66
  "devDependencies": {
67
67
  "prettier": "^3.8.1"
@@ -753,150 +753,157 @@ function _M0DTP48username4core3src6parser4Stmt15ObjDestructDecl(param0, param1,
753
753
  this._2 = param2;
754
754
  }
755
755
  _M0DTP48username4core3src6parser4Stmt15ObjDestructDecl.prototype.$tag = 2;
756
+ function _M0DTP48username4core3src6parser4Stmt13DottedVarInit(param0, param1, param2, param3) {
757
+ this._0 = param0;
758
+ this._1 = param1;
759
+ this._2 = param2;
760
+ this._3 = param3;
761
+ }
762
+ _M0DTP48username4core3src6parser4Stmt13DottedVarInit.prototype.$tag = 3;
756
763
  function _M0DTP48username4core3src6parser4Stmt6Assign(param0, param1) {
757
764
  this._0 = param0;
758
765
  this._1 = param1;
759
766
  }
760
- _M0DTP48username4core3src6parser4Stmt6Assign.prototype.$tag = 3;
767
+ _M0DTP48username4core3src6parser4Stmt6Assign.prototype.$tag = 4;
761
768
  function _M0DTP48username4core3src6parser4Stmt14CompoundAssign(param0, param1, param2) {
762
769
  this._0 = param0;
763
770
  this._1 = param1;
764
771
  this._2 = param2;
765
772
  }
766
- _M0DTP48username4core3src6parser4Stmt14CompoundAssign.prototype.$tag = 4;
773
+ _M0DTP48username4core3src6parser4Stmt14CompoundAssign.prototype.$tag = 5;
767
774
  function _M0DTP48username4core3src6parser4Stmt6FnDecl(param0) {
768
775
  this._0 = param0;
769
776
  }
770
- _M0DTP48username4core3src6parser4Stmt6FnDecl.prototype.$tag = 5;
777
+ _M0DTP48username4core3src6parser4Stmt6FnDecl.prototype.$tag = 6;
771
778
  function _M0DTP48username4core3src6parser4Stmt2If(param0, param1, param2, param3) {
772
779
  this._0 = param0;
773
780
  this._1 = param1;
774
781
  this._2 = param2;
775
782
  this._3 = param3;
776
783
  }
777
- _M0DTP48username4core3src6parser4Stmt2If.prototype.$tag = 6;
784
+ _M0DTP48username4core3src6parser4Stmt2If.prototype.$tag = 7;
778
785
  function _M0DTP48username4core3src6parser4Stmt6Unless(param0, param1) {
779
786
  this._0 = param0;
780
787
  this._1 = param1;
781
788
  }
782
- _M0DTP48username4core3src6parser4Stmt6Unless.prototype.$tag = 7;
789
+ _M0DTP48username4core3src6parser4Stmt6Unless.prototype.$tag = 8;
783
790
  function _M0DTP48username4core3src6parser4Stmt5While(param0, param1) {
784
791
  this._0 = param0;
785
792
  this._1 = param1;
786
793
  }
787
- _M0DTP48username4core3src6parser4Stmt5While.prototype.$tag = 8;
794
+ _M0DTP48username4core3src6parser4Stmt5While.prototype.$tag = 9;
788
795
  function _M0DTP48username4core3src6parser4Stmt5Until(param0, param1) {
789
796
  this._0 = param0;
790
797
  this._1 = param1;
791
798
  }
792
- _M0DTP48username4core3src6parser4Stmt5Until.prototype.$tag = 9;
799
+ _M0DTP48username4core3src6parser4Stmt5Until.prototype.$tag = 10;
793
800
  function _M0DTP48username4core3src6parser4Stmt7DoWhile(param0, param1) {
794
801
  this._0 = param0;
795
802
  this._1 = param1;
796
803
  }
797
- _M0DTP48username4core3src6parser4Stmt7DoWhile.prototype.$tag = 10;
804
+ _M0DTP48username4core3src6parser4Stmt7DoWhile.prototype.$tag = 11;
798
805
  function _M0DTP48username4core3src6parser4Stmt5ForIn(param0, param1, param2, param3) {
799
806
  this._0 = param0;
800
807
  this._1 = param1;
801
808
  this._2 = param2;
802
809
  this._3 = param3;
803
810
  }
804
- _M0DTP48username4core3src6parser4Stmt5ForIn.prototype.$tag = 11;
811
+ _M0DTP48username4core3src6parser4Stmt5ForIn.prototype.$tag = 12;
805
812
  function _M0DTP48username4core3src6parser4Stmt8ForRange(param0, param1, param2, param3) {
806
813
  this._0 = param0;
807
814
  this._1 = param1;
808
815
  this._2 = param2;
809
816
  this._3 = param3;
810
817
  }
811
- _M0DTP48username4core3src6parser4Stmt8ForRange.prototype.$tag = 12;
818
+ _M0DTP48username4core3src6parser4Stmt8ForRange.prototype.$tag = 13;
812
819
  function _M0DTP48username4core3src6parser4Stmt10ForClassic(param0, param1, param2, param3) {
813
820
  this._0 = param0;
814
821
  this._1 = param1;
815
822
  this._2 = param2;
816
823
  this._3 = param3;
817
824
  }
818
- _M0DTP48username4core3src6parser4Stmt10ForClassic.prototype.$tag = 13;
825
+ _M0DTP48username4core3src6parser4Stmt10ForClassic.prototype.$tag = 14;
819
826
  function _M0DTP48username4core3src6parser4Stmt9MatchStmt(param0, param1) {
820
827
  this._0 = param0;
821
828
  this._1 = param1;
822
829
  }
823
- _M0DTP48username4core3src6parser4Stmt9MatchStmt.prototype.$tag = 14;
830
+ _M0DTP48username4core3src6parser4Stmt9MatchStmt.prototype.$tag = 15;
824
831
  function _M0DTP48username4core3src6parser4Stmt9PostfixIf(param0, param1) {
825
832
  this._0 = param0;
826
833
  this._1 = param1;
827
834
  }
828
- _M0DTP48username4core3src6parser4Stmt9PostfixIf.prototype.$tag = 15;
835
+ _M0DTP48username4core3src6parser4Stmt9PostfixIf.prototype.$tag = 16;
829
836
  function _M0DTP48username4core3src6parser4Stmt13PostfixUnless(param0, param1) {
830
837
  this._0 = param0;
831
838
  this._1 = param1;
832
839
  }
833
- _M0DTP48username4core3src6parser4Stmt13PostfixUnless.prototype.$tag = 16;
840
+ _M0DTP48username4core3src6parser4Stmt13PostfixUnless.prototype.$tag = 17;
834
841
  function _M0DTP48username4core3src6parser4Stmt10PostfixFor(param0, param1, param2) {
835
842
  this._0 = param0;
836
843
  this._1 = param1;
837
844
  this._2 = param2;
838
845
  }
839
- _M0DTP48username4core3src6parser4Stmt10PostfixFor.prototype.$tag = 17;
846
+ _M0DTP48username4core3src6parser4Stmt10PostfixFor.prototype.$tag = 18;
840
847
  function _M0DTP48username4core3src6parser4Stmt8TryCatch(param0, param1, param2, param3) {
841
848
  this._0 = param0;
842
849
  this._1 = param1;
843
850
  this._2 = param2;
844
851
  this._3 = param3;
845
852
  }
846
- _M0DTP48username4core3src6parser4Stmt8TryCatch.prototype.$tag = 18;
853
+ _M0DTP48username4core3src6parser4Stmt8TryCatch.prototype.$tag = 19;
847
854
  function _M0DTP48username4core3src6parser4Stmt5Throw(param0) {
848
855
  this._0 = param0;
849
856
  }
850
- _M0DTP48username4core3src6parser4Stmt5Throw.prototype.$tag = 19;
857
+ _M0DTP48username4core3src6parser4Stmt5Throw.prototype.$tag = 20;
851
858
  function _M0DTP48username4core3src6parser4Stmt6Return(param0) {
852
859
  this._0 = param0;
853
860
  }
854
- _M0DTP48username4core3src6parser4Stmt6Return.prototype.$tag = 20;
861
+ _M0DTP48username4core3src6parser4Stmt6Return.prototype.$tag = 21;
855
862
  function _M0DTP48username4core3src6parser4Stmt5Break() {}
856
- _M0DTP48username4core3src6parser4Stmt5Break.prototype.$tag = 21;
863
+ _M0DTP48username4core3src6parser4Stmt5Break.prototype.$tag = 22;
857
864
  const _M0DTP48username4core3src6parser4Stmt5Break__ = new _M0DTP48username4core3src6parser4Stmt5Break();
858
865
  function _M0DTP48username4core3src6parser4Stmt8Continue() {}
859
- _M0DTP48username4core3src6parser4Stmt8Continue.prototype.$tag = 22;
866
+ _M0DTP48username4core3src6parser4Stmt8Continue.prototype.$tag = 23;
860
867
  const _M0DTP48username4core3src6parser4Stmt8Continue__ = new _M0DTP48username4core3src6parser4Stmt8Continue();
861
868
  function _M0DTP48username4core3src6parser4Stmt8ExprStmt(param0) {
862
869
  this._0 = param0;
863
870
  }
864
- _M0DTP48username4core3src6parser4Stmt8ExprStmt.prototype.$tag = 23;
871
+ _M0DTP48username4core3src6parser4Stmt8ExprStmt.prototype.$tag = 24;
865
872
  function _M0DTP48username4core3src6parser4Stmt10ImportDecl(param0) {
866
873
  this._0 = param0;
867
874
  }
868
- _M0DTP48username4core3src6parser4Stmt10ImportDecl.prototype.$tag = 24;
875
+ _M0DTP48username4core3src6parser4Stmt10ImportDecl.prototype.$tag = 25;
869
876
  function _M0DTP48username4core3src6parser4Stmt9UseStdlib(param0, param1) {
870
877
  this._0 = param0;
871
878
  this._1 = param1;
872
879
  }
873
- _M0DTP48username4core3src6parser4Stmt9UseStdlib.prototype.$tag = 25;
880
+ _M0DTP48username4core3src6parser4Stmt9UseStdlib.prototype.$tag = 26;
874
881
  function _M0DTP48username4core3src6parser4Stmt7ModDecl(param0, param1) {
875
882
  this._0 = param0;
876
883
  this._1 = param1;
877
884
  }
878
- _M0DTP48username4core3src6parser4Stmt7ModDecl.prototype.$tag = 26;
885
+ _M0DTP48username4core3src6parser4Stmt7ModDecl.prototype.$tag = 27;
879
886
  function _M0DTP48username4core3src6parser4Stmt13ExportDefault(param0) {
880
887
  this._0 = param0;
881
888
  }
882
- _M0DTP48username4core3src6parser4Stmt13ExportDefault.prototype.$tag = 27;
889
+ _M0DTP48username4core3src6parser4Stmt13ExportDefault.prototype.$tag = 28;
883
890
  function _M0DTP48username4core3src6parser4Stmt10PublicDecl(param0) {
884
891
  this._0 = param0;
885
892
  }
886
- _M0DTP48username4core3src6parser4Stmt10PublicDecl.prototype.$tag = 28;
893
+ _M0DTP48username4core3src6parser4Stmt10PublicDecl.prototype.$tag = 29;
887
894
  function _M0DTP48username4core3src6parser4Stmt8TypeDecl(param0, param1) {
888
895
  this._0 = param0;
889
896
  this._1 = param1;
890
897
  }
891
- _M0DTP48username4core3src6parser4Stmt8TypeDecl.prototype.$tag = 29;
898
+ _M0DTP48username4core3src6parser4Stmt8TypeDecl.prototype.$tag = 30;
892
899
  function _M0DTP48username4core3src6parser4Stmt9ClassDecl(param0) {
893
900
  this._0 = param0;
894
901
  }
895
- _M0DTP48username4core3src6parser4Stmt9ClassDecl.prototype.$tag = 30;
902
+ _M0DTP48username4core3src6parser4Stmt9ClassDecl.prototype.$tag = 31;
896
903
  function _M0DTP48username4core3src6parser4Stmt10DeleteStmt(param0) {
897
904
  this._0 = param0;
898
905
  }
899
- _M0DTP48username4core3src6parser4Stmt10DeleteStmt.prototype.$tag = 31;
906
+ _M0DTP48username4core3src6parser4Stmt10DeleteStmt.prototype.$tag = 32;
900
907
  function _M0TPB8MutLocalGRP48username4core3src6parser4ExprE(param0) {
901
908
  this.val = param0;
902
909
  }
@@ -1031,11 +1038,12 @@ function _M0TPB8MutLocalGOsE(param0) {
1031
1038
  function _M0TPB8MutLocalGRPB5ArrayGRP48username4core3src6parser4StmtEE(param0) {
1032
1039
  this.val = param0;
1033
1040
  }
1034
- function _M0TP48username4core3src7codegen9JsCodegen(param0, param1, param2, param3) {
1041
+ function _M0TP48username4core3src7codegen9JsCodegen(param0, param1, param2, param3, param4) {
1035
1042
  this.buf = param0;
1036
1043
  this.indent_level = param1;
1037
1044
  this.private_fields = param2;
1038
- this.cjs = param3;
1045
+ this.declared_vars = param3;
1046
+ this.cjs = param4;
1039
1047
  }
1040
1048
  function _M0TPB8MutLocalGsE(param0) {
1041
1049
  this.val = param0;
@@ -5346,7 +5354,11 @@ function _M0MP48username4core3src6parser6Parser11parse__stmt(self) {
5346
5354
  case 11: {
5347
5355
  self.pos = self.pos + 1 | 0;
5348
5356
  const value = _M0MP48username4core3src6parser6Parser11parse__expr(self);
5349
- return _M0MP48username4core3src6parser6Parser14maybe__postfix(self, new _M0DTP48username4core3src6parser4Stmt6Assign(expr$2, value));
5357
+ if (expr$2.$tag === 15) {
5358
+ return new _M0DTP48username4core3src6parser4Stmt8ExprStmt(expr$2);
5359
+ } else {
5360
+ return _M0MP48username4core3src6parser6Parser14maybe__postfix(self, new _M0DTP48username4core3src6parser4Stmt6Assign(expr$2, value));
5361
+ }
5350
5362
  }
5351
5363
  default: {
5352
5364
  return _M0MP48username4core3src6parser6Parser14maybe__postfix(self, new _M0DTP48username4core3src6parser4Stmt8ExprStmt(expr$2));
@@ -5956,7 +5968,7 @@ function _M0MP48username4core3src6parser6Parser16parse__var__decl(self, kind) {
5956
5968
  }
5957
5969
  _M0MP48username4core3src6parser6Parser6expect(self, _M0DTP48username4core3src5lexer9TokenKind2Be__);
5958
5970
  const value = _M0MP48username4core3src6parser6Parser11parse__expr(self);
5959
- return _M0MP48username4core3src6parser6Parser14maybe__postfix(self, new _M0DTP48username4core3src6parser4Stmt6Assign(new _M0DTP48username4core3src6parser4Expr9DotAccess(new _M0DTP48username4core3src6parser4Expr5Ident(name), prop), value));
5971
+ return _M0MP48username4core3src6parser6Parser14maybe__postfix(self, new _M0DTP48username4core3src6parser4Stmt13DottedVarInit(kind, name, prop, value));
5960
5972
  }
5961
5973
  if (_M0IP48username4core3src5lexer9TokenKindPB2Eq5equal(_M0MP48username4core3src6parser6Parser4peek(self), _M0DTP48username4core3src5lexer9TokenKind2Of__)) {
5962
5974
  self.pos = self.pos + 1 | 0;
@@ -7120,151 +7132,161 @@ function _M0FP48username4core3src7codegen16stmt__has__yield(stmt) {
7120
7132
  _L$10: {
7121
7133
  let e$2;
7122
7134
  _L$11: {
7123
- switch (stmt$2.$tag) {
7124
- case 23: {
7125
- const _ExprStmt = stmt$2;
7126
- const _e = _ExprStmt._0;
7127
- e$2 = _e;
7128
- break _L$11;
7129
- }
7130
- case 20: {
7131
- const _Return = stmt$2;
7132
- const _x = _Return._0;
7133
- if (_x === undefined) {
7134
- return false;
7135
- } else {
7136
- const _Some = _x;
7137
- const _e$2 = _Some;
7138
- e$2 = _e$2;
7135
+ let e$3;
7136
+ _L$12: {
7137
+ switch (stmt$2.$tag) {
7138
+ case 24: {
7139
+ const _ExprStmt = stmt$2;
7140
+ const _e = _ExprStmt._0;
7141
+ e$3 = _e;
7142
+ break _L$12;
7143
+ }
7144
+ case 21: {
7145
+ const _Return = stmt$2;
7146
+ const _x = _Return._0;
7147
+ if (_x === undefined) {
7148
+ return false;
7149
+ } else {
7150
+ const _Some = _x;
7151
+ const _e$2 = _Some;
7152
+ e$3 = _e$2;
7153
+ break _L$12;
7154
+ }
7155
+ }
7156
+ case 20: {
7157
+ const _Throw = stmt$2;
7158
+ const _e$2 = _Throw._0;
7159
+ e$3 = _e$2;
7160
+ break _L$12;
7161
+ }
7162
+ case 32: {
7163
+ const _DeleteStmt = stmt$2;
7164
+ const _e$3 = _DeleteStmt._0;
7165
+ e$3 = _e$3;
7166
+ break _L$12;
7167
+ }
7168
+ case 0: {
7169
+ const _VarDecl = stmt$2;
7170
+ const _e$4 = _VarDecl._2;
7171
+ e$2 = _e$4;
7139
7172
  break _L$11;
7140
7173
  }
7141
- }
7142
- case 19: {
7143
- const _Throw = stmt$2;
7144
- const _e$2 = _Throw._0;
7145
- e$2 = _e$2;
7146
- break _L$11;
7147
- }
7148
- case 31: {
7149
- const _DeleteStmt = stmt$2;
7150
- const _e$3 = _DeleteStmt._0;
7151
- e$2 = _e$3;
7152
- break _L$11;
7153
- }
7154
- case 0: {
7155
- const _VarDecl = stmt$2;
7156
- const _e$4 = _VarDecl._2;
7157
- e = _e$4;
7158
- break _L$10;
7159
- }
7160
- case 3: {
7161
- const _Assign = stmt$2;
7162
- const _e$5 = _Assign._1;
7163
- e = _e$5;
7164
- break _L$10;
7165
- }
7166
- case 6: {
7167
- const _If = stmt$2;
7168
- const _cond = _If._0;
7169
- const _body = _If._1;
7170
- const _elifs = _If._2;
7171
- const _else_body = _If._3;
7172
- elifs = _elifs;
7173
- cond$3 = _cond;
7174
- body$4 = _body;
7175
- else_body = _else_body;
7176
- break _L$9;
7177
- }
7178
- case 8: {
7179
- const _While = stmt$2;
7180
- const _cond$2 = _While._0;
7181
- const _body$2 = _While._1;
7182
- body$3 = _body$2;
7183
- cond$2 = _cond$2;
7184
- break _L$8;
7185
- }
7186
- case 9: {
7187
- const _Until = stmt$2;
7188
- const _cond$3 = _Until._0;
7189
- const _body$3 = _Until._1;
7190
- body$3 = _body$3;
7191
- cond$2 = _cond$3;
7192
- break _L$8;
7193
- }
7194
- case 10: {
7195
- const _DoWhile = stmt$2;
7196
- const _cond$4 = _DoWhile._0;
7197
- const _body$4 = _DoWhile._1;
7198
- body$3 = _body$4;
7199
- cond$2 = _cond$4;
7200
- break _L$8;
7201
- }
7202
- case 11: {
7203
- const _ForIn = stmt$2;
7204
- const _iter = _ForIn._2;
7205
- const _body$5 = _ForIn._3;
7206
- iter = _iter;
7207
- body$2 = _body$5;
7208
- break _L$7;
7209
- }
7210
- case 12: {
7211
- const _ForRange = stmt$2;
7212
- const _start = _ForRange._1;
7213
- const _end = _ForRange._2;
7214
- const _body$6 = _ForRange._3;
7215
- end = _end;
7216
- start = _start;
7217
- body = _body$6;
7218
- break _L$6;
7219
- }
7220
- case 18: {
7221
- const _TryCatch = stmt$2;
7222
- const _try_body = _TryCatch._0;
7223
- const _catch_body = _TryCatch._2;
7224
- const _finally_body = _TryCatch._3;
7225
- catch_body = _catch_body;
7226
- try_body = _try_body;
7227
- finally_body = _finally_body;
7228
- break _L$5;
7229
- }
7230
- case 15: {
7231
- const _PostfixIf = stmt$2;
7232
- const _s = _PostfixIf._0;
7233
- const _cond$5 = _PostfixIf._1;
7234
- cond = _cond$5;
7235
- s$3 = _s;
7236
- break _L$4;
7237
- }
7238
- case 16: {
7239
- const _PostfixUnless = stmt$2;
7240
- const _s$2 = _PostfixUnless._0;
7241
- const _cond$6 = _PostfixUnless._1;
7242
- cond = _cond$6;
7243
- s$3 = _s$2;
7244
- break _L$4;
7245
- }
7246
- case 17: {
7247
- const _PostfixFor = stmt$2;
7248
- const _s$3 = _PostfixFor._0;
7249
- s$2 = _s$3;
7250
- break _L$3;
7251
- }
7252
- case 27: {
7253
- const _ExportDefault = stmt$2;
7254
- const _s$4 = _ExportDefault._0;
7255
- s = _s$4;
7256
- break _L$2;
7257
- }
7258
- case 28: {
7259
- const _PublicDecl = stmt$2;
7260
- const _s$5 = _PublicDecl._0;
7261
- s = _s$5;
7262
- break _L$2;
7263
- }
7264
- default: {
7265
- return false;
7174
+ case 4: {
7175
+ const _Assign = stmt$2;
7176
+ const _e$5 = _Assign._1;
7177
+ e$2 = _e$5;
7178
+ break _L$11;
7179
+ }
7180
+ case 3: {
7181
+ const _DottedVarInit = stmt$2;
7182
+ const _e$6 = _DottedVarInit._3;
7183
+ e = _e$6;
7184
+ break _L$10;
7185
+ }
7186
+ case 7: {
7187
+ const _If = stmt$2;
7188
+ const _cond = _If._0;
7189
+ const _body = _If._1;
7190
+ const _elifs = _If._2;
7191
+ const _else_body = _If._3;
7192
+ elifs = _elifs;
7193
+ cond$3 = _cond;
7194
+ body$4 = _body;
7195
+ else_body = _else_body;
7196
+ break _L$9;
7197
+ }
7198
+ case 9: {
7199
+ const _While = stmt$2;
7200
+ const _cond$2 = _While._0;
7201
+ const _body$2 = _While._1;
7202
+ body$3 = _body$2;
7203
+ cond$2 = _cond$2;
7204
+ break _L$8;
7205
+ }
7206
+ case 10: {
7207
+ const _Until = stmt$2;
7208
+ const _cond$3 = _Until._0;
7209
+ const _body$3 = _Until._1;
7210
+ body$3 = _body$3;
7211
+ cond$2 = _cond$3;
7212
+ break _L$8;
7213
+ }
7214
+ case 11: {
7215
+ const _DoWhile = stmt$2;
7216
+ const _cond$4 = _DoWhile._0;
7217
+ const _body$4 = _DoWhile._1;
7218
+ body$3 = _body$4;
7219
+ cond$2 = _cond$4;
7220
+ break _L$8;
7221
+ }
7222
+ case 12: {
7223
+ const _ForIn = stmt$2;
7224
+ const _iter = _ForIn._2;
7225
+ const _body$5 = _ForIn._3;
7226
+ iter = _iter;
7227
+ body$2 = _body$5;
7228
+ break _L$7;
7229
+ }
7230
+ case 13: {
7231
+ const _ForRange = stmt$2;
7232
+ const _start = _ForRange._1;
7233
+ const _end = _ForRange._2;
7234
+ const _body$6 = _ForRange._3;
7235
+ end = _end;
7236
+ start = _start;
7237
+ body = _body$6;
7238
+ break _L$6;
7239
+ }
7240
+ case 19: {
7241
+ const _TryCatch = stmt$2;
7242
+ const _try_body = _TryCatch._0;
7243
+ const _catch_body = _TryCatch._2;
7244
+ const _finally_body = _TryCatch._3;
7245
+ catch_body = _catch_body;
7246
+ try_body = _try_body;
7247
+ finally_body = _finally_body;
7248
+ break _L$5;
7249
+ }
7250
+ case 16: {
7251
+ const _PostfixIf = stmt$2;
7252
+ const _s = _PostfixIf._0;
7253
+ const _cond$5 = _PostfixIf._1;
7254
+ cond = _cond$5;
7255
+ s$3 = _s;
7256
+ break _L$4;
7257
+ }
7258
+ case 17: {
7259
+ const _PostfixUnless = stmt$2;
7260
+ const _s$2 = _PostfixUnless._0;
7261
+ const _cond$6 = _PostfixUnless._1;
7262
+ cond = _cond$6;
7263
+ s$3 = _s$2;
7264
+ break _L$4;
7265
+ }
7266
+ case 18: {
7267
+ const _PostfixFor = stmt$2;
7268
+ const _s$3 = _PostfixFor._0;
7269
+ s$2 = _s$3;
7270
+ break _L$3;
7271
+ }
7272
+ case 28: {
7273
+ const _ExportDefault = stmt$2;
7274
+ const _s$4 = _ExportDefault._0;
7275
+ s = _s$4;
7276
+ break _L$2;
7277
+ }
7278
+ case 29: {
7279
+ const _PublicDecl = stmt$2;
7280
+ const _s$5 = _PublicDecl._0;
7281
+ s = _s$5;
7282
+ break _L$2;
7283
+ }
7284
+ default: {
7285
+ return false;
7286
+ }
7266
7287
  }
7267
7288
  }
7289
+ return _M0FP48username4core3src7codegen16expr__has__yield(e$3);
7268
7290
  }
7269
7291
  return _M0FP48username4core3src7codegen16expr__has__yield(e$2);
7270
7292
  }
@@ -8784,267 +8806,308 @@ function _M0MP48username4core3src7codegen9JsCodegen9gen__stmt(self, stmt) {
8784
8806
  let kind$2;
8785
8807
  let value$5;
8786
8808
  _L$28: {
8787
- let name$5;
8809
+ let prop;
8788
8810
  let kind$3;
8811
+ let obj_name;
8789
8812
  let value$6;
8790
8813
  _L$29: {
8791
- switch (stmt.$tag) {
8814
+ let name$5;
8815
+ let kind$4;
8816
+ let value$7;
8817
+ _L$30: {
8818
+ switch (stmt.$tag) {
8819
+ case 0: {
8820
+ const _VarDecl = stmt;
8821
+ const _kind = _VarDecl._0;
8822
+ const _name = _VarDecl._1;
8823
+ const _value = _VarDecl._2;
8824
+ name$5 = _name;
8825
+ kind$4 = _kind;
8826
+ value$7 = _value;
8827
+ break _L$30;
8828
+ }
8829
+ case 3: {
8830
+ const _DottedVarInit = stmt;
8831
+ const _kind$2 = _DottedVarInit._0;
8832
+ const _obj_name = _DottedVarInit._1;
8833
+ const _prop = _DottedVarInit._2;
8834
+ const _value$2 = _DottedVarInit._3;
8835
+ prop = _prop;
8836
+ kind$3 = _kind$2;
8837
+ obj_name = _obj_name;
8838
+ value$6 = _value$2;
8839
+ break _L$29;
8840
+ }
8841
+ case 1: {
8842
+ const _DestructDecl = stmt;
8843
+ const _kind$3 = _DestructDecl._0;
8844
+ const _names = _DestructDecl._1;
8845
+ const _value$3 = _DestructDecl._2;
8846
+ names$2 = _names;
8847
+ kind$2 = _kind$3;
8848
+ value$5 = _value$3;
8849
+ break _L$28;
8850
+ }
8851
+ case 2: {
8852
+ const _ObjDestructDecl = stmt;
8853
+ const _kind$4 = _ObjDestructDecl._0;
8854
+ const _names$2 = _ObjDestructDecl._1;
8855
+ const _value$4 = _ObjDestructDecl._2;
8856
+ names = _names$2;
8857
+ kind = _kind$4;
8858
+ value$4 = _value$4;
8859
+ break _L$27;
8860
+ }
8861
+ case 4: {
8862
+ const _Assign = stmt;
8863
+ const _target = _Assign._0;
8864
+ const _value$5 = _Assign._1;
8865
+ target$2 = _target;
8866
+ value$3 = _value$5;
8867
+ break _L$26;
8868
+ }
8869
+ case 5: {
8870
+ const _CompoundAssign = stmt;
8871
+ const _op = _CompoundAssign._0;
8872
+ const _target$2 = _CompoundAssign._1;
8873
+ const _value$6 = _CompoundAssign._2;
8874
+ target = _target$2;
8875
+ op = _op;
8876
+ value$2 = _value$6;
8877
+ break _L$25;
8878
+ }
8879
+ case 6: {
8880
+ const _FnDecl = stmt;
8881
+ const _decl = _FnDecl._0;
8882
+ decl$3 = _decl;
8883
+ break _L$24;
8884
+ }
8885
+ case 7: {
8886
+ const _If = stmt;
8887
+ const _cond = _If._0;
8888
+ const _body = _If._1;
8889
+ const _elifs = _If._2;
8890
+ const _else_body = _If._3;
8891
+ elifs = _elifs;
8892
+ cond$8 = _cond;
8893
+ body$9 = _body;
8894
+ else_body = _else_body;
8895
+ break _L$23;
8896
+ }
8897
+ case 8: {
8898
+ const _Unless = stmt;
8899
+ const _cond$2 = _Unless._0;
8900
+ const _body$2 = _Unless._1;
8901
+ cond$7 = _cond$2;
8902
+ body$8 = _body$2;
8903
+ break _L$22;
8904
+ }
8905
+ case 9: {
8906
+ const _While = stmt;
8907
+ const _cond$3 = _While._0;
8908
+ const _body$3 = _While._1;
8909
+ cond$6 = _cond$3;
8910
+ body$7 = _body$3;
8911
+ break _L$21;
8912
+ }
8913
+ case 10: {
8914
+ const _Until = stmt;
8915
+ const _cond$4 = _Until._0;
8916
+ const _body$4 = _Until._1;
8917
+ cond$5 = _cond$4;
8918
+ body$6 = _body$4;
8919
+ break _L$20;
8920
+ }
8921
+ case 11: {
8922
+ const _DoWhile = stmt;
8923
+ const _cond$5 = _DoWhile._0;
8924
+ const _body$5 = _DoWhile._1;
8925
+ cond$4 = _cond$5;
8926
+ body$5 = _body$5;
8927
+ break _L$19;
8928
+ }
8929
+ case 12: {
8930
+ const _ForIn = stmt;
8931
+ const _name$2 = _ForIn._0;
8932
+ const _index = _ForIn._1;
8933
+ const _iter = _ForIn._2;
8934
+ const _body$6 = _ForIn._3;
8935
+ iter$2 = _iter;
8936
+ name$4 = _name$2;
8937
+ index = _index;
8938
+ body$4 = _body$6;
8939
+ break _L$18;
8940
+ }
8941
+ case 13: {
8942
+ const _ForRange = stmt;
8943
+ const _name$3 = _ForRange._0;
8944
+ const _start = _ForRange._1;
8945
+ const _end = _ForRange._2;
8946
+ const _body$7 = _ForRange._3;
8947
+ end = _end;
8948
+ name$3 = _name$3;
8949
+ start = _start;
8950
+ body$3 = _body$7;
8951
+ break _L$17;
8952
+ }
8953
+ case 14: {
8954
+ const _ForClassic = stmt;
8955
+ const _init = _ForClassic._0;
8956
+ const _cond$6 = _ForClassic._1;
8957
+ const _update = _ForClassic._2;
8958
+ const _body$8 = _ForClassic._3;
8959
+ update = _update;
8960
+ init = _init;
8961
+ cond$3 = _cond$6;
8962
+ body$2 = _body$8;
8963
+ break _L$16;
8964
+ }
8965
+ case 15: {
8966
+ const _MatchStmt = stmt;
8967
+ const _subject = _MatchStmt._0;
8968
+ const _arms = _MatchStmt._1;
8969
+ subject = _subject;
8970
+ arms = _arms;
8971
+ break _L$15;
8972
+ }
8973
+ case 16: {
8974
+ const _PostfixIf = stmt;
8975
+ const _inner = _PostfixIf._0;
8976
+ const _cond$7 = _PostfixIf._1;
8977
+ inner$5 = _inner;
8978
+ cond$2 = _cond$7;
8979
+ break _L$14;
8980
+ }
8981
+ case 17: {
8982
+ const _PostfixUnless = stmt;
8983
+ const _inner$2 = _PostfixUnless._0;
8984
+ const _cond$8 = _PostfixUnless._1;
8985
+ inner$4 = _inner$2;
8986
+ cond = _cond$8;
8987
+ break _L$13;
8988
+ }
8989
+ case 18: {
8990
+ const _PostfixFor = stmt;
8991
+ const _inner$3 = _PostfixFor._0;
8992
+ const _name$4 = _PostfixFor._1;
8993
+ const _iter$2 = _PostfixFor._2;
8994
+ name$2 = _name$4;
8995
+ inner$3 = _inner$3;
8996
+ iter = _iter$2;
8997
+ break _L$12;
8998
+ }
8999
+ case 19: {
9000
+ const _TryCatch = stmt;
9001
+ const _try_body = _TryCatch._0;
9002
+ const _catch_name = _TryCatch._1;
9003
+ const _catch_body = _TryCatch._2;
9004
+ const _finally_body = _TryCatch._3;
9005
+ catch_body = _catch_body;
9006
+ try_body = _try_body;
9007
+ catch_name = _catch_name;
9008
+ finally_body = _finally_body;
9009
+ break _L$11;
9010
+ }
9011
+ case 20: {
9012
+ const _Throw = stmt;
9013
+ const _expr = _Throw._0;
9014
+ expr$3 = _expr;
9015
+ break _L$10;
9016
+ }
9017
+ case 21: {
9018
+ const _Return = stmt;
9019
+ const _value$7 = _Return._0;
9020
+ value = _value$7;
9021
+ break _L$9;
9022
+ }
9023
+ case 22: {
9024
+ _M0MP48username4core3src7codegen9JsCodegen7writeln(self, "break;");
9025
+ return;
9026
+ }
9027
+ case 23: {
9028
+ _M0MP48username4core3src7codegen9JsCodegen7writeln(self, "continue;");
9029
+ return;
9030
+ }
9031
+ case 24: {
9032
+ const _ExprStmt = stmt;
9033
+ const _expr$2 = _ExprStmt._0;
9034
+ expr$2 = _expr$2;
9035
+ break _L$8;
9036
+ }
9037
+ case 25: {
9038
+ const _ImportDecl = stmt;
9039
+ const _decl$2 = _ImportDecl._0;
9040
+ decl$2 = _decl$2;
9041
+ break _L$7;
9042
+ }
9043
+ case 26: {
9044
+ const _UseStdlib = stmt;
9045
+ const _module_name = _UseStdlib._0;
9046
+ const _binding = _UseStdlib._1;
9047
+ module_name = _module_name;
9048
+ binding = _binding;
9049
+ break _L$6;
9050
+ }
9051
+ case 27: {
9052
+ const _ModDecl = stmt;
9053
+ const _name$5 = _ModDecl._0;
9054
+ const _body$9 = _ModDecl._1;
9055
+ name = _name$5;
9056
+ body = _body$9;
9057
+ break _L$5;
9058
+ }
9059
+ case 28: {
9060
+ const _ExportDefault = stmt;
9061
+ const _inner$4 = _ExportDefault._0;
9062
+ inner$2 = _inner$4;
9063
+ break _L$4;
9064
+ }
9065
+ case 29: {
9066
+ const _PublicDecl = stmt;
9067
+ const _inner$5 = _PublicDecl._0;
9068
+ inner = _inner$5;
9069
+ break _L$3;
9070
+ }
9071
+ case 30: {
9072
+ return;
9073
+ }
9074
+ case 31: {
9075
+ const _ClassDecl = stmt;
9076
+ const _decl$3 = _ClassDecl._0;
9077
+ decl = _decl$3;
9078
+ break _L$2;
9079
+ }
9080
+ default: {
9081
+ const _DeleteStmt = stmt;
9082
+ const _expr$3 = _DeleteStmt._0;
9083
+ expr = _expr$3;
9084
+ break _L;
9085
+ }
9086
+ }
9087
+ }
9088
+ let kw;
9089
+ switch (kind$4) {
8792
9090
  case 0: {
8793
- const _VarDecl = stmt;
8794
- const _kind = _VarDecl._0;
8795
- const _name = _VarDecl._1;
8796
- const _value = _VarDecl._2;
8797
- name$5 = _name;
8798
- kind$3 = _kind;
8799
- value$6 = _value;
8800
- break _L$29;
9091
+ kw = "const";
9092
+ break;
8801
9093
  }
8802
9094
  case 1: {
8803
- const _DestructDecl = stmt;
8804
- const _kind$2 = _DestructDecl._0;
8805
- const _names = _DestructDecl._1;
8806
- const _value$2 = _DestructDecl._2;
8807
- names$2 = _names;
8808
- kind$2 = _kind$2;
8809
- value$5 = _value$2;
8810
- break _L$28;
8811
- }
8812
- case 2: {
8813
- const _ObjDestructDecl = stmt;
8814
- const _kind$3 = _ObjDestructDecl._0;
8815
- const _names$2 = _ObjDestructDecl._1;
8816
- const _value$3 = _ObjDestructDecl._2;
8817
- names = _names$2;
8818
- kind = _kind$3;
8819
- value$4 = _value$3;
8820
- break _L$27;
8821
- }
8822
- case 3: {
8823
- const _Assign = stmt;
8824
- const _target = _Assign._0;
8825
- const _value$4 = _Assign._1;
8826
- target$2 = _target;
8827
- value$3 = _value$4;
8828
- break _L$26;
8829
- }
8830
- case 4: {
8831
- const _CompoundAssign = stmt;
8832
- const _op = _CompoundAssign._0;
8833
- const _target$2 = _CompoundAssign._1;
8834
- const _value$5 = _CompoundAssign._2;
8835
- target = _target$2;
8836
- op = _op;
8837
- value$2 = _value$5;
8838
- break _L$25;
8839
- }
8840
- case 5: {
8841
- const _FnDecl = stmt;
8842
- const _decl = _FnDecl._0;
8843
- decl$3 = _decl;
8844
- break _L$24;
8845
- }
8846
- case 6: {
8847
- const _If = stmt;
8848
- const _cond = _If._0;
8849
- const _body = _If._1;
8850
- const _elifs = _If._2;
8851
- const _else_body = _If._3;
8852
- elifs = _elifs;
8853
- cond$8 = _cond;
8854
- body$9 = _body;
8855
- else_body = _else_body;
8856
- break _L$23;
8857
- }
8858
- case 7: {
8859
- const _Unless = stmt;
8860
- const _cond$2 = _Unless._0;
8861
- const _body$2 = _Unless._1;
8862
- cond$7 = _cond$2;
8863
- body$8 = _body$2;
8864
- break _L$22;
8865
- }
8866
- case 8: {
8867
- const _While = stmt;
8868
- const _cond$3 = _While._0;
8869
- const _body$3 = _While._1;
8870
- cond$6 = _cond$3;
8871
- body$7 = _body$3;
8872
- break _L$21;
8873
- }
8874
- case 9: {
8875
- const _Until = stmt;
8876
- const _cond$4 = _Until._0;
8877
- const _body$4 = _Until._1;
8878
- cond$5 = _cond$4;
8879
- body$6 = _body$4;
8880
- break _L$20;
8881
- }
8882
- case 10: {
8883
- const _DoWhile = stmt;
8884
- const _cond$5 = _DoWhile._0;
8885
- const _body$5 = _DoWhile._1;
8886
- cond$4 = _cond$5;
8887
- body$5 = _body$5;
8888
- break _L$19;
8889
- }
8890
- case 11: {
8891
- const _ForIn = stmt;
8892
- const _name$2 = _ForIn._0;
8893
- const _index = _ForIn._1;
8894
- const _iter = _ForIn._2;
8895
- const _body$6 = _ForIn._3;
8896
- iter$2 = _iter;
8897
- name$4 = _name$2;
8898
- index = _index;
8899
- body$4 = _body$6;
8900
- break _L$18;
8901
- }
8902
- case 12: {
8903
- const _ForRange = stmt;
8904
- const _name$3 = _ForRange._0;
8905
- const _start = _ForRange._1;
8906
- const _end = _ForRange._2;
8907
- const _body$7 = _ForRange._3;
8908
- end = _end;
8909
- name$3 = _name$3;
8910
- start = _start;
8911
- body$3 = _body$7;
8912
- break _L$17;
8913
- }
8914
- case 13: {
8915
- const _ForClassic = stmt;
8916
- const _init = _ForClassic._0;
8917
- const _cond$6 = _ForClassic._1;
8918
- const _update = _ForClassic._2;
8919
- const _body$8 = _ForClassic._3;
8920
- update = _update;
8921
- init = _init;
8922
- cond$3 = _cond$6;
8923
- body$2 = _body$8;
8924
- break _L$16;
8925
- }
8926
- case 14: {
8927
- const _MatchStmt = stmt;
8928
- const _subject = _MatchStmt._0;
8929
- const _arms = _MatchStmt._1;
8930
- subject = _subject;
8931
- arms = _arms;
8932
- break _L$15;
8933
- }
8934
- case 15: {
8935
- const _PostfixIf = stmt;
8936
- const _inner = _PostfixIf._0;
8937
- const _cond$7 = _PostfixIf._1;
8938
- inner$5 = _inner;
8939
- cond$2 = _cond$7;
8940
- break _L$14;
8941
- }
8942
- case 16: {
8943
- const _PostfixUnless = stmt;
8944
- const _inner$2 = _PostfixUnless._0;
8945
- const _cond$8 = _PostfixUnless._1;
8946
- inner$4 = _inner$2;
8947
- cond = _cond$8;
8948
- break _L$13;
8949
- }
8950
- case 17: {
8951
- const _PostfixFor = stmt;
8952
- const _inner$3 = _PostfixFor._0;
8953
- const _name$4 = _PostfixFor._1;
8954
- const _iter$2 = _PostfixFor._2;
8955
- name$2 = _name$4;
8956
- inner$3 = _inner$3;
8957
- iter = _iter$2;
8958
- break _L$12;
8959
- }
8960
- case 18: {
8961
- const _TryCatch = stmt;
8962
- const _try_body = _TryCatch._0;
8963
- const _catch_name = _TryCatch._1;
8964
- const _catch_body = _TryCatch._2;
8965
- const _finally_body = _TryCatch._3;
8966
- catch_body = _catch_body;
8967
- try_body = _try_body;
8968
- catch_name = _catch_name;
8969
- finally_body = _finally_body;
8970
- break _L$11;
8971
- }
8972
- case 19: {
8973
- const _Throw = stmt;
8974
- const _expr = _Throw._0;
8975
- expr$3 = _expr;
8976
- break _L$10;
8977
- }
8978
- case 20: {
8979
- const _Return = stmt;
8980
- const _value$6 = _Return._0;
8981
- value = _value$6;
8982
- break _L$9;
8983
- }
8984
- case 21: {
8985
- _M0MP48username4core3src7codegen9JsCodegen7writeln(self, "break;");
8986
- return;
8987
- }
8988
- case 22: {
8989
- _M0MP48username4core3src7codegen9JsCodegen7writeln(self, "continue;");
8990
- return;
8991
- }
8992
- case 23: {
8993
- const _ExprStmt = stmt;
8994
- const _expr$2 = _ExprStmt._0;
8995
- expr$2 = _expr$2;
8996
- break _L$8;
8997
- }
8998
- case 24: {
8999
- const _ImportDecl = stmt;
9000
- const _decl$2 = _ImportDecl._0;
9001
- decl$2 = _decl$2;
9002
- break _L$7;
9003
- }
9004
- case 25: {
9005
- const _UseStdlib = stmt;
9006
- const _module_name = _UseStdlib._0;
9007
- const _binding = _UseStdlib._1;
9008
- module_name = _module_name;
9009
- binding = _binding;
9010
- break _L$6;
9011
- }
9012
- case 26: {
9013
- const _ModDecl = stmt;
9014
- const _name$5 = _ModDecl._0;
9015
- const _body$9 = _ModDecl._1;
9016
- name = _name$5;
9017
- body = _body$9;
9018
- break _L$5;
9019
- }
9020
- case 27: {
9021
- const _ExportDefault = stmt;
9022
- const _inner$4 = _ExportDefault._0;
9023
- inner$2 = _inner$4;
9024
- break _L$4;
9025
- }
9026
- case 28: {
9027
- const _PublicDecl = stmt;
9028
- const _inner$5 = _PublicDecl._0;
9029
- inner = _inner$5;
9030
- break _L$3;
9031
- }
9032
- case 29: {
9033
- return;
9034
- }
9035
- case 30: {
9036
- const _ClassDecl = stmt;
9037
- const _decl$3 = _ClassDecl._0;
9038
- decl = _decl$3;
9039
- break _L$2;
9095
+ kw = "let";
9096
+ break;
9040
9097
  }
9041
9098
  default: {
9042
- const _DeleteStmt = stmt;
9043
- const _expr$3 = _DeleteStmt._0;
9044
- expr = _expr$3;
9045
- break _L;
9099
+ kw = "var";
9046
9100
  }
9047
9101
  }
9102
+ _M0MP48username4core3src7codegen9JsCodegen13write__indent(self);
9103
+ _M0MP48username4core3src7codegen9JsCodegen5write(self, kw);
9104
+ _M0MP48username4core3src7codegen9JsCodegen5write(self, " ");
9105
+ _M0MP48username4core3src7codegen9JsCodegen5write(self, _M0FP48username4core3src7codegen9js__ident(name$5));
9106
+ _M0MP48username4core3src7codegen9JsCodegen5write(self, " = ");
9107
+ _M0MP48username4core3src7codegen9JsCodegen9gen__expr(self, value$7);
9108
+ _M0MP48username4core3src7codegen9JsCodegen5write(self, ";\n");
9109
+ _M0MPC15array5Array4pushGRP48username4core3src5lexer5TokenE(self.declared_vars, name$5);
9110
+ return;
9048
9111
  }
9049
9112
  let kw;
9050
9113
  switch (kind$3) {
@@ -9060,10 +9123,36 @@ function _M0MP48username4core3src7codegen9JsCodegen9gen__stmt(self, stmt) {
9060
9123
  kw = "var";
9061
9124
  }
9062
9125
  }
9126
+ const is_declared = new _M0TPB8MutLocalGbE(false);
9127
+ const _bind = self.declared_vars;
9128
+ const _bind$2 = _bind.length;
9129
+ let _tmp = 0;
9130
+ while (true) {
9131
+ const _ = _tmp;
9132
+ if (_ < _bind$2) {
9133
+ const v = _bind[_];
9134
+ if (v === obj_name) {
9135
+ is_declared.val = true;
9136
+ break;
9137
+ }
9138
+ _tmp = _ + 1 | 0;
9139
+ continue;
9140
+ } else {
9141
+ break;
9142
+ }
9143
+ }
9144
+ if (!is_declared.val) {
9145
+ _M0MP48username4core3src7codegen9JsCodegen13write__indent(self);
9146
+ _M0MP48username4core3src7codegen9JsCodegen5write(self, kw);
9147
+ _M0MP48username4core3src7codegen9JsCodegen5write(self, " ");
9148
+ _M0MP48username4core3src7codegen9JsCodegen5write(self, _M0FP48username4core3src7codegen9js__ident(obj_name));
9149
+ _M0MP48username4core3src7codegen9JsCodegen5write(self, " = {};\n");
9150
+ _M0MPC15array5Array4pushGRP48username4core3src5lexer5TokenE(self.declared_vars, obj_name);
9151
+ }
9063
9152
  _M0MP48username4core3src7codegen9JsCodegen13write__indent(self);
9064
- _M0MP48username4core3src7codegen9JsCodegen5write(self, kw);
9065
- _M0MP48username4core3src7codegen9JsCodegen5write(self, " ");
9066
- _M0MP48username4core3src7codegen9JsCodegen5write(self, _M0FP48username4core3src7codegen9js__ident(name$5));
9153
+ _M0MP48username4core3src7codegen9JsCodegen5write(self, _M0FP48username4core3src7codegen9js__ident(obj_name));
9154
+ _M0MP48username4core3src7codegen9JsCodegen5write(self, ".");
9155
+ _M0MP48username4core3src7codegen9JsCodegen5write(self, _M0FP48username4core3src7codegen9js__ident(prop));
9067
9156
  _M0MP48username4core3src7codegen9JsCodegen5write(self, " = ");
9068
9157
  _M0MP48username4core3src7codegen9JsCodegen9gen__expr(self, value$6);
9069
9158
  _M0MP48username4core3src7codegen9JsCodegen5write(self, ";\n");
@@ -9628,13 +9717,13 @@ function _M0MP48username4core3src7codegen9JsCodegen9gen__stmt(self, stmt) {
9628
9717
  name = _name;
9629
9718
  break _L$6;
9630
9719
  }
9631
- case 5: {
9720
+ case 6: {
9632
9721
  const _FnDecl = inner;
9633
9722
  const _decl = _FnDecl._0;
9634
9723
  decl$3 = _decl;
9635
9724
  break _L$5;
9636
9725
  }
9637
- case 30: {
9726
+ case 31: {
9638
9727
  const _ClassDecl = inner;
9639
9728
  const _decl$2 = _ClassDecl._0;
9640
9729
  decl$2 = _decl$2;
@@ -10123,7 +10212,7 @@ function _M0MP48username4core3src7codegen9JsCodegen14gen__for__part(self, stmt)
10123
10212
  value$3 = _value;
10124
10213
  break _L$4;
10125
10214
  }
10126
- case 3: {
10215
+ case 4: {
10127
10216
  const _Assign = stmt;
10128
10217
  const _target = _Assign._0;
10129
10218
  const _value$2 = _Assign._1;
@@ -10131,7 +10220,7 @@ function _M0MP48username4core3src7codegen9JsCodegen14gen__for__part(self, stmt)
10131
10220
  value$2 = _value$2;
10132
10221
  break _L$3;
10133
10222
  }
10134
- case 4: {
10223
+ case 5: {
10135
10224
  const _CompoundAssign = stmt;
10136
10225
  const _op = _CompoundAssign._0;
10137
10226
  const _target$2 = _CompoundAssign._1;
@@ -10141,7 +10230,7 @@ function _M0MP48username4core3src7codegen9JsCodegen14gen__for__part(self, stmt)
10141
10230
  value = _value$3;
10142
10231
  break _L$2;
10143
10232
  }
10144
- case 23: {
10233
+ case 24: {
10145
10234
  const _ExprStmt = stmt;
10146
10235
  const _expr = _ExprStmt._0;
10147
10236
  expr = _expr;
@@ -10868,13 +10957,13 @@ function _M0MP48username4core3src7codegen9JsCodegen17gen__stmt__inline(self, stm
10868
10957
  value$3 = _value;
10869
10958
  break _L$6;
10870
10959
  }
10871
- case 23: {
10960
+ case 24: {
10872
10961
  const _ExprStmt = stmt;
10873
10962
  const _expr = _ExprStmt._0;
10874
10963
  expr$2 = _expr;
10875
10964
  break _L$5;
10876
10965
  }
10877
- case 20: {
10966
+ case 21: {
10878
10967
  const _Return = stmt;
10879
10968
  const _x = _Return._0;
10880
10969
  if (_x === undefined) {
@@ -10887,13 +10976,13 @@ function _M0MP48username4core3src7codegen9JsCodegen17gen__stmt__inline(self, stm
10887
10976
  break _L$4;
10888
10977
  }
10889
10978
  }
10890
- case 19: {
10979
+ case 20: {
10891
10980
  const _Throw = stmt;
10892
10981
  const _expr$2 = _Throw._0;
10893
10982
  expr = _expr$2;
10894
10983
  break _L$3;
10895
10984
  }
10896
- case 3: {
10985
+ case 4: {
10897
10986
  const _Assign = stmt;
10898
10987
  const _target = _Assign._0;
10899
10988
  const _value$2 = _Assign._1;
@@ -10901,7 +10990,7 @@ function _M0MP48username4core3src7codegen9JsCodegen17gen__stmt__inline(self, stm
10901
10990
  value$2 = _value$2;
10902
10991
  break _L$2;
10903
10992
  }
10904
- case 4: {
10993
+ case 5: {
10905
10994
  const _CompoundAssign = stmt;
10906
10995
  const _op = _CompoundAssign._0;
10907
10996
  const _target$2 = _CompoundAssign._1;
@@ -11036,7 +11125,7 @@ function _M0MP48username4core3src7codegen9JsCodegen17gen__stmt__inline(self, stm
11036
11125
  }
11037
11126
  }
11038
11127
  function _M0MP48username4core3src7codegen9JsCodegen11new_2einner(cjs) {
11039
- return new _M0TP48username4core3src7codegen9JsCodegen(_M0MPB13StringBuilder11new_2einner(0), 0, [], cjs);
11128
+ return new _M0TP48username4core3src7codegen9JsCodegen(_M0MPB13StringBuilder11new_2einner(0), 0, [], [], cjs);
11040
11129
  }
11041
11130
  function _M0MP48username4core3src7codegen9JsCodegen16generate_2einner(self, stmts, header, shebang, strict) {
11042
11131
  if (shebang.length > 0) {
@@ -11173,7 +11262,7 @@ function _M0FP58username4core3src3cmd4main10cmd__build(args) {
11173
11262
  }
11174
11263
  }
11175
11264
  const stmts = _M0MP48username4core3src6parser6Parser5parse(_M0MP48username4core3src6parser6Parser3new(filtered));
11176
- const header = no_header.val ? "" : "// Generated by Purus 0.9.1";
11265
+ const header = no_header.val ? "" : "// Generated by Purus 0.10.0";
11177
11266
  const js = _M0MP48username4core3src7codegen9JsCodegen16generate_2einner(_M0MP48username4core3src7codegen9JsCodegen11new_2einner(cjs.val), stmts, header, shebang.val, strict.val);
11178
11267
  if (to_stdout.val) {
11179
11268
  _M0FPB7printlnGsE(js);