nadesiko3 3.2.28 → 3.2.32

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.
@@ -154,6 +154,10 @@
154
154
  !*** ./node_modules/core-js/internals/classof.js ***!
155
155
  \***************************************************/
156
156
 
157
+ /*!***************************************************!*\
158
+ !*** ./node_modules/core-js/internals/ieee754.js ***!
159
+ \***************************************************/
160
+
157
161
  /*!***************************************************!*\
158
162
  !*** ./node_modules/core-js/internals/is-pure.js ***!
159
163
  \***************************************************/
@@ -186,6 +190,10 @@
186
190
  !*** ./node_modules/core-js/internals/redefine.js ***!
187
191
  \****************************************************/
188
192
 
193
+ /*!****************************************************!*\
194
+ !*** ./node_modules/core-js/internals/to-index.js ***!
195
+ \****************************************************/
196
+
189
197
  /*!****************************************************!*\
190
198
  !*** ./node_modules/core-js/modules/es.promise.js ***!
191
199
  \****************************************************/
@@ -226,6 +234,10 @@
226
234
  !*** ./node_modules/core-js/internals/to-object.js ***!
227
235
  \*****************************************************/
228
236
 
237
+ /*!*****************************************************!*\
238
+ !*** ./node_modules/core-js/internals/to-offset.js ***!
239
+ \*****************************************************/
240
+
229
241
  /*!*****************************************************!*\
230
242
  !*** ./node_modules/core-js/internals/to-string.js ***!
231
243
  \*****************************************************/
@@ -346,6 +358,14 @@
346
358
  !*** ./node_modules/core-js/modules/es.math.trunc.js ***!
347
359
  \*******************************************************/
348
360
 
361
+ /*!********************************************************!*\
362
+ !*** ./node_modules/core-js/internals/array-buffer.js ***!
363
+ \********************************************************/
364
+
365
+ /*!********************************************************!*\
366
+ !*** ./node_modules/core-js/internals/array-reduce.js ***!
367
+ \********************************************************/
368
+
349
369
  /*!********************************************************!*\
350
370
  !*** ./node_modules/core-js/internals/get-built-in.js ***!
351
371
  \********************************************************/
@@ -566,6 +586,10 @@
566
586
  !*** ./node_modules/core-js/internals/string-multibyte.js ***!
567
587
  \************************************************************/
568
588
 
589
+ /*!************************************************************!*\
590
+ !*** ./node_modules/core-js/internals/typed-array-from.js ***!
591
+ \************************************************************/
592
+
569
593
  /*!************************************************************!*\
570
594
  !*** ./node_modules/core-js/modules/es.promise.finally.js ***!
571
595
  \************************************************************/
@@ -582,6 +606,18 @@
582
606
  !*** ./node_modules/core-js/modules/es.symbol.iterator.js ***!
583
607
  \************************************************************/
584
608
 
609
+ /*!************************************************************!*\
610
+ !*** ./node_modules/core-js/modules/es.typed-array.map.js ***!
611
+ \************************************************************/
612
+
613
+ /*!************************************************************!*\
614
+ !*** ./node_modules/core-js/modules/es.typed-array.set.js ***!
615
+ \************************************************************/
616
+
617
+ /*!*************************************************************!*\
618
+ !*** ./node_modules/core-js/internals/array-copy-within.js ***!
619
+ \*************************************************************/
620
+
585
621
  /*!*************************************************************!*\
586
622
  !*** ./node_modules/core-js/internals/collection-strong.js ***!
587
623
  \*************************************************************/
@@ -642,6 +678,26 @@
642
678
  !*** ./node_modules/core-js/modules/es.regexp.to-string.js ***!
643
679
  \*************************************************************/
644
680
 
681
+ /*!*************************************************************!*\
682
+ !*** ./node_modules/core-js/modules/es.typed-array.fill.js ***!
683
+ \*************************************************************/
684
+
685
+ /*!*************************************************************!*\
686
+ !*** ./node_modules/core-js/modules/es.typed-array.find.js ***!
687
+ \*************************************************************/
688
+
689
+ /*!*************************************************************!*\
690
+ !*** ./node_modules/core-js/modules/es.typed-array.join.js ***!
691
+ \*************************************************************/
692
+
693
+ /*!*************************************************************!*\
694
+ !*** ./node_modules/core-js/modules/es.typed-array.some.js ***!
695
+ \*************************************************************/
696
+
697
+ /*!*************************************************************!*\
698
+ !*** ./node_modules/core-js/modules/es.typed-array.sort.js ***!
699
+ \*************************************************************/
700
+
645
701
  /*!**************************************************************!*\
646
702
  !*** ./node_modules/core-js/internals/add-to-unscopables.js ***!
647
703
  \**************************************************************/
@@ -650,6 +706,10 @@
650
706
  !*** ./node_modules/core-js/internals/host-report-errors.js ***!
651
707
  \**************************************************************/
652
708
 
709
+ /*!**************************************************************!*\
710
+ !*** ./node_modules/core-js/internals/is-integral-number.js ***!
711
+ \**************************************************************/
712
+
653
713
  /*!**************************************************************!*\
654
714
  !*** ./node_modules/core-js/internals/string-html-forced.js ***!
655
715
  \**************************************************************/
@@ -658,6 +718,22 @@
658
718
  !*** ./node_modules/core-js/modules/es.reflect.construct.js ***!
659
719
  \**************************************************************/
660
720
 
721
+ /*!**************************************************************!*\
722
+ !*** ./node_modules/core-js/modules/es.typed-array.every.js ***!
723
+ \**************************************************************/
724
+
725
+ /*!**************************************************************!*\
726
+ !*** ./node_modules/core-js/modules/es.typed-array.slice.js ***!
727
+ \**************************************************************/
728
+
729
+ /*!***************************************************************!*\
730
+ !*** ./node_modules/core-js/internals/array-buffer-native.js ***!
731
+ \***************************************************************/
732
+
733
+ /*!***************************************************************!*\
734
+ !*** ./node_modules/core-js/internals/array-last-index-of.js ***!
735
+ \***************************************************************/
736
+
661
737
  /*!***************************************************************!*\
662
738
  !*** ./node_modules/core-js/internals/get-iterator-method.js ***!
663
739
  \***************************************************************/
@@ -670,6 +746,10 @@
670
746
  !*** ./node_modules/core-js/internals/species-constructor.js ***!
671
747
  \***************************************************************/
672
748
 
749
+ /*!***************************************************************!*\
750
+ !*** ./node_modules/core-js/internals/to-positive-integer.js ***!
751
+ \***************************************************************/
752
+
673
753
  /*!***************************************************************!*\
674
754
  !*** ./node_modules/core-js/modules/es.number.constructor.js ***!
675
755
  \***************************************************************/
@@ -690,6 +770,14 @@
690
770
  !*** ./node_modules/core-js/modules/es.symbol.description.js ***!
691
771
  \***************************************************************/
692
772
 
773
+ /*!***************************************************************!*\
774
+ !*** ./node_modules/core-js/modules/es.typed-array.filter.js ***!
775
+ \***************************************************************/
776
+
777
+ /*!***************************************************************!*\
778
+ !*** ./node_modules/core-js/modules/es.typed-array.reduce.js ***!
779
+ \***************************************************************/
780
+
693
781
  /*!****************************************************************!*\
694
782
  !*** ./node_modules/core-js/internals/a-possible-prototype.js ***!
695
783
  \****************************************************************/
@@ -726,6 +814,10 @@
726
814
  !*** ./node_modules/core-js/internals/regexp-exec-abstract.js ***!
727
815
  \****************************************************************/
728
816
 
817
+ /*!****************************************************************!*\
818
+ !*** ./node_modules/core-js/modules/es.typed-array.reverse.js ***!
819
+ \****************************************************************/
820
+
729
821
  /*!*****************************************************************!*\
730
822
  !*** ./node_modules/core-js/internals/engine-webkit-version.js ***!
731
823
  \*****************************************************************/
@@ -754,6 +846,30 @@
754
846
  !*** ./node_modules/core-js/modules/es.string.code-point-at.js ***!
755
847
  \*****************************************************************/
756
848
 
849
+ /*!*****************************************************************!*\
850
+ !*** ./node_modules/core-js/modules/es.typed-array.for-each.js ***!
851
+ \*****************************************************************/
852
+
853
+ /*!*****************************************************************!*\
854
+ !*** ./node_modules/core-js/modules/es.typed-array.includes.js ***!
855
+ \*****************************************************************/
856
+
857
+ /*!*****************************************************************!*\
858
+ !*** ./node_modules/core-js/modules/es.typed-array.index-of.js ***!
859
+ \*****************************************************************/
860
+
861
+ /*!*****************************************************************!*\
862
+ !*** ./node_modules/core-js/modules/es.typed-array.iterator.js ***!
863
+ \*****************************************************************/
864
+
865
+ /*!*****************************************************************!*\
866
+ !*** ./node_modules/core-js/modules/es.typed-array.subarray.js ***!
867
+ \*****************************************************************/
868
+
869
+ /*!******************************************************************!*\
870
+ !*** ./node_modules/core-js/internals/array-buffer-view-core.js ***!
871
+ \******************************************************************/
872
+
757
873
  /*!******************************************************************!*\
758
874
  !*** ./node_modules/core-js/internals/array-method-is-strict.js ***!
759
875
  \******************************************************************/
@@ -782,6 +898,10 @@
782
898
  !*** ./node_modules/core-js/internals/to-integer-or-infinity.js ***!
783
899
  \******************************************************************/
784
900
 
901
+ /*!******************************************************************!*\
902
+ !*** ./node_modules/core-js/modules/es.typed-array.to-string.js ***!
903
+ \******************************************************************/
904
+
785
905
  /*!*******************************************************************!*\
786
906
  !*** ./node_modules/core-js/internals/correct-is-regexp-logic.js ***!
787
907
  \*******************************************************************/
@@ -798,10 +918,18 @@
798
918
  !*** ./node_modules/core-js/internals/object-set-prototype-of.js ***!
799
919
  \*******************************************************************/
800
920
 
921
+ /*!*******************************************************************!*\
922
+ !*** ./node_modules/core-js/internals/typed-array-constructor.js ***!
923
+ \*******************************************************************/
924
+
801
925
  /*!*******************************************************************!*\
802
926
  !*** ./node_modules/core-js/modules/es.string.from-code-point.js ***!
803
927
  \*******************************************************************/
804
928
 
929
+ /*!*******************************************************************!*\
930
+ !*** ./node_modules/core-js/modules/es.typed-array.find-index.js ***!
931
+ \*******************************************************************/
932
+
805
933
  /*!*******************************************************************!*\
806
934
  !*** ./node_modules/core-js/modules/esnext.string.replace-all.js ***!
807
935
  \*******************************************************************/
@@ -834,6 +962,14 @@
834
962
  !*** ./node_modules/core-js/modules/es.object.get-prototype-of.js ***!
835
963
  \********************************************************************/
836
964
 
965
+ /*!********************************************************************!*\
966
+ !*** ./node_modules/core-js/modules/es.typed-array.copy-within.js ***!
967
+ \********************************************************************/
968
+
969
+ /*!********************************************************************!*\
970
+ !*** ./node_modules/core-js/modules/es.typed-array.uint8-array.js ***!
971
+ \********************************************************************/
972
+
837
973
  /*!*********************************************************************!*\
838
974
  !*** ./node_modules/core-js/internals/array-species-constructor.js ***!
839
975
  \*********************************************************************/
@@ -842,6 +978,10 @@
842
978
  !*** ./node_modules/core-js/internals/well-known-symbol-wrapped.js ***!
843
979
  \*********************************************************************/
844
980
 
981
+ /*!*********************************************************************!*\
982
+ !*** ./node_modules/core-js/modules/es.typed-array.reduce-right.js ***!
983
+ \*********************************************************************/
984
+
845
985
  /*!**********************************************************************!*\
846
986
  !*** ./node_modules/core-js/internals/create-property-descriptor.js ***!
847
987
  \**********************************************************************/
@@ -854,6 +994,10 @@
854
994
  !*** ./node_modules/core-js/internals/regexp-unsupported-dot-all.js ***!
855
995
  \**********************************************************************/
856
996
 
997
+ /*!**********************************************************************!*\
998
+ !*** ./node_modules/core-js/modules/es.typed-array.last-index-of.js ***!
999
+ \**********************************************************************/
1000
+
857
1001
  /*!**********************************************************************!*\
858
1002
  !*** ./node_modules/core-js/modules/web.dom-collections.for-each.js ***!
859
1003
  \**********************************************************************/
@@ -882,6 +1026,10 @@
882
1026
  !*** ./node_modules/core-js/internals/object-property-is-enumerable.js ***!
883
1027
  \*************************************************************************/
884
1028
 
1029
+ /*!*************************************************************************!*\
1030
+ !*** ./node_modules/core-js/modules/es.typed-array.to-locale-string.js ***!
1031
+ \*************************************************************************/
1032
+
885
1033
  /*!**************************************************************************!*\
886
1034
  !*** ./node_modules/core-js/internals/check-correctness-of-iteration.js ***!
887
1035
  \**************************************************************************/
@@ -890,10 +1038,18 @@
890
1038
  !*** ./node_modules/core-js/internals/create-non-enumerable-property.js ***!
891
1039
  \**************************************************************************/
892
1040
 
1041
+ /*!***************************************************************************!*\
1042
+ !*** ./node_modules/core-js/internals/array-from-constructor-and-list.js ***!
1043
+ \***************************************************************************/
1044
+
893
1045
  /*!***************************************************************************!*\
894
1046
  !*** ./node_modules/core-js/internals/object-get-own-property-symbols.js ***!
895
1047
  \***************************************************************************/
896
1048
 
1049
+ /*!***************************************************************************!*\
1050
+ !*** ./node_modules/core-js/internals/typed-array-species-constructor.js ***!
1051
+ \***************************************************************************/
1052
+
897
1053
  /*!****************************************************************************!*\
898
1054
  !*** ./node_modules/core-js/internals/array-method-has-species-support.js ***!
899
1055
  \****************************************************************************/
@@ -902,6 +1058,10 @@
902
1058
  !*** ./node_modules/core-js/internals/call-with-safe-iteration-closing.js ***!
903
1059
  \****************************************************************************/
904
1060
 
1061
+ /*!*****************************************************************************!*\
1062
+ !*** ./node_modules/core-js/internals/typed-array-from-species-and-list.js ***!
1063
+ \*****************************************************************************/
1064
+
905
1065
  /*!******************************************************************************!*\
906
1066
  !*** ./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js ***!
907
1067
  \******************************************************************************/
@@ -921,3 +1081,7 @@
921
1081
  /*!**********************************************************************************!*\
922
1082
  !*** ./node_modules/core-js/internals/object-get-own-property-names-external.js ***!
923
1083
  \**********************************************************************************/
1084
+
1085
+ /*!*************************************************************************************!*\
1086
+ !*** ./node_modules/core-js/internals/typed-array-constructors-require-wrappers.js ***!
1087
+ \*************************************************************************************/
package/src/nako3.js CHANGED
@@ -540,6 +540,7 @@ class NakoCompiler {
540
540
  /** @type {Ast} */
541
541
  let ast
542
542
  try {
543
+ this.parser.genMode = 'sync' // set default
543
544
  ast = this.parser.parse(lexerOutput.tokens)
544
545
  } catch (err) {
545
546
  if (typeof err.startOffset !== 'number') {
@@ -18,8 +18,7 @@ const NakoGen = require('./nako_gen')
18
18
  /**
19
19
  * なでしこのインタプリタコード
20
20
  */
21
- const
22
- NakoCodeNop = 'NOP'
21
+ const NakoCodeNop = 'NOP'
23
22
  const NakoCodeLabel = 'LBL'
24
23
  const NakoCodeEOL = 'EOL'
25
24
  const NakoCodeJump = 'JMP' // JUMP addr
@@ -550,13 +549,15 @@ try {
550
549
  if (sys.index >= sys.codeSize || sys.index < 0) {return}
551
550
  const __v0 = sys.__v0
552
551
  try {
553
- while (sys.index < sys.codeSize || sys.index < 0) {
552
+ sys.inLoop = true
553
+ while (sys.index < sys.codeSize && sys.index >= 0) {
554
554
  // console.log('@@[run]', sys.index)
555
555
  switch (sys.index) {
556
556
  // --- CODE.BEGIN ---
557
557
  ${result}
558
558
  // --- CODE.END ---
559
559
  default:
560
+ sys.inLoop = false
560
561
  console.log(sys.index, sys.__stack)
561
562
  throw new Error('Invalid sys.index:' + sys.index)
562
563
  break
@@ -568,8 +569,13 @@ try {
568
569
  } else {
569
570
  sys.index++
570
571
  }
571
- if (sys.async) { sys.async = false; break}
572
+ if (sys.async) {
573
+ sys.__saveSysenv(sys)
574
+ sys.async = false
575
+ break
576
+ }
572
577
  } // end of while
578
+ sys.inLoop = false
573
579
  } catch (e) {
574
580
  sys.__errorAsync(e, sys)
575
581
  }
@@ -595,6 +601,12 @@ try {
595
601
  sys.nextIndex = no;
596
602
  }
597
603
  this.__return = sys => {
604
+ if (sys.__callstack.length === 0) {
605
+ sys.__destroySysenv(sys, sys.curSysenv.envid)
606
+ sys.index = -2
607
+ sys.nextIndex = -1
608
+ return
609
+ }
598
610
  const sore = sys.__vars['それ'];
599
611
  sys.__varslist.pop();
600
612
  const info = sys.__callstack.pop();
@@ -616,15 +628,22 @@ try {
616
628
  }
617
629
  this.__callNakoCode = (no, backNo, sys) => {
618
630
  this.__call(backNo, sys)
619
- sys.async = true
631
+ sys.nextIndex = no
632
+ const sysenv = sys.setAsync(sys)
620
633
  setTimeout(() => {
621
634
  // console.log('//__callNakoCode, back=', backNo, 'no=', no)
622
- sys.async = false
623
- sys.nextIndex = -1
624
- sys.index = no
625
- sys.nextAsync(sys)
635
+ sys.compAsync(sys, sysenv)
626
636
  } ,1)
627
637
  }
638
+ this.__callNakoCodeEntry = (no, sys) => {
639
+ sys.__saveSysenv(sys)
640
+ sys.curSysenv = sys.__generateSysenv(sys)
641
+ sys.__restoreSysenv(sys)
642
+ sys.__vars = {"それ":""}
643
+ sys.__varslist.push(sys.__vars)
644
+ sys.index = no;
645
+ sys.nextAsync(sys)
646
+ }
628
647
  this.__callObj = (vname, curNo, sys) => {
629
648
  if (sys.__vars[vname]) {
630
649
  const fname = sys.__vars[vname]
@@ -639,7 +658,69 @@ try {
639
658
  }
640
659
  throw new Error('async error in __callObj::', vname)
641
660
  }
661
+ this.__generateSysenv = sys => {
662
+ sys.envid = ( sys.envid == null ? 0 : sys.envid ) + 1
663
+ const sysenv = {
664
+ callstack: [],
665
+ varstack: [],
666
+ varslist: [sys.__varslist[0], sys.__varslist[1], sys.__varslist[2]],
667
+ index: -1,
668
+ nextIndex: -1,
669
+ tryIndex: -1,
670
+ envid: sys.envid
671
+ }
672
+ sysenv.vars = sysenv.varslist[2]
673
+ if (sys.sysenvs == null) { sys.sysenvs={} }
674
+ sys.sysenvs[sys.envid] = sysenv
675
+ // console.log('generete envid '+sys.envid)
676
+ return sysenv
677
+ }
678
+ this.__destroySysenv = (sys, envid) => {
679
+ delete sys.sysenvs[envid]
680
+ // console.log('destroy envid '+envid)
681
+ }
682
+ this.__saveSysenv = sys => {
683
+ const sysenv = sys.curSysenv
684
+ sysenv.callstack = sys.__callstack
685
+ sysenv.varstack = sys.__stack
686
+ sysenv.varslist = sys.__varslist
687
+ sysenv.vars = sys.__vars
688
+ sysenv.index = sys.index
689
+ sysenv.nextIndex = sys.nextIndex
690
+ sysenv.tryIndex = sys.tryIndex
691
+ }
692
+ this.__restoreSysenv = sys => {
693
+ const sysenv = sys.curSysenv
694
+ sys.__callstack = sysenv.callstack
695
+ sys.__stack = sysenv.varstack
696
+ sys.__varslist = sysenv.varslist
697
+ sys.__vars = sysenv.vars
698
+ ___vars = sys.__vars
699
+ sys.index = sysenv.index
700
+ sys.nextIndex = sysenv.nextIndex
701
+ sys.tryIndex = sysenv.tryIndex
702
+ }
703
+ this.setAsync = sys => {
704
+ sys.async = true
705
+ return sys.curSysenv
706
+ }
707
+ this.compAsync = (sys,sysenv) => {
708
+ if (sys.async && sys.curSysenv != null && sysenv != null && sys.curSysenv.envid === sysenv.envid) {
709
+ sys.async = false
710
+ } else {
711
+ if (sys.curSysenv == null || sysenv == null || sys.curSysenv.envid !== sysenv.envid) {
712
+ sys.__saveSysenv(sys)
713
+ const envid = sys.curSysenv.envid
714
+ sys.curSysenv = sysenv
715
+ sys.__restoreSysenv(sys)
716
+ // console.log('switch envid '+envid+' to '+sys.curSysenv.envid)
717
+ }
718
+ sys.nextAsync(sys)
719
+ }
720
+ }
721
+
642
722
  this.__resetAsync(this)
723
+ this.curSysenv = this.__generateSysenv(this)
643
724
  this.nextAsync(this)
644
725
  //-------------------------
645
726
  `
@@ -1076,8 +1157,14 @@ try {
1076
1157
  josi: meta.josi,
1077
1158
  fn: '(function(){\n' +
1078
1159
  ' const sys = (arguments.length > 0) ? arguments[arguments.length-1] : {}; \n' +
1160
+ ' if (sys.newenv) { \n' +
1161
+ ' sys.newenv = false\n' +
1162
+ ` sys.__callNakoCodeEntry(sys.__labels['${funcName}'], sys);` + '\n' +
1163
+ ' } else {\n' +
1079
1164
  ' ' + codeCall + '\n' +
1080
- ` sys.__callNakoCode(sys.__labels['${funcName}'], sys.nextIndex, sys); })`,
1165
+ ` sys.__callNakoCode(sys.__labels['${funcName}'], sys.nextIndex, sys);` + '\n' +
1166
+ ' if (!sys.inLoop) { sys.nextAsync(sys) }\n' +
1167
+ ' } })',
1081
1168
  type: 'func'
1082
1169
  }
1083
1170
 
@@ -67,7 +67,9 @@ class NakoParser extends NakoParserBase {
67
67
  // 余剰スタックのレポートを作る
68
68
  const words = []
69
69
  this.stack.forEach((t) => {
70
- words.push(this.nodeToStr(t, { depth: 1 }, false))
70
+ let w = this.nodeToStr(t, { depth: 1 }, false)
71
+ if (t.josi) { w += t.josi }
72
+ words.push(w)
71
73
  })
72
74
  const desc = words.join(',')
73
75
  // 最近使った関数の使い方レポートを作る #1093
@@ -85,7 +87,7 @@ class NakoParser extends NakoParserBase {
85
87
  descFunc += f.name + '\n'
86
88
  }
87
89
  throw NakoSyntaxError.fromNode(
88
- `未解決の単語があります: [${desc}]\n次の命令の可能性があります:\n${descFunc}}`, eol)
90
+ `未解決の単語があります: [${desc}]\n次の命令の可能性があります:\n${descFunc}`, eol)
89
91
  }
90
92
  this.recentlyCalledFunc = []
91
93
  return eol
@@ -1,8 +1,8 @@
1
1
  // なでしこバージョン
2
2
  const nakoVersion = {
3
- version: '3.2.28',
3
+ version: '3.2.32',
4
4
  major: 3,
5
5
  minor: 2,
6
- patch: 28
6
+ patch: 32
7
7
  }
8
8
  module.exports = nakoVersion
@@ -69,6 +69,19 @@ const PluginBrowser = {
69
69
  sys.__v0['DOM親要素'] = document.body
70
70
  sys.__v0['ブラウザURL'] = window.location.href
71
71
 
72
+ // 便利なメソッドを定義
73
+ sys.__tohtml = (text) => {
74
+ return ('' + text)
75
+ .replace(/&/g, '&amp;')
76
+ .replace(/>/g, '&gt;')
77
+ .replace(/</g, '&lt;')
78
+ }
79
+ sys.__tohtmlQ = (text) => {
80
+ return sys.__tohtml(text)
81
+ .replace(/\"/g, '&#34;')
82
+ .replace(/\'/g, '&#39;')
83
+ }
84
+
72
85
  // 「!クリア」でDOMイベントを削除するため
73
86
  sys.__dom_events = [] // [{}, {}, {} ...]
74
87
  // DOM追加イベント
@@ -89,6 +102,7 @@ const PluginBrowser = {
89
102
  sys.__v0['対象イベント'] = e
90
103
  // 追加データが得られる場合
91
104
  if (setHandler) { setHandler(e, sys) }
105
+ if (sys.__genMode === '非同期モード') { sys.newenv = true }
92
106
  return func(e, sys)
93
107
  }
94
108
  // add
@@ -13,7 +13,8 @@ module.exports = {
13
13
  return res.text()
14
14
  }).then(text => {
15
15
  sys.__v0['対象'] = text
16
- callback(text)
16
+ if (sys.__genMode === '非同期モード') { sys.newenv = true }
17
+ callback(text, sys)
17
18
  }).catch(err => {
18
19
  console.log('[fetch.error]', err)
19
20
  sys.__v0['AJAX:ONERROR'](err)
@@ -29,7 +30,7 @@ module.exports = {
29
30
  if (sys.__genMode !== '非同期モード') {
30
31
  throw new Error('『AJAX受信』を使うには、プログラムの冒頭で「!非同期モード」と宣言してください。')
31
32
  }
32
- sys.async = true
33
+ const sysenv = sys.setAsync(sys)
33
34
  let options = sys.__v0['AJAXオプション']
34
35
  if (options === '') { options = { method: 'GET' } }
35
36
  // fetch 実行
@@ -41,7 +42,7 @@ module.exports = {
41
42
  }
42
43
  }).then(text => {
43
44
  sys.__v0['対象'] = text
44
- sys.nextAsync(sys)
45
+ sys.compAsync(sys, sysenv)
45
46
  }).catch(err => {
46
47
  console.error('[AJAX受信のエラー]', err)
47
48
  sys.__errorAsync(err, sys)