functionalscript 0.33.0 → 0.35.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/README.md +27 -14
- package/fs/asserts/module.f.d.ts +1 -1
- package/fs/asserts/module.f.js +4 -1
- package/fs/base64/proof.f.d.ts +1 -0
- package/fs/base64/proof.f.js +25 -56
- package/fs/base_n/module.f.js +11 -5
- package/fs/base_n/proof.f.d.ts +1 -0
- package/fs/base_n/proof.f.js +12 -1
- package/fs/bnf/data/module.f.d.ts +0 -103
- package/fs/bnf/data/module.f.js +10 -246
- package/fs/bnf/data/proof.f.d.ts +0 -10
- package/fs/bnf/data/proof.f.js +2 -642
- package/fs/bnf/descent/module.f.d.ts +56 -0
- package/fs/bnf/descent/module.f.js +119 -0
- package/fs/bnf/descent/proof.f.d.ts +5 -0
- package/fs/bnf/descent/proof.f.js +296 -0
- package/fs/bnf/ll1/module.f.d.ts +72 -0
- package/fs/bnf/ll1/module.f.js +153 -0
- package/fs/bnf/ll1/proof.f.d.ts +9 -0
- package/fs/bnf/ll1/proof.f.js +358 -0
- package/fs/cas/cli/module.f.d.ts +6 -0
- package/fs/cas/cli/module.f.js +56 -0
- package/fs/cas/cli/proof.f.d.ts +14 -0
- package/fs/cas/cli/proof.f.js +149 -0
- package/fs/cas/mcp/module.f.d.ts +9 -17
- package/fs/cas/mcp/module.f.js +123 -96
- package/fs/cas/mcp/proof.f.d.ts +12 -1
- package/fs/cas/mcp/proof.f.js +199 -32
- package/fs/cas/module.f.d.ts +35 -15
- package/fs/cas/module.f.js +168 -131
- package/fs/cas/proof.f.d.ts +16 -13
- package/fs/cas/proof.f.js +255 -121
- package/fs/ci/config/module.f.d.ts +14 -14
- package/fs/ci/config/module.f.js +14 -14
- package/fs/djs/tokenizer-new/module.f.js +1 -1
- package/fs/djs/tokenizer-new/proof.f.d.ts +2 -0
- package/fs/djs/tokenizer-new/proof.f.js +357 -229
- package/fs/effects/list/module.f.d.ts +31 -0
- package/fs/effects/list/module.f.js +16 -0
- package/fs/effects/module.f.d.ts +11 -5
- package/fs/effects/module.f.js +16 -6
- package/fs/effects/node/module.f.d.ts +29 -3
- package/fs/effects/node/module.f.js +35 -1
- package/fs/effects/node/module.js +32 -18
- package/fs/effects/node/virtual/module.f.js +57 -0
- package/fs/effects/proof.f.d.ts +4 -0
- package/fs/effects/proof.f.js +18 -1
- package/fs/fjs/module.f.js +2 -8
- package/fs/html/module.f.js +6 -8
- package/fs/mcp/module.f.d.ts +1 -1
- package/fs/mcp/stdio/module.f.d.ts +8 -0
- package/fs/mcp/stdio/module.f.js +33 -6
- package/fs/mcp/stdio/proof.f.d.ts +3 -0
- package/fs/mcp/stdio/proof.f.js +52 -1
- package/fs/mime/module.f.d.ts +101 -5
- package/fs/mime/module.f.js +159 -6
- package/fs/mime/proof.f.d.ts +25 -0
- package/fs/mime/proof.f.js +193 -3
- package/fs/text/code_point/module.f.d.ts +39 -2
- package/fs/text/code_point/module.f.js +74 -2
- package/fs/text/code_point/proof.f.d.ts +8 -0
- package/fs/text/code_point/proof.f.js +72 -0
- package/fs/text/module.f.d.ts +11 -1
- package/fs/text/module.f.js +13 -3
- package/fs/text/proof.f.d.ts +6 -0
- package/fs/text/proof.f.js +25 -2
- package/fs/text/utf16/module.f.js +4 -26
- package/fs/text/utf8/module.f.d.ts +27 -0
- package/fs/text/utf8/module.f.js +8 -14
- package/fs/types/bit_vec/module.f.d.ts +20 -2
- package/fs/types/bit_vec/module.f.js +77 -27
- package/fs/types/bit_vec/proof.f.d.ts +8 -0
- package/fs/types/bit_vec/proof.f.js +24 -6
- package/fs/types/function/operator/module.f.d.ts +26 -0
- package/fs/types/list/module.f.d.ts +3 -0
- package/fs/types/nullable/module.f.d.ts +9 -5
- package/fs/types/nullable/module.f.js +19 -0
- package/fs/types/result/module.d.ts +2 -4
- package/fs/types/result/module.js +9 -3
- package/package.json +3 -3
- package/issues/demo/data/data.f.js +0 -12
- package/issues/demo/data/shared.f.js +0 -3
- package/issues/demo/fs/app.js +0 -4
- package/issues/demo/fs/math.f.js +0 -4
- package/issues/demo/sample/proof.f.js +0 -13
- /package/{issues → todo}/031-json.f.d.ts +0 -0
- /package/{issues → todo}/031-json.f.js +0 -0
- /package/{issues → todo}/proof.f.d.ts +0 -0
- /package/{issues → todo}/proof.f.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { descentParser } from "../../bnf/
|
|
1
|
+
import { descentParser } from "../../bnf/descent/module.f.js";
|
|
2
2
|
import { backspace, ht, lf, ff, cr, quotationMark, solidus, reverseSolidus, digitRange, digit0, latinCapitalLetterA, latinSmallLetterA, latinSmallLetterB, latinSmallLetterF, latinSmallLetterN, latinSmallLetterR, latinSmallLetterT, latinSmallLetterU, range, } from "../../text/ascii/module.f.js";
|
|
3
3
|
import { stringToCodePointList } from "../../text/utf16/module.f.js";
|
|
4
4
|
import { contains } from "../../types/range/module.f.js";
|
|
@@ -66,6 +66,7 @@ const filterFunc = tk => {
|
|
|
66
66
|
switch (tk) {
|
|
67
67
|
case 'number':
|
|
68
68
|
case 'string':
|
|
69
|
+
case 'id':
|
|
69
70
|
case '\n':
|
|
70
71
|
case '\r':
|
|
71
72
|
case ' ':
|
|
@@ -104,6 +105,15 @@ const stringDecodeScan = (cp, state) => {
|
|
|
104
105
|
}
|
|
105
106
|
};
|
|
106
107
|
const decodeJsonString = codePoints => String.fromCodePoint(...toArray(flat(stateScan(stringDecodeScan)({ kind: 'normal' })(codePoints.slice(1, -1)))));
|
|
108
|
+
const keywords = new Set([
|
|
109
|
+
'true', 'false', 'null', 'undefined',
|
|
110
|
+
'arguments', 'await', 'break', 'case', 'catch', 'class', 'const', 'continue',
|
|
111
|
+
'debugger', 'default', 'delete', 'do', 'else', 'enum', 'eval', 'export',
|
|
112
|
+
'extends', 'finally', 'for', 'function', 'if', 'implements', 'import', 'in',
|
|
113
|
+
'instanceof', 'interface', 'let', 'new', 'package', 'private', 'protected',
|
|
114
|
+
'public', 'return', 'static', 'super', 'switch', 'this', 'throw', 'try',
|
|
115
|
+
'typeof', 'var', 'void', 'while', 'with', 'yield',
|
|
116
|
+
]);
|
|
107
117
|
const toJsToken = tk => {
|
|
108
118
|
switch (tk[0]) {
|
|
109
119
|
case '\n':
|
|
@@ -114,6 +124,12 @@ const toJsToken = tk => {
|
|
|
114
124
|
return { kind: 'ws' };
|
|
115
125
|
case 'string':
|
|
116
126
|
return { kind: 'string', value: decodeJsonString(tk[1]) };
|
|
127
|
+
case 'id': {
|
|
128
|
+
const value = String.fromCodePoint(...tk[1]);
|
|
129
|
+
if (keywords.has(value))
|
|
130
|
+
return { kind: value };
|
|
131
|
+
return { kind: 'id', value };
|
|
132
|
+
}
|
|
117
133
|
default:
|
|
118
134
|
return { kind: tk[0] };
|
|
119
135
|
}
|
|
@@ -602,14 +618,18 @@ export const proof = {
|
|
|
602
618
|
// const result = tokenizeString('0e-')
|
|
603
619
|
// if (result !== 'error') { throw result }
|
|
604
620
|
// },
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
621
|
+
() => {
|
|
622
|
+
const result = tokenizeString('ABCdef1234567890$_');
|
|
623
|
+
if (result !== '[{"kind":"id","value":"ABCdef1234567890$_"},{"kind":"eof"}]') {
|
|
624
|
+
throw result;
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
() => {
|
|
628
|
+
const result = tokenizeString('{ABCdef1234567890$_}');
|
|
629
|
+
if (result !== '[{"kind":"{"},{"kind":"id","value":"ABCdef1234567890$_"},{"kind":"}"},{"kind":"eof"}]') {
|
|
630
|
+
throw result;
|
|
631
|
+
}
|
|
632
|
+
},
|
|
613
633
|
// () => {
|
|
614
634
|
// const result = tokenizeString('123 _123')
|
|
615
635
|
// if (result !== '[{"bf":[123n,0],"kind":"number","value":"123"},{"kind":"ws"},{"kind":"id","value":"_123"},{"kind":"eof"}]') { throw result }
|
|
@@ -662,10 +682,12 @@ export const proof = {
|
|
|
662
682
|
throw result;
|
|
663
683
|
}
|
|
664
684
|
},
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
685
|
+
() => {
|
|
686
|
+
const result = tokenizeString('=a');
|
|
687
|
+
if (result !== '[{"kind":"="},{"kind":"id","value":"a"},{"kind":"eof"}]') {
|
|
688
|
+
throw result;
|
|
689
|
+
}
|
|
690
|
+
},
|
|
669
691
|
() => {
|
|
670
692
|
const result = tokenizeString('-');
|
|
671
693
|
if (result !== '[{"kind":"-"},{"kind":"eof"}]') {
|
|
@@ -769,222 +791,328 @@ export const proof = {
|
|
|
769
791
|
}
|
|
770
792
|
},
|
|
771
793
|
],
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
794
|
+
id: [
|
|
795
|
+
() => {
|
|
796
|
+
const result = tokenizeString('err');
|
|
797
|
+
if (result !== '[{"kind":"id","value":"err"},{"kind":"eof"}]') {
|
|
798
|
+
throw result;
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
() => {
|
|
802
|
+
const result = tokenizeString('{e}');
|
|
803
|
+
if (result !== '[{"kind":"{"},{"kind":"id","value":"e"},{"kind":"}"},{"kind":"eof"}]') {
|
|
804
|
+
throw result;
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
() => {
|
|
808
|
+
const result = tokenizeString('tru');
|
|
809
|
+
if (result !== '[{"kind":"id","value":"tru"},{"kind":"eof"}]') {
|
|
810
|
+
throw result;
|
|
811
|
+
}
|
|
812
|
+
},
|
|
813
|
+
],
|
|
814
|
+
keywords: [
|
|
815
|
+
() => {
|
|
816
|
+
const result = tokenizeString('true');
|
|
817
|
+
if (result !== '[{"kind":"true"},{"kind":"eof"}]') {
|
|
818
|
+
throw result;
|
|
819
|
+
}
|
|
820
|
+
},
|
|
821
|
+
() => {
|
|
822
|
+
const result = tokenizeString('false');
|
|
823
|
+
if (result !== '[{"kind":"false"},{"kind":"eof"}]') {
|
|
824
|
+
throw result;
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
() => {
|
|
828
|
+
const result = tokenizeString('null');
|
|
829
|
+
if (result !== '[{"kind":"null"},{"kind":"eof"}]') {
|
|
830
|
+
throw result;
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
() => {
|
|
834
|
+
const result = tokenizeString('undefined');
|
|
835
|
+
if (result !== '[{"kind":"undefined"},{"kind":"eof"}]') {
|
|
836
|
+
throw result;
|
|
837
|
+
}
|
|
838
|
+
},
|
|
839
|
+
() => {
|
|
840
|
+
const result = tokenizeString('[null]');
|
|
841
|
+
if (result !== '[{"kind":"["},{"kind":"null"},{"kind":"]"},{"kind":"eof"}]') {
|
|
842
|
+
throw result;
|
|
843
|
+
}
|
|
844
|
+
},
|
|
845
|
+
() => {
|
|
846
|
+
const result = tokenizeString('arguments');
|
|
847
|
+
if (result !== '[{"kind":"arguments"},{"kind":"eof"}]') {
|
|
848
|
+
throw result;
|
|
849
|
+
}
|
|
850
|
+
},
|
|
851
|
+
() => {
|
|
852
|
+
const result = tokenizeString('await');
|
|
853
|
+
if (result !== '[{"kind":"await"},{"kind":"eof"}]') {
|
|
854
|
+
throw result;
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
() => {
|
|
858
|
+
const result = tokenizeString('break');
|
|
859
|
+
if (result !== '[{"kind":"break"},{"kind":"eof"}]') {
|
|
860
|
+
throw result;
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
() => {
|
|
864
|
+
const result = tokenizeString('case');
|
|
865
|
+
if (result !== '[{"kind":"case"},{"kind":"eof"}]') {
|
|
866
|
+
throw result;
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
() => {
|
|
870
|
+
const result = tokenizeString('catch');
|
|
871
|
+
if (result !== '[{"kind":"catch"},{"kind":"eof"}]') {
|
|
872
|
+
throw result;
|
|
873
|
+
}
|
|
874
|
+
},
|
|
875
|
+
() => {
|
|
876
|
+
const result = tokenizeString('class');
|
|
877
|
+
if (result !== '[{"kind":"class"},{"kind":"eof"}]') {
|
|
878
|
+
throw result;
|
|
879
|
+
}
|
|
880
|
+
},
|
|
881
|
+
() => {
|
|
882
|
+
const result = tokenizeString('const');
|
|
883
|
+
if (result !== '[{"kind":"const"},{"kind":"eof"}]') {
|
|
884
|
+
throw result;
|
|
885
|
+
}
|
|
886
|
+
},
|
|
887
|
+
() => {
|
|
888
|
+
const result = tokenizeString('continue');
|
|
889
|
+
if (result !== '[{"kind":"continue"},{"kind":"eof"}]') {
|
|
890
|
+
throw result;
|
|
891
|
+
}
|
|
892
|
+
},
|
|
893
|
+
() => {
|
|
894
|
+
const result = tokenizeString('debugger');
|
|
895
|
+
if (result !== '[{"kind":"debugger"},{"kind":"eof"}]') {
|
|
896
|
+
throw result;
|
|
897
|
+
}
|
|
898
|
+
},
|
|
899
|
+
() => {
|
|
900
|
+
const result = tokenizeString('default');
|
|
901
|
+
if (result !== '[{"kind":"default"},{"kind":"eof"}]') {
|
|
902
|
+
throw result;
|
|
903
|
+
}
|
|
904
|
+
},
|
|
905
|
+
() => {
|
|
906
|
+
const result = tokenizeString('delete');
|
|
907
|
+
if (result !== '[{"kind":"delete"},{"kind":"eof"}]') {
|
|
908
|
+
throw result;
|
|
909
|
+
}
|
|
910
|
+
},
|
|
911
|
+
() => {
|
|
912
|
+
const result = tokenizeString('do');
|
|
913
|
+
if (result !== '[{"kind":"do"},{"kind":"eof"}]') {
|
|
914
|
+
throw result;
|
|
915
|
+
}
|
|
916
|
+
},
|
|
917
|
+
() => {
|
|
918
|
+
const result = tokenizeString('else');
|
|
919
|
+
if (result !== '[{"kind":"else"},{"kind":"eof"}]') {
|
|
920
|
+
throw result;
|
|
921
|
+
}
|
|
922
|
+
},
|
|
923
|
+
() => {
|
|
924
|
+
const result = tokenizeString('enum');
|
|
925
|
+
if (result !== '[{"kind":"enum"},{"kind":"eof"}]') {
|
|
926
|
+
throw result;
|
|
927
|
+
}
|
|
928
|
+
},
|
|
929
|
+
() => {
|
|
930
|
+
const result = tokenizeString('eval');
|
|
931
|
+
if (result !== '[{"kind":"eval"},{"kind":"eof"}]') {
|
|
932
|
+
throw result;
|
|
933
|
+
}
|
|
934
|
+
},
|
|
935
|
+
() => {
|
|
936
|
+
const result = tokenizeString('export');
|
|
937
|
+
if (result !== '[{"kind":"export"},{"kind":"eof"}]') {
|
|
938
|
+
throw result;
|
|
939
|
+
}
|
|
940
|
+
},
|
|
941
|
+
() => {
|
|
942
|
+
const result = tokenizeString('extends');
|
|
943
|
+
if (result !== '[{"kind":"extends"},{"kind":"eof"}]') {
|
|
944
|
+
throw result;
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
() => {
|
|
948
|
+
const result = tokenizeString('finally');
|
|
949
|
+
if (result !== '[{"kind":"finally"},{"kind":"eof"}]') {
|
|
950
|
+
throw result;
|
|
951
|
+
}
|
|
952
|
+
},
|
|
953
|
+
() => {
|
|
954
|
+
const result = tokenizeString('for');
|
|
955
|
+
if (result !== '[{"kind":"for"},{"kind":"eof"}]') {
|
|
956
|
+
throw result;
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
() => {
|
|
960
|
+
const result = tokenizeString('function');
|
|
961
|
+
if (result !== '[{"kind":"function"},{"kind":"eof"}]') {
|
|
962
|
+
throw result;
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
() => {
|
|
966
|
+
const result = tokenizeString('if');
|
|
967
|
+
if (result !== '[{"kind":"if"},{"kind":"eof"}]') {
|
|
968
|
+
throw result;
|
|
969
|
+
}
|
|
970
|
+
},
|
|
971
|
+
() => {
|
|
972
|
+
const result = tokenizeString('implements');
|
|
973
|
+
if (result !== '[{"kind":"implements"},{"kind":"eof"}]') {
|
|
974
|
+
throw result;
|
|
975
|
+
}
|
|
976
|
+
},
|
|
977
|
+
() => {
|
|
978
|
+
const result = tokenizeString('import');
|
|
979
|
+
if (result !== '[{"kind":"import"},{"kind":"eof"}]') {
|
|
980
|
+
throw result;
|
|
981
|
+
}
|
|
982
|
+
},
|
|
983
|
+
() => {
|
|
984
|
+
const result = tokenizeString('in');
|
|
985
|
+
if (result !== '[{"kind":"in"},{"kind":"eof"}]') {
|
|
986
|
+
throw result;
|
|
987
|
+
}
|
|
988
|
+
},
|
|
989
|
+
() => {
|
|
990
|
+
const result = tokenizeString('instanceof');
|
|
991
|
+
if (result !== '[{"kind":"instanceof"},{"kind":"eof"}]') {
|
|
992
|
+
throw result;
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
() => {
|
|
996
|
+
const result = tokenizeString('interface');
|
|
997
|
+
if (result !== '[{"kind":"interface"},{"kind":"eof"}]') {
|
|
998
|
+
throw result;
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
() => {
|
|
1002
|
+
const result = tokenizeString('let');
|
|
1003
|
+
if (result !== '[{"kind":"let"},{"kind":"eof"}]') {
|
|
1004
|
+
throw result;
|
|
1005
|
+
}
|
|
1006
|
+
},
|
|
1007
|
+
() => {
|
|
1008
|
+
const result = tokenizeString('new');
|
|
1009
|
+
if (result !== '[{"kind":"new"},{"kind":"eof"}]') {
|
|
1010
|
+
throw result;
|
|
1011
|
+
}
|
|
1012
|
+
},
|
|
1013
|
+
() => {
|
|
1014
|
+
const result = tokenizeString('package');
|
|
1015
|
+
if (result !== '[{"kind":"package"},{"kind":"eof"}]') {
|
|
1016
|
+
throw result;
|
|
1017
|
+
}
|
|
1018
|
+
},
|
|
1019
|
+
() => {
|
|
1020
|
+
const result = tokenizeString('private');
|
|
1021
|
+
if (result !== '[{"kind":"private"},{"kind":"eof"}]') {
|
|
1022
|
+
throw result;
|
|
1023
|
+
}
|
|
1024
|
+
},
|
|
1025
|
+
() => {
|
|
1026
|
+
const result = tokenizeString('protected');
|
|
1027
|
+
if (result !== '[{"kind":"protected"},{"kind":"eof"}]') {
|
|
1028
|
+
throw result;
|
|
1029
|
+
}
|
|
1030
|
+
},
|
|
1031
|
+
() => {
|
|
1032
|
+
const result = tokenizeString('public');
|
|
1033
|
+
if (result !== '[{"kind":"public"},{"kind":"eof"}]') {
|
|
1034
|
+
throw result;
|
|
1035
|
+
}
|
|
1036
|
+
},
|
|
1037
|
+
() => {
|
|
1038
|
+
const result = tokenizeString('return');
|
|
1039
|
+
if (result !== '[{"kind":"return"},{"kind":"eof"}]') {
|
|
1040
|
+
throw result;
|
|
1041
|
+
}
|
|
1042
|
+
},
|
|
1043
|
+
() => {
|
|
1044
|
+
const result = tokenizeString('static');
|
|
1045
|
+
if (result !== '[{"kind":"static"},{"kind":"eof"}]') {
|
|
1046
|
+
throw result;
|
|
1047
|
+
}
|
|
1048
|
+
},
|
|
1049
|
+
() => {
|
|
1050
|
+
const result = tokenizeString('super');
|
|
1051
|
+
if (result !== '[{"kind":"super"},{"kind":"eof"}]') {
|
|
1052
|
+
throw result;
|
|
1053
|
+
}
|
|
1054
|
+
},
|
|
1055
|
+
() => {
|
|
1056
|
+
const result = tokenizeString('switch');
|
|
1057
|
+
if (result !== '[{"kind":"switch"},{"kind":"eof"}]') {
|
|
1058
|
+
throw result;
|
|
1059
|
+
}
|
|
1060
|
+
},
|
|
1061
|
+
() => {
|
|
1062
|
+
const result = tokenizeString('this');
|
|
1063
|
+
if (result !== '[{"kind":"this"},{"kind":"eof"}]') {
|
|
1064
|
+
throw result;
|
|
1065
|
+
}
|
|
1066
|
+
},
|
|
1067
|
+
() => {
|
|
1068
|
+
const result = tokenizeString('throw');
|
|
1069
|
+
if (result !== '[{"kind":"throw"},{"kind":"eof"}]') {
|
|
1070
|
+
throw result;
|
|
1071
|
+
}
|
|
1072
|
+
},
|
|
1073
|
+
() => {
|
|
1074
|
+
const result = tokenizeString('try');
|
|
1075
|
+
if (result !== '[{"kind":"try"},{"kind":"eof"}]') {
|
|
1076
|
+
throw result;
|
|
1077
|
+
}
|
|
1078
|
+
},
|
|
1079
|
+
() => {
|
|
1080
|
+
const result = tokenizeString('typeof');
|
|
1081
|
+
if (result !== '[{"kind":"typeof"},{"kind":"eof"}]') {
|
|
1082
|
+
throw result;
|
|
1083
|
+
}
|
|
1084
|
+
},
|
|
1085
|
+
() => {
|
|
1086
|
+
const result = tokenizeString('var');
|
|
1087
|
+
if (result !== '[{"kind":"var"},{"kind":"eof"}]') {
|
|
1088
|
+
throw result;
|
|
1089
|
+
}
|
|
1090
|
+
},
|
|
1091
|
+
() => {
|
|
1092
|
+
const result = tokenizeString('void');
|
|
1093
|
+
if (result !== '[{"kind":"void"},{"kind":"eof"}]') {
|
|
1094
|
+
throw result;
|
|
1095
|
+
}
|
|
1096
|
+
},
|
|
1097
|
+
() => {
|
|
1098
|
+
const result = tokenizeString('while');
|
|
1099
|
+
if (result !== '[{"kind":"while"},{"kind":"eof"}]') {
|
|
1100
|
+
throw result;
|
|
1101
|
+
}
|
|
1102
|
+
},
|
|
1103
|
+
() => {
|
|
1104
|
+
const result = tokenizeString('with');
|
|
1105
|
+
if (result !== '[{"kind":"with"},{"kind":"eof"}]') {
|
|
1106
|
+
throw result;
|
|
1107
|
+
}
|
|
1108
|
+
},
|
|
1109
|
+
() => {
|
|
1110
|
+
const result = tokenizeString('yield');
|
|
1111
|
+
if (result !== '[{"kind":"yield"},{"kind":"eof"}]') {
|
|
1112
|
+
throw result;
|
|
1113
|
+
}
|
|
1114
|
+
},
|
|
1115
|
+
],
|
|
988
1116
|
throw: {
|
|
989
1117
|
parse: () => { parse(''); }
|
|
990
1118
|
},
|