firefly-compiler 0.5.35 → 0.5.37
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/.hintrc +4 -4
- package/.vscode/settings.json +4 -4
- package/bin/Release.ff +157 -154
- package/bin/firefly.mjs +1 -1
- package/compiler/Builder.ff +275 -277
- package/compiler/Compiler.ff +234 -233
- package/compiler/Dependencies.ff +186 -187
- package/compiler/DependencyLock.ff +17 -17
- package/compiler/Deriver.ff +23 -31
- package/compiler/Dictionaries.ff +1 -1
- package/compiler/Inference.ff +43 -20
- package/compiler/JsEmitter.ff +1437 -1282
- package/compiler/LspHook.ff +202 -202
- package/compiler/Main.ff +25 -24
- package/compiler/ModuleCache.ff +178 -178
- package/compiler/Parser.ff +36 -109
- package/compiler/Resolver.ff +5 -8
- package/compiler/Substitution.ff +1 -1
- package/compiler/Syntax.ff +1 -16
- package/compiler/Token.ff +9 -0
- package/compiler/Tokenizer.ff +4 -0
- package/compiler/Workspace.ff +88 -88
- package/core/.firefly/include/package.json +5 -5
- package/core/.firefly/package.ff +2 -2
- package/core/Any.ff +26 -30
- package/core/Array.ff +298 -265
- package/core/Atomic.ff +63 -64
- package/core/Box.ff +7 -7
- package/core/BrowserSystem.ff +40 -40
- package/core/Buffer.ff +185 -152
- package/core/BuildSystem.ff +156 -148
- package/core/Channel.ff +95 -92
- package/core/Char.ff +3 -2
- package/core/Core.ff +16 -23
- package/core/Crypto.ff +94 -96
- package/core/Equal.ff +41 -36
- package/core/Error.ff +15 -10
- package/core/FileHandle.ff +45 -37
- package/core/Float.ff +176 -200
- package/core/HttpClient.ff +142 -148
- package/core/Instant.ff +6 -8
- package/core/Int.ff +40 -24
- package/core/IntMap.ff +61 -39
- package/core/Js.ff +305 -0
- package/core/JsSystem.ff +135 -114
- package/core/JsValue.ff +303 -159
- package/core/Json.ff +423 -443
- package/core/List.ff +482 -486
- package/core/Lock.ff +108 -144
- package/core/Log.ff +25 -14
- package/core/NodeSystem.ff +198 -191
- package/core/Ordering.ff +160 -161
- package/core/Path.ff +377 -409
- package/core/Queue.ff +90 -0
- package/core/Random.ff +140 -134
- package/core/RbMap.ff +216 -216
- package/core/Serializable.ff +16 -13
- package/core/Show.ff +44 -43
- package/core/SourceLocation.ff +68 -68
- package/core/Stream.ff +1 -1
- package/core/String.ff +224 -202
- package/core/StringMap.ff +58 -36
- package/core/Task.ff +165 -149
- package/experimental/benchmarks/ListGrab.ff +23 -23
- package/experimental/benchmarks/ListGrab.java +55 -55
- package/experimental/benchmarks/Pyrotek45.ff +30 -30
- package/experimental/benchmarks/Pyrotek45.java +64 -64
- package/experimental/bidirectional/Bidi.ff +88 -88
- package/experimental/lines/Main.ff +40 -0
- package/experimental/random/Index.ff +53 -53
- package/experimental/random/Process.ff +120 -120
- package/experimental/random/RunLength.ff +65 -65
- package/experimental/random/Scrape.ff +51 -51
- package/experimental/random/Symbols.ff +73 -73
- package/experimental/random/Tensor.ff +52 -52
- package/experimental/random/Units.ff +36 -36
- package/experimental/s3/S3TestAuthorizationHeader.ff +39 -39
- package/experimental/s3/S3TestPut.ff +16 -16
- package/experimental/tests/TestJson.ff +26 -26
- package/firefly.sh +0 -0
- package/fireflysite/.firefly/package.ff +4 -4
- package/fireflysite/CommunityOverview.ff +20 -20
- package/fireflysite/CountingButtonDemo.ff +58 -58
- package/fireflysite/DocumentParser.ff +325 -331
- package/fireflysite/ExamplesOverview.ff +40 -40
- package/fireflysite/FrontPage.ff +344 -344
- package/fireflysite/GettingStarted.ff +45 -45
- package/fireflysite/Guide.ff +456 -456
- package/fireflysite/Main.ff +163 -152
- package/fireflysite/MatchingPasswordsDemo.ff +82 -82
- package/fireflysite/PackagesOverview.ff +49 -49
- package/fireflysite/PostgresqlDemo.ff +34 -34
- package/fireflysite/ReferenceAll.ff +18 -18
- package/fireflysite/ReferenceIntroduction.ff +11 -11
- package/fireflysite/Styles.ff +567 -567
- package/fireflysite/Test.ff +121 -62
- package/fireflysite/assets/markdown/reference/BaseTypes.md +209 -209
- package/fireflysite/assets/markdown/reference/EmittedJavascript.md +65 -65
- package/fireflysite/assets/markdown/reference/Exceptions.md +101 -101
- package/fireflysite/assets/markdown/reference/FunctionsAndMethods.md +364 -364
- package/fireflysite/assets/markdown/reference/JavascriptInterop.md +235 -172
- package/fireflysite/assets/markdown/reference/ModulesAndPackages.md +162 -162
- package/fireflysite/assets/markdown/reference/OldStructuredConcurrency.md +48 -48
- package/fireflysite/assets/markdown/reference/PatternMatching.md +224 -224
- package/fireflysite/assets/markdown/reference/StatementsAndExpressions.md +86 -86
- package/fireflysite/assets/markdown/reference/StructuredConcurrency.md +99 -99
- package/fireflysite/assets/markdown/reference/TraitsAndInstances.md +100 -100
- package/fireflysite/assets/markdown/reference/UserDefinedTypes.md +184 -184
- package/fireflysite/assets/markdown/scratch/ControlFlow.md +136 -136
- package/fireflysite/assets/markdown/scratch/Toc.md +40 -40
- package/lsp/.firefly/package.ff +1 -1
- package/lsp/CompletionHandler.ff +827 -827
- package/lsp/Handler.ff +714 -714
- package/lsp/HoverHandler.ff +79 -79
- package/lsp/LanguageServer.ff +272 -272
- package/lsp/SignatureHelpHandler.ff +55 -55
- package/lsp/SymbolHandler.ff +181 -181
- package/lsp/TestReferences.ff +17 -17
- package/lsp/TestReferencesCase.ff +7 -7
- package/lsp/stderr.txt +1 -1
- package/lsp/stdout.txt +34 -34
- package/lux/.firefly/package.ff +1 -1
- package/lux/Css.ff +648 -648
- package/lux/CssTest.ff +48 -48
- package/lux/Lux.ff +608 -617
- package/lux/LuxEvent.ff +79 -116
- package/lux/Main.ff +123 -123
- package/lux/Main2.ff +143 -143
- package/lux/TestDry.ff +28 -28
- package/output/js/ff/compiler/Builder.mjs +72 -71
- package/output/js/ff/compiler/Compiler.mjs +19 -13
- package/output/js/ff/compiler/Dependencies.mjs +8 -7
- package/output/js/ff/compiler/DependencyLock.mjs +6 -4
- package/output/js/ff/compiler/Deriver.mjs +26 -24
- package/output/js/ff/compiler/Dictionaries.mjs +14 -18
- package/output/js/ff/compiler/Environment.mjs +6 -4
- package/output/js/ff/compiler/Inference.mjs +238 -164
- package/output/js/ff/compiler/JsEmitter.mjs +1160 -350
- package/output/js/ff/compiler/JsImporter.mjs +20 -18
- package/output/js/ff/compiler/LspHook.mjs +12 -10
- package/output/js/ff/compiler/Main.mjs +61 -41
- package/output/js/ff/compiler/ModuleCache.mjs +10 -8
- package/output/js/ff/compiler/Parser.mjs +153 -669
- package/output/js/ff/compiler/Patterns.mjs +12 -10
- package/output/js/ff/compiler/Resolver.mjs +52 -78
- package/output/js/ff/compiler/Substitution.mjs +12 -16
- package/output/js/ff/compiler/Syntax.mjs +50 -341
- package/output/js/ff/compiler/Token.mjs +126 -4
- package/output/js/ff/compiler/Tokenizer.mjs +62 -52
- package/output/js/ff/compiler/Unification.mjs +74 -90
- package/output/js/ff/compiler/Wildcards.mjs +4 -2
- package/output/js/ff/compiler/Workspace.mjs +26 -20
- package/output/js/ff/core/Any.mjs +20 -20
- package/output/js/ff/core/Array.mjs +268 -175
- package/output/js/ff/core/AssetSystem.mjs +8 -6
- package/output/js/ff/core/Atomic.mjs +84 -52
- package/output/js/ff/core/Bool.mjs +6 -4
- package/output/js/ff/core/BrowserSystem.mjs +38 -29
- package/output/js/ff/core/Buffer.mjs +285 -133
- package/output/js/ff/core/BuildSystem.mjs +36 -56
- package/output/js/ff/core/Channel.mjs +250 -97
- package/output/js/ff/core/Char.mjs +5 -3
- package/output/js/ff/core/Core.mjs +28 -34
- package/output/js/ff/core/Crypto.mjs +30 -52
- package/output/js/ff/core/Duration.mjs +4 -2
- package/output/js/ff/core/Equal.mjs +14 -12
- package/output/js/ff/core/Error.mjs +17 -11
- package/output/js/ff/core/FileHandle.mjs +76 -38
- package/output/js/ff/core/Float.mjs +92 -160
- package/output/js/ff/core/HttpClient.mjs +208 -76
- package/output/js/ff/core/Instant.mjs +8 -10
- package/output/js/ff/core/Int.mjs +36 -26
- package/output/js/ff/core/IntMap.mjs +79 -33
- package/output/js/ff/core/Js.mjs +751 -0
- package/output/js/ff/core/JsSystem.mjs +54 -60
- package/output/js/ff/core/JsValue.mjs +294 -143
- package/output/js/ff/core/Json.mjs +443 -253
- package/output/js/ff/core/List.mjs +262 -214
- package/output/js/ff/core/Lock.mjs +156 -125
- package/output/js/ff/core/Log.mjs +20 -10
- package/output/js/ff/core/Map.mjs +10 -8
- package/output/js/ff/core/NodeSystem.mjs +189 -123
- package/output/js/ff/core/Nothing.mjs +4 -2
- package/output/js/ff/core/Option.mjs +40 -38
- package/output/js/ff/core/Ordering.mjs +26 -20
- package/output/js/ff/core/Pair.mjs +4 -2
- package/output/js/ff/core/Path.mjs +517 -315
- package/output/js/ff/core/Queue.mjs +306 -0
- package/output/js/ff/core/Random.mjs +141 -77
- package/output/js/ff/core/RbMap.mjs +36 -34
- package/output/js/ff/core/Serializable.mjs +44 -28
- package/output/js/ff/core/Set.mjs +6 -4
- package/output/js/ff/core/Show.mjs +8 -6
- package/output/js/ff/core/SourceLocation.mjs +4 -2
- package/output/js/ff/core/Stream.mjs +30 -50
- package/output/js/ff/core/String.mjs +263 -172
- package/output/js/ff/core/StringMap.mjs +77 -31
- package/output/js/ff/core/Task.mjs +91 -76
- package/output/js/ff/core/Try.mjs +20 -18
- package/output/js/ff/core/Unit.mjs +4 -2
- package/package.json +1 -1
- package/postgresql/Pg.ff +53 -59
- package/rpc/.firefly/package.ff +1 -1
- package/rpc/Rpc.ff +70 -70
- package/s3/.firefly/package.ff +1 -1
- package/s3/S3.ff +92 -94
- package/vscode/LICENSE.txt +21 -21
- package/vscode/Prepublish.ff +15 -15
- package/vscode/README.md +16 -16
- package/vscode/client/package-lock.json +544 -544
- package/vscode/client/package.json +22 -22
- package/vscode/client/src/extension.ts +104 -104
- package/vscode/icons/firefly-icon.svg +10 -10
- package/vscode/language-configuration.json +61 -61
- package/vscode/package-lock.json +3623 -3623
- package/vscode/package.json +1 -1
- package/vscode/snippets.json +241 -241
- package/vscode/syntaxes/firefly-markdown-injection.json +45 -45
- package/webserver/.firefly/include/package.json +5 -5
- package/webserver/.firefly/package.ff +2 -2
- package/webserver/WebServer.ff +647 -685
- package/websocket/.firefly/package.ff +1 -1
- package/websocket/WebSocket.ff +100 -131
- package/core/UnsafeJs.ff +0 -42
- package/output/js/ff/core/UnsafeJs.mjs +0 -191
|
@@ -52,6 +52,8 @@ import * as ff_core_Int from "../../ff/core/Int.mjs"
|
|
|
52
52
|
|
|
53
53
|
import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
|
|
54
54
|
|
|
55
|
+
import * as ff_core_Js from "../../ff/core/Js.mjs"
|
|
56
|
+
|
|
55
57
|
import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
|
|
56
58
|
|
|
57
59
|
import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
|
|
@@ -78,6 +80,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
|
|
|
78
80
|
|
|
79
81
|
import * as ff_core_Path from "../../ff/core/Path.mjs"
|
|
80
82
|
|
|
83
|
+
import * as ff_core_Queue from "../../ff/core/Queue.mjs"
|
|
84
|
+
|
|
81
85
|
import * as ff_core_Random from "../../ff/core/Random.mjs"
|
|
82
86
|
|
|
83
87
|
import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
|
|
@@ -100,8 +104,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
|
|
|
100
104
|
|
|
101
105
|
import * as ff_core_Unit from "../../ff/core/Unit.mjs"
|
|
102
106
|
|
|
103
|
-
import * as ff_core_UnsafeJs from "../../ff/core/UnsafeJs.mjs"
|
|
104
|
-
|
|
105
107
|
// type Parser
|
|
106
108
|
export function Parser(packagePair_, file_, tokens_, end_, targetIsNode_, lspHook_, lspEmittedArgumentHook_, offset_, nextUnificationVariableIndex_) {
|
|
107
109
|
return {packagePair_, file_, tokens_, end_, targetIsNode_, lspHook_, lspEmittedArgumentHook_, offset_, nextUnificationVariableIndex_};
|
|
@@ -112,125 +114,16 @@ export function Poly(generics_, constraints_) {
|
|
|
112
114
|
return {generics_, constraints_};
|
|
113
115
|
}
|
|
114
116
|
|
|
115
|
-
|
|
116
|
-
export function ParsedTargets(js_, jsSync_, jsAsync_, browser_, browserSync_, browserAsync_, node_, nodeSync_, nodeAsync_) {
|
|
117
|
-
return {js_, jsSync_, jsAsync_, browser_, browserSync_, browserAsync_, node_, nodeSync_, nodeAsync_};
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export const binaryOperators_ = [["||"], ["&&"], ["!=", "=="], ["<=", ">=", "<", ">"], ["+", "-"], ["*", "/", "%"], ["^"]];
|
|
117
|
+
export const binaryOperators_ = [["||"], ["&&"], ["!=", "==", "!==", "==="], ["<=", ">=", "<", ">"], ["+", "-"], ["*", "/", "%"], ["^"]];
|
|
121
118
|
|
|
122
119
|
export function new_(packagePair_, file_, tokens_, targetIsNode_, lspHook_) {
|
|
123
120
|
return ff_compiler_Parser.Parser(packagePair_, file_, tokens_, ff_core_List.List_grabLast(tokens_), targetIsNode_, lspHook_, false, 0, 1)
|
|
124
121
|
}
|
|
125
122
|
|
|
126
|
-
export function findBestTarget_(targetIsNode_, body_, targets_) {
|
|
127
|
-
const foreignTarget_ = (targetIsNode_
|
|
128
|
-
? (function() {
|
|
129
|
-
const sync_ = ff_core_Option.Option_orElse(targets_.nodeSync_, (() => {
|
|
130
|
-
return targets_.jsSync_
|
|
131
|
-
}));
|
|
132
|
-
const async_ = ff_core_Option.Option_orElse(targets_.nodeAsync_, (() => {
|
|
133
|
-
return targets_.jsAsync_
|
|
134
|
-
}));
|
|
135
|
-
return ff_compiler_Syntax.ForeignTarget(sync_, async_)
|
|
136
|
-
})()
|
|
137
|
-
: (function() {
|
|
138
|
-
const sync_ = ff_core_Option.Option_orElse(targets_.browserSync_, (() => {
|
|
139
|
-
return targets_.jsSync_
|
|
140
|
-
}));
|
|
141
|
-
const async_ = ff_core_Option.Option_orElse(targets_.browserAsync_, (() => {
|
|
142
|
-
return targets_.jsAsync_
|
|
143
|
-
}));
|
|
144
|
-
return ff_compiler_Syntax.ForeignTarget(sync_, async_)
|
|
145
|
-
})());
|
|
146
|
-
{
|
|
147
|
-
const _1 = foreignTarget_;
|
|
148
|
-
if(_1.ForeignTarget && _1.syncCode_.None && _1.asyncCode_.None && targetIsNode_) {
|
|
149
|
-
return ff_core_Option.Option_else(ff_core_Option.Option_map(ff_core_Option.Option_orElse(targets_.node_, (() => {
|
|
150
|
-
return ff_core_Option.Option_orElse(targets_.js_, (() => {
|
|
151
|
-
return body_
|
|
152
|
-
}))
|
|
153
|
-
})), ((_w1) => {
|
|
154
|
-
return ff_compiler_Syntax.FireflyTarget(_w1)
|
|
155
|
-
})), (() => {
|
|
156
|
-
return foreignTarget_
|
|
157
|
-
}))
|
|
158
|
-
return
|
|
159
|
-
}
|
|
160
|
-
if(_1.ForeignTarget && _1.syncCode_.None && _1.asyncCode_.None && (!targetIsNode_)) {
|
|
161
|
-
return ff_core_Option.Option_else(ff_core_Option.Option_map(ff_core_Option.Option_orElse(targets_.browser_, (() => {
|
|
162
|
-
return ff_core_Option.Option_orElse(targets_.js_, (() => {
|
|
163
|
-
return body_
|
|
164
|
-
}))
|
|
165
|
-
})), ((_w1) => {
|
|
166
|
-
return ff_compiler_Syntax.FireflyTarget(_w1)
|
|
167
|
-
})), (() => {
|
|
168
|
-
return foreignTarget_
|
|
169
|
-
}))
|
|
170
|
-
return
|
|
171
|
-
}
|
|
172
|
-
{
|
|
173
|
-
return foreignTarget_
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
123
|
export async function new_$(packagePair_, file_, tokens_, targetIsNode_, lspHook_, $task) {
|
|
179
124
|
return ff_compiler_Parser.Parser(packagePair_, file_, tokens_, ff_core_List.List_grabLast(tokens_), targetIsNode_, lspHook_, false, 0, 1)
|
|
180
125
|
}
|
|
181
126
|
|
|
182
|
-
export async function findBestTarget_$(targetIsNode_, body_, targets_, $task) {
|
|
183
|
-
const foreignTarget_ = (targetIsNode_
|
|
184
|
-
? (await (async function() {
|
|
185
|
-
const sync_ = ff_core_Option.Option_orElse(targets_.nodeSync_, (() => {
|
|
186
|
-
return targets_.jsSync_
|
|
187
|
-
}));
|
|
188
|
-
const async_ = ff_core_Option.Option_orElse(targets_.nodeAsync_, (() => {
|
|
189
|
-
return targets_.jsAsync_
|
|
190
|
-
}));
|
|
191
|
-
return ff_compiler_Syntax.ForeignTarget(sync_, async_)
|
|
192
|
-
})())
|
|
193
|
-
: (await (async function() {
|
|
194
|
-
const sync_ = ff_core_Option.Option_orElse(targets_.browserSync_, (() => {
|
|
195
|
-
return targets_.jsSync_
|
|
196
|
-
}));
|
|
197
|
-
const async_ = ff_core_Option.Option_orElse(targets_.browserAsync_, (() => {
|
|
198
|
-
return targets_.jsAsync_
|
|
199
|
-
}));
|
|
200
|
-
return ff_compiler_Syntax.ForeignTarget(sync_, async_)
|
|
201
|
-
})()));
|
|
202
|
-
{
|
|
203
|
-
const _1 = foreignTarget_;
|
|
204
|
-
if(_1.ForeignTarget && _1.syncCode_.None && _1.asyncCode_.None && targetIsNode_) {
|
|
205
|
-
return ff_core_Option.Option_else(ff_core_Option.Option_map(ff_core_Option.Option_orElse(targets_.node_, (() => {
|
|
206
|
-
return ff_core_Option.Option_orElse(targets_.js_, (() => {
|
|
207
|
-
return body_
|
|
208
|
-
}))
|
|
209
|
-
})), ((_w1) => {
|
|
210
|
-
return ff_compiler_Syntax.FireflyTarget(_w1)
|
|
211
|
-
})), (() => {
|
|
212
|
-
return foreignTarget_
|
|
213
|
-
}))
|
|
214
|
-
return
|
|
215
|
-
}
|
|
216
|
-
if(_1.ForeignTarget && _1.syncCode_.None && _1.asyncCode_.None && (!targetIsNode_)) {
|
|
217
|
-
return ff_core_Option.Option_else(ff_core_Option.Option_map(ff_core_Option.Option_orElse(targets_.browser_, (() => {
|
|
218
|
-
return ff_core_Option.Option_orElse(targets_.js_, (() => {
|
|
219
|
-
return body_
|
|
220
|
-
}))
|
|
221
|
-
})), ((_w1) => {
|
|
222
|
-
return ff_compiler_Syntax.FireflyTarget(_w1)
|
|
223
|
-
})), (() => {
|
|
224
|
-
return foreignTarget_
|
|
225
|
-
}))
|
|
226
|
-
return
|
|
227
|
-
}
|
|
228
|
-
{
|
|
229
|
-
return foreignTarget_
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
127
|
export function Parser_fail(self_, at_, message_) {
|
|
235
128
|
return ff_core_Core.panic_(((message_ + " ") + ff_compiler_Syntax.Location_show(at_)))
|
|
236
129
|
}
|
|
@@ -249,7 +142,7 @@ return self_.end_
|
|
|
249
142
|
|
|
250
143
|
export function Parser_current(self_) {
|
|
251
144
|
if((self_.offset_ < self_.tokens_.length)) {
|
|
252
|
-
return (self_.tokens_[self_.offset_] ?? ff_core_List.
|
|
145
|
+
return (self_.tokens_[self_.offset_] ?? ff_core_List.List_grab(self_.tokens_, self_.offset_))
|
|
253
146
|
} else {
|
|
254
147
|
return self_.end_
|
|
255
148
|
}
|
|
@@ -324,10 +217,12 @@ return ff_compiler_Parser.Parser_skip(self_, kind_)
|
|
|
324
217
|
|
|
325
218
|
export function Parser_parseModuleWithoutPackageInfo(self_) {
|
|
326
219
|
const moduleWithPackageInfo_ = ff_compiler_Parser.Parser_parseModuleWithPackageInfo(self_);
|
|
327
|
-
|
|
328
|
-
const
|
|
220
|
+
{
|
|
221
|
+
const if_o = moduleWithPackageInfo_.packageInfo_
|
|
222
|
+
if(if_o.Some) {
|
|
223
|
+
const info_ = if_o.value_;
|
|
329
224
|
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(info_.package_.at_, "Package and dependencies already declared in package.ff"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
330
|
-
|
|
225
|
+
}
|
|
331
226
|
};
|
|
332
227
|
return moduleWithPackageInfo_.module_
|
|
333
228
|
}
|
|
@@ -432,137 +327,16 @@ if(self_.lspHook_.trackSymbols_) {
|
|
|
432
327
|
ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseSymbolBegin())
|
|
433
328
|
};
|
|
434
329
|
const signature_ = ff_compiler_Parser.Parser_parseSignature(self_, member_);
|
|
435
|
-
const body_ =
|
|
436
|
-
|
|
437
|
-
: ff_core_Option.None());
|
|
438
|
-
const targets_ = ff_compiler_Parser.Parser_parseTargets(self_, signature_.parameters_.length);
|
|
439
|
-
const bestTarget_ = ff_compiler_Parser.findBestTarget_(self_.targetIsNode_, body_, targets_);
|
|
440
|
-
const result_ = ff_compiler_Syntax.DFunction(signature_.at_, signature_, bestTarget_);
|
|
330
|
+
const body_ = ff_compiler_Parser.Parser_parseLambda(self_, signature_.parameters_.length, false, false);
|
|
331
|
+
const result_ = ff_compiler_Syntax.DFunction(signature_.at_, signature_, body_);
|
|
441
332
|
if(self_.lspHook_.trackSymbols_) {
|
|
442
333
|
ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseSymbolEnd(signature_.name_, ff_compiler_LspHook.SFunction(member_), signature_.at_, (((_c) => {
|
|
443
|
-
return ff_compiler_Syntax.Location(_c.file_, _c.line_, (signature_.at_.column_ +
|
|
334
|
+
return ff_compiler_Syntax.Location(_c.file_, _c.line_, (signature_.at_.column_ + signature_.name_.length))
|
|
444
335
|
}))(signature_.at_), signature_.at_, ff_compiler_Token.Token_end(ff_compiler_Parser.Parser_behind(self_))))
|
|
445
336
|
};
|
|
446
337
|
return result_
|
|
447
338
|
}
|
|
448
339
|
|
|
449
|
-
export function Parser_parseTargets(self_, parameterCount_) {
|
|
450
|
-
function processCode_(code_) {
|
|
451
|
-
const dropCount_ = (ff_core_String.String_startsWith(code_, "\"\"\"", 0)
|
|
452
|
-
? 3
|
|
453
|
-
: 1);
|
|
454
|
-
return ff_core_String.String_replace(ff_core_String.String_replace(ff_core_String.String_replace(ff_core_String.String_replace(ff_core_String.String_replace(ff_core_String.String_dropLast(ff_core_String.String_dropFirst(code_, dropCount_), dropCount_), "\\\"", "\""), "\\r", "\r"), "\\n", "\n"), "\\t", "\t"), "\\\\", "\\")
|
|
455
|
-
}
|
|
456
|
-
let targets_ = ff_compiler_Parser.ParsedTargets(ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None());
|
|
457
|
-
while(((ff_compiler_Parser.Parser_currentIsSeparator(self_, ff_compiler_Token.LSemicolon()) && ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_ahead(self_), ff_compiler_Token.LKeyword())) && ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_ahead(self_), "target"))) {
|
|
458
|
-
ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LSeparator());
|
|
459
|
-
const at_ = ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LKeyword()));
|
|
460
|
-
const target_ = (ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LLower())
|
|
461
|
-
? ff_compiler_Token.Token_raw(ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LLower()))
|
|
462
|
-
: ff_compiler_Token.Token_raw(ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LKeyword())));
|
|
463
|
-
if(ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "{")) {
|
|
464
|
-
const lambda_ = ff_compiler_Parser.Parser_parseLambda(self_, parameterCount_, false, false);
|
|
465
|
-
do {
|
|
466
|
-
const _1 = target_;
|
|
467
|
-
if(_1 === "js") {
|
|
468
|
-
if(ff_core_Equal.notEquals_(targets_.jsSync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
469
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
470
|
-
};
|
|
471
|
-
targets_ = (((_c) => {
|
|
472
|
-
return ff_compiler_Parser.ParsedTargets(ff_core_Option.Some(lambda_), _c.jsSync_, _c.jsAsync_, _c.browser_, _c.browserSync_, _c.browserAsync_, _c.node_, _c.nodeSync_, _c.nodeAsync_)
|
|
473
|
-
}))(targets_)
|
|
474
|
-
break
|
|
475
|
-
}
|
|
476
|
-
if(_1 === "browser") {
|
|
477
|
-
if(ff_core_Equal.notEquals_(targets_.browserSync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
478
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
479
|
-
};
|
|
480
|
-
targets_ = (((_c) => {
|
|
481
|
-
return ff_compiler_Parser.ParsedTargets(_c.js_, _c.jsSync_, _c.jsAsync_, ff_core_Option.Some(lambda_), _c.browserSync_, _c.browserAsync_, _c.node_, _c.nodeSync_, _c.nodeAsync_)
|
|
482
|
-
}))(targets_)
|
|
483
|
-
break
|
|
484
|
-
}
|
|
485
|
-
if(_1 === "node") {
|
|
486
|
-
if(ff_core_Equal.notEquals_(targets_.nodeAsync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
487
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
488
|
-
};
|
|
489
|
-
targets_ = (((_c) => {
|
|
490
|
-
return ff_compiler_Parser.ParsedTargets(_c.js_, _c.jsSync_, _c.jsAsync_, _c.browser_, _c.browserSync_, _c.browserAsync_, ff_core_Option.Some(lambda_), _c.nodeSync_, _c.nodeAsync_)
|
|
491
|
-
}))(targets_)
|
|
492
|
-
break
|
|
493
|
-
}
|
|
494
|
-
{
|
|
495
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Unknown target"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
496
|
-
}
|
|
497
|
-
} while(false)
|
|
498
|
-
} else {
|
|
499
|
-
const mode_ = ff_compiler_Token.Token_raw(ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LKeyword()));
|
|
500
|
-
const code_ = processCode_(ff_compiler_Token.Token_raw(ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LString())));
|
|
501
|
-
do {
|
|
502
|
-
const _1 = ff_core_Pair.Pair(target_, mode_);
|
|
503
|
-
if(_1.first_ === "js" && _1.second_ === "sync") {
|
|
504
|
-
if(ff_core_Equal.notEquals_(targets_.jsSync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
505
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
506
|
-
};
|
|
507
|
-
targets_ = (((_c) => {
|
|
508
|
-
return ff_compiler_Parser.ParsedTargets(_c.js_, ff_core_Option.Some(code_), _c.jsAsync_, _c.browser_, _c.browserSync_, _c.browserAsync_, _c.node_, _c.nodeSync_, _c.nodeAsync_)
|
|
509
|
-
}))(targets_)
|
|
510
|
-
break
|
|
511
|
-
}
|
|
512
|
-
if(_1.first_ === "js" && _1.second_ === "async") {
|
|
513
|
-
if(ff_core_Equal.notEquals_(targets_.jsAsync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
514
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
515
|
-
};
|
|
516
|
-
targets_ = (((_c) => {
|
|
517
|
-
return ff_compiler_Parser.ParsedTargets(_c.js_, _c.jsSync_, ff_core_Option.Some(code_), _c.browser_, _c.browserSync_, _c.browserAsync_, _c.node_, _c.nodeSync_, _c.nodeAsync_)
|
|
518
|
-
}))(targets_)
|
|
519
|
-
break
|
|
520
|
-
}
|
|
521
|
-
if(_1.first_ === "browser" && _1.second_ === "sync") {
|
|
522
|
-
if(ff_core_Equal.notEquals_(targets_.browserSync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
523
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
524
|
-
};
|
|
525
|
-
targets_ = (((_c) => {
|
|
526
|
-
return ff_compiler_Parser.ParsedTargets(_c.js_, _c.jsSync_, _c.jsAsync_, _c.browser_, ff_core_Option.Some(code_), _c.browserAsync_, _c.node_, _c.nodeSync_, _c.nodeAsync_)
|
|
527
|
-
}))(targets_)
|
|
528
|
-
break
|
|
529
|
-
}
|
|
530
|
-
if(_1.first_ === "browser" && _1.second_ === "async") {
|
|
531
|
-
if(ff_core_Equal.notEquals_(targets_.browserAsync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
532
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
533
|
-
};
|
|
534
|
-
targets_ = (((_c) => {
|
|
535
|
-
return ff_compiler_Parser.ParsedTargets(_c.js_, _c.jsSync_, _c.jsAsync_, _c.browser_, _c.browserSync_, ff_core_Option.Some(code_), _c.node_, _c.nodeSync_, _c.nodeAsync_)
|
|
536
|
-
}))(targets_)
|
|
537
|
-
break
|
|
538
|
-
}
|
|
539
|
-
if(_1.first_ === "node" && _1.second_ === "sync") {
|
|
540
|
-
if(ff_core_Equal.notEquals_(targets_.nodeSync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
541
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
542
|
-
};
|
|
543
|
-
targets_ = (((_c) => {
|
|
544
|
-
return ff_compiler_Parser.ParsedTargets(_c.js_, _c.jsSync_, _c.jsAsync_, _c.browser_, _c.browserSync_, _c.browserAsync_, _c.node_, ff_core_Option.Some(code_), _c.nodeAsync_)
|
|
545
|
-
}))(targets_)
|
|
546
|
-
break
|
|
547
|
-
}
|
|
548
|
-
if(_1.first_ === "node" && _1.second_ === "async") {
|
|
549
|
-
if(ff_core_Equal.notEquals_(targets_.nodeAsync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
550
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
551
|
-
};
|
|
552
|
-
targets_ = (((_c) => {
|
|
553
|
-
return ff_compiler_Parser.ParsedTargets(_c.js_, _c.jsSync_, _c.jsAsync_, _c.browser_, _c.browserSync_, _c.browserAsync_, _c.node_, _c.nodeSync_, ff_core_Option.Some(code_))
|
|
554
|
-
}))(targets_)
|
|
555
|
-
break
|
|
556
|
-
}
|
|
557
|
-
{
|
|
558
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Unknown target or mode"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
559
|
-
}
|
|
560
|
-
} while(false)
|
|
561
|
-
}
|
|
562
|
-
};
|
|
563
|
-
return targets_
|
|
564
|
-
}
|
|
565
|
-
|
|
566
340
|
export function Parser_parseSignature(self_, member_) {
|
|
567
341
|
const nameToken_ = ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LLower());
|
|
568
342
|
const poly_ = (ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "[")
|
|
@@ -600,17 +374,14 @@ ff_compiler_Parser.Parser_skipSeparator(self_, ff_compiler_Token.LSemicolon())
|
|
|
600
374
|
ff_compiler_Parser.Parser_rawSkip(self_, ff_compiler_Token.LBracketRight(), "}");
|
|
601
375
|
if(self_.lspHook_.trackSymbols_) {
|
|
602
376
|
let name_ = ff_compiler_Syntax.Type_show(type_, []);
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
const
|
|
606
|
-
const constraint_ = _1.second_;
|
|
377
|
+
for(let for_a = poly_.generics_, for_i = 0, for_l = for_a.length, for_a2 = poly_.constraints_, for_i2 = 0, for_l2 = for_a2.length; for_i < for_l && for_i2 < for_l2; for_i++, for_i2++) {
|
|
378
|
+
const generic_ = for_a[for_i];
|
|
379
|
+
const constraint_ = for_a2[for_i2];
|
|
607
380
|
name_ = ff_core_String.String_replace(name_, (("[" + generic_) + "]"), (((("[" + generic_) + ": ") + constraint_.name_) + "]"));
|
|
608
381
|
name_ = ff_core_String.String_replace(name_, (("[" + generic_) + ","), (((("[" + generic_) + ": ") + constraint_.name_) + ","));
|
|
609
382
|
name_ = ff_core_String.String_replace(name_, ((", " + generic_) + ","), ((((", " + generic_) + ": ") + constraint_.name_) + ","));
|
|
610
383
|
name_ = ff_core_String.String_replace(name_, ((", " + generic_) + "]"), ((((", " + generic_) + ": ") + constraint_.name_) + "]"))
|
|
611
|
-
|
|
612
|
-
}
|
|
613
|
-
}));
|
|
384
|
+
};
|
|
614
385
|
ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseSymbolEnd(name_, ff_compiler_LspHook.SExtend(), ff_compiler_Token.Token_at(nameToken_), ff_compiler_Token.Token_end(nameToken_), ff_compiler_Token.Token_at(extendToken_), ff_compiler_Token.Token_end(ff_compiler_Parser.Parser_behind(self_))))
|
|
615
386
|
};
|
|
616
387
|
return ff_compiler_Syntax.DExtend(ff_compiler_Token.Token_at(nameToken_), ff_compiler_Token.Token_raw(nameToken_), poly_.generics_, poly_.constraints_, type_, ff_core_Array.Array_toList(methods_, 0, 9007199254740991))
|
|
@@ -903,7 +674,7 @@ const parts_ = ff_core_String.String_split(ff_compiler_Token.Token_raw(majorMino
|
|
|
903
674
|
const patch_ = (ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LDot())
|
|
904
675
|
? (ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LDot()), ff_core_String.String_grabInt(ff_compiler_Token.Token_raw(ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LInt()))))
|
|
905
676
|
: 0);
|
|
906
|
-
return ff_compiler_Syntax.Version(ff_compiler_Token.Token_at(majorMinor_), ff_core_String.String_grabInt((parts_[0] ?? ff_core_List.
|
|
677
|
+
return ff_compiler_Syntax.Version(ff_compiler_Token.Token_at(majorMinor_), ff_core_String.String_grabInt((parts_[0] ?? ff_core_List.List_grab(parts_, 0))), ff_core_String.String_grabInt((parts_[1] ?? ff_core_List.List_grab(parts_, 1))), patch_)
|
|
907
678
|
} else {
|
|
908
679
|
const major_ = ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LInt());
|
|
909
680
|
return ff_compiler_Syntax.Version(ff_compiler_Token.Token_at(major_), ff_core_String.String_grabInt(ff_compiler_Token.Token_raw(major_)), 0, 0)
|
|
@@ -1320,7 +1091,7 @@ if((ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_comp
|
|
|
1320
1091
|
return ff_compiler_Parser.Parser_parseFunctions(self_)
|
|
1321
1092
|
} else {
|
|
1322
1093
|
const term_ = ff_compiler_Parser.Parser_parseTerm(self_);
|
|
1323
|
-
if((
|
|
1094
|
+
if((!ff_compiler_Token.Token_is5(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssign(), ff_compiler_Token.LAssignPlus(), ff_compiler_Token.LAssignMinus(), ff_compiler_Token.LAssignMultiplication(), ff_compiler_Token.LAssignDivision()))) {
|
|
1324
1095
|
return term_
|
|
1325
1096
|
} else {
|
|
1326
1097
|
const token_ = ff_core_Core.do_((() => {
|
|
@@ -1330,9 +1101,17 @@ return ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssignPlus())
|
|
|
1330
1101
|
if(ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssignMinus())) {
|
|
1331
1102
|
return ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssignMinus())
|
|
1332
1103
|
} else {
|
|
1104
|
+
if(ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssignMultiplication())) {
|
|
1105
|
+
return ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssignMultiplication())
|
|
1106
|
+
} else {
|
|
1107
|
+
if(ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssignDivision())) {
|
|
1108
|
+
return ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssignDivision())
|
|
1109
|
+
} else {
|
|
1333
1110
|
return ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssign())
|
|
1334
1111
|
}
|
|
1335
1112
|
}
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1336
1115
|
}));
|
|
1337
1116
|
const operator_ = ff_core_String.String_dropLast(ff_compiler_Token.Token_raw(token_), 1);
|
|
1338
1117
|
const value_ = ff_compiler_Parser.Parser_parseTerm(self_);
|
|
@@ -1400,10 +1179,10 @@ const temporaryEffect_ = ff_compiler_Syntax.TConstructor(functionAt_, "Temporary
|
|
|
1400
1179
|
return ff_compiler_Syntax.Lambda(functionAt_, temporaryEffect_, [])
|
|
1401
1180
|
})()
|
|
1402
1181
|
: ff_compiler_Parser.Parser_parseLambda(self_, signature_.parameters_.length, false, false));
|
|
1403
|
-
functions_.array.push(ff_compiler_Syntax.DFunction(signature_.at_, signature_,
|
|
1182
|
+
functions_.array.push(ff_compiler_Syntax.DFunction(signature_.at_, signature_, body_));
|
|
1404
1183
|
if(self_.lspHook_.trackSymbols_) {
|
|
1405
1184
|
ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseSymbolEnd(signature_.name_, ff_compiler_LspHook.SFunction(false), signature_.at_, (((_c) => {
|
|
1406
|
-
return ff_compiler_Syntax.Location(_c.file_, _c.line_, (signature_.at_.column_ +
|
|
1185
|
+
return ff_compiler_Syntax.Location(_c.file_, _c.line_, (signature_.at_.column_ + signature_.name_.length))
|
|
1407
1186
|
}))(signature_.at_), functionAt_, ff_compiler_Token.Token_end(ff_compiler_Parser.Parser_behind(self_))))
|
|
1408
1187
|
};
|
|
1409
1188
|
if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!ff_compiler_Parser.Parser_currentIsSeparator(self_, ff_compiler_Token.LSemicolon())))) {
|
|
@@ -1424,7 +1203,7 @@ export function Parser_parseBinary(self_, level_) {
|
|
|
1424
1203
|
if((level_ >= ff_compiler_Parser.binaryOperators_.length)) {
|
|
1425
1204
|
return ff_compiler_Parser.Parser_parseUnary(self_)
|
|
1426
1205
|
} else {
|
|
1427
|
-
const operators_ = (ff_compiler_Parser.binaryOperators_[level_] ?? ff_core_List.
|
|
1206
|
+
const operators_ = (ff_compiler_Parser.binaryOperators_[level_] ?? ff_core_List.List_grab(ff_compiler_Parser.binaryOperators_, level_));
|
|
1428
1207
|
let result_ = ff_compiler_Parser.Parser_parseBinary(self_, (level_ + 1));
|
|
1429
1208
|
if(ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LOperator())) {
|
|
1430
1209
|
while(ff_core_List.List_any(operators_, ((value_) => {
|
|
@@ -1453,6 +1232,12 @@ return ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EVariable(ff_compiler_T
|
|
|
1453
1232
|
if(_1 === ">=") {
|
|
1454
1233
|
return ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EVariable(ff_compiler_Token.Token_at(token_), "ff:core/Ordering.notBefore"), false)
|
|
1455
1234
|
}
|
|
1235
|
+
if(_1 === "===") {
|
|
1236
|
+
return ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EVariable(ff_compiler_Token.Token_at(token_), "ff:core/JsValue.JsValue_equals"), false)
|
|
1237
|
+
}
|
|
1238
|
+
if(_1 === "!==") {
|
|
1239
|
+
return ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EVariable(ff_compiler_Token.Token_at(token_), "ff:core/JsValue.JsValue_notEquals"), false)
|
|
1240
|
+
}
|
|
1456
1241
|
{
|
|
1457
1242
|
const o_ = _1;
|
|
1458
1243
|
return ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EVariable(ff_compiler_Token.Token_at(token_), o_), false)
|
|
@@ -1498,12 +1283,12 @@ const token_ = ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LLower())
|
|
|
1498
1283
|
result_ = ff_compiler_Syntax.EField(ff_compiler_Token.Token_at(token_), false, result_, ff_compiler_Token.Token_raw(token_))
|
|
1499
1284
|
}
|
|
1500
1285
|
} else if(ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LArrowThin())) {
|
|
1501
|
-
result_ = ff_compiler_Parser.Parser_parseDynamicMember(self_, result_)
|
|
1286
|
+
result_ = ff_compiler_Parser.Parser_parseDynamicMember(self_, result_, false)
|
|
1502
1287
|
} else if(ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LUnary())) {
|
|
1503
1288
|
const token_ = ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LUnary());
|
|
1504
1289
|
const method_ = (ff_compiler_Token.Token_rawIs(token_, "!")
|
|
1505
|
-
? "ff:core/
|
|
1506
|
-
: "ff:core/
|
|
1290
|
+
? "ff:core/Js.value"
|
|
1291
|
+
: "ff:core/Js.fromValue");
|
|
1507
1292
|
const target_ = ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EVariable(ff_compiler_Token.Token_at(token_), method_), false);
|
|
1508
1293
|
const effect_ = ff_compiler_Parser.Parser_freshUnificationVariable(self_, ff_compiler_Token.Token_at(token_));
|
|
1509
1294
|
result_ = ff_compiler_Syntax.ECall(ff_compiler_Token.Token_at(token_), target_, effect_, [], [ff_compiler_Syntax.Argument(result_.at_, ff_core_Option.None(), result_)], [])
|
|
@@ -1525,7 +1310,21 @@ result_ = ff_compiler_Syntax.EField(ff_compiler_Token.Token_at(token_), false, r
|
|
|
1525
1310
|
return result_
|
|
1526
1311
|
}
|
|
1527
1312
|
|
|
1528
|
-
export function Parser_parseDynamicMember(self_, record_) {
|
|
1313
|
+
export function Parser_parseDynamicMember(self_, record_, isModule_) {
|
|
1314
|
+
function recordField_(at_, name_) {
|
|
1315
|
+
{
|
|
1316
|
+
const _1 = record_;
|
|
1317
|
+
if(_1.EVariant) {
|
|
1318
|
+
const e_ = _1;
|
|
1319
|
+
if(isModule_) {
|
|
1320
|
+
return ff_compiler_Syntax.EVariable(at_, ((e_.name_ + ".") + name_))
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
{
|
|
1324
|
+
return ff_compiler_Syntax.EField(at_, false, record_, name_)
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1529
1328
|
const token_ = ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LArrowThin());
|
|
1530
1329
|
if(ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "(")) {
|
|
1531
1330
|
const arguments_ = ff_compiler_Parser.Parser_parseFunctionArguments(self_, ff_compiler_Token.Token_at(token_), false);
|
|
@@ -1535,13 +1334,13 @@ const _1 = ff_core_List.List_indexWhere(arguments_.first_, ((_w1) => {
|
|
|
1535
1334
|
return (!ff_core_Option.Option_isEmpty(_w1.name_))
|
|
1536
1335
|
}));
|
|
1537
1336
|
if(_1.None) {
|
|
1538
|
-
const target_ = ff_compiler_Syntax.DynamicCall(
|
|
1337
|
+
const target_ = ff_compiler_Syntax.DynamicCall(recordField_(ff_compiler_Token.Token_at(token_), ("new" + arguments_.first_.length)), false);
|
|
1539
1338
|
return ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], arguments_.first_, [])
|
|
1540
1339
|
}
|
|
1541
1340
|
if(_1.Some && _1.value_ === 0) {
|
|
1542
|
-
const objectTarget_ = ff_compiler_Syntax.DynamicCall(
|
|
1341
|
+
const objectTarget_ = ff_compiler_Syntax.DynamicCall(recordField_(ff_compiler_Token.Token_at(token_), "object"), false);
|
|
1543
1342
|
let result_ = ff_compiler_Syntax.ECall(record_.at_, objectTarget_, effect_, [], [], []);
|
|
1544
|
-
for(let
|
|
1343
|
+
for(let for_a = arguments_.first_, for_i = 0, for_l = for_a.length; for_i < for_l; for_i++) {
|
|
1545
1344
|
const argument_ = for_a[for_i];
|
|
1546
1345
|
if(ff_core_Option.Option_isEmpty(argument_.name_)) {
|
|
1547
1346
|
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(argument_.at_, "Expected a named argument"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
@@ -1551,16 +1350,16 @@ result_ = ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], [ff_compil
|
|
|
1551
1350
|
};
|
|
1552
1351
|
return result_
|
|
1553
1352
|
}
|
|
1554
|
-
|
|
1353
|
+
{
|
|
1555
1354
|
const i_ = _1.value_;
|
|
1556
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError((arguments_.first_[i_] ?? ff_core_List.
|
|
1355
|
+
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError((arguments_.first_[i_] ?? ff_core_List.List_grab(arguments_.first_, i_)).at_, "Unexpected named argument"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
1557
1356
|
}
|
|
1558
1357
|
}
|
|
1559
1358
|
} else if(ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "{")) {
|
|
1560
1359
|
const lambda_ = ff_compiler_Parser.Parser_parseLambda(self_, 0, false, false);
|
|
1561
1360
|
const effect_ = ff_compiler_Parser.Parser_freshUnificationVariable(self_, record_.at_);
|
|
1562
1361
|
const arguments_ = ff_core_List.List_grabFirst(lambda_.cases_).patterns_.length;
|
|
1563
|
-
const target_ = ff_compiler_Syntax.DynamicCall(
|
|
1362
|
+
const target_ = ff_compiler_Syntax.DynamicCall(recordField_(ff_compiler_Token.Token_at(token_), ("function" + arguments_)), false);
|
|
1564
1363
|
return ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], [ff_compiler_Syntax.Argument(lambda_.at_, ff_core_Option.None(), ff_compiler_Syntax.ELambda(lambda_.at_, lambda_))], [])
|
|
1565
1364
|
} else {
|
|
1566
1365
|
const token_ = (ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LLower())
|
|
@@ -1573,29 +1372,35 @@ const member_ = ff_compiler_Syntax.EString(ff_compiler_Token.Token_at(token_), (
|
|
|
1573
1372
|
: (("\"" + ff_compiler_Token.Token_raw(token_)) + "\"")));
|
|
1574
1373
|
if(ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "(")) {
|
|
1575
1374
|
const arguments_ = ff_compiler_Parser.Parser_parseFunctionArguments(self_, record_.at_, false);
|
|
1576
|
-
|
|
1375
|
+
{
|
|
1376
|
+
const if_o = ff_core_List.List_find(arguments_.first_, ((_w1) => {
|
|
1577
1377
|
return (!ff_core_Option.Option_isEmpty(_w1.name_))
|
|
1578
|
-
}))
|
|
1579
|
-
|
|
1378
|
+
}))
|
|
1379
|
+
if(if_o.Some) {
|
|
1380
|
+
const argument_ = if_o.value_;
|
|
1580
1381
|
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(argument_.at_, "Unexpected named argument"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
1581
|
-
|
|
1382
|
+
}
|
|
1582
1383
|
};
|
|
1583
1384
|
const effect_ = ff_compiler_Parser.Parser_freshUnificationVariable(self_, record_.at_);
|
|
1584
|
-
const target_ = ff_compiler_Syntax.DynamicCall(
|
|
1385
|
+
const target_ = ff_compiler_Syntax.DynamicCall(recordField_(ff_compiler_Token.Token_at(token_), ("call" + arguments_.first_.length)), false);
|
|
1585
1386
|
return ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], [ff_compiler_Syntax.Argument(member_.at_, ff_core_Option.None(), member_), ...arguments_.first_], [])
|
|
1586
|
-
} else if(ff_compiler_Token.
|
|
1387
|
+
} else if(ff_compiler_Token.Token_is5(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssign(), ff_compiler_Token.LAssignPlus(), ff_compiler_Token.LAssignMinus(), ff_compiler_Token.LAssignMultiplication(), ff_compiler_Token.LAssignDivision())) {
|
|
1587
1388
|
const method_ = (ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssign())
|
|
1588
1389
|
? (ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssign()), "set")
|
|
1589
1390
|
: ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssignPlus())
|
|
1590
1391
|
? (ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssignPlus()), "increment")
|
|
1591
|
-
: (ff_compiler_Parser.
|
|
1392
|
+
: ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssignMinus())
|
|
1393
|
+
? (ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssignMinus()), "decrement")
|
|
1394
|
+
: ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssignMultiplication())
|
|
1395
|
+
? (ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssignMultiplication()), "multiply")
|
|
1396
|
+
: (ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssignDivision()), "divide"));
|
|
1592
1397
|
const value_ = ff_compiler_Parser.Parser_parseTerm(self_);
|
|
1593
1398
|
const effect_ = ff_compiler_Parser.Parser_freshUnificationVariable(self_, record_.at_);
|
|
1594
|
-
const target_ = ff_compiler_Syntax.DynamicCall(
|
|
1399
|
+
const target_ = ff_compiler_Syntax.DynamicCall(recordField_(ff_compiler_Token.Token_at(token_), method_), false);
|
|
1595
1400
|
return ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], [ff_compiler_Syntax.Argument(member_.at_, ff_core_Option.None(), member_), ff_compiler_Syntax.Argument(value_.at_, ff_core_Option.None(), value_)], [])
|
|
1596
1401
|
} else {
|
|
1597
1402
|
const effect_ = ff_compiler_Parser.Parser_freshUnificationVariable(self_, record_.at_);
|
|
1598
|
-
const target_ = ff_compiler_Syntax.DynamicCall(
|
|
1403
|
+
const target_ = ff_compiler_Syntax.DynamicCall(recordField_(ff_compiler_Token.Token_at(token_), "get"), false);
|
|
1599
1404
|
return ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], [ff_compiler_Syntax.Argument(member_.at_, ff_core_Option.None(), member_)], [])
|
|
1600
1405
|
}
|
|
1601
1406
|
}
|
|
@@ -1631,6 +1436,8 @@ return ff_compiler_Syntax.EVariable(ff_compiler_Token.Token_at(token_), (prefix_
|
|
|
1631
1436
|
} else {
|
|
1632
1437
|
return ff_compiler_Parser.Parser_parseVariant(self_, prefix_)
|
|
1633
1438
|
}
|
|
1439
|
+
} else if((ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LUpper()) && ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_ahead(self_), ff_compiler_Token.LArrowThin()))) {
|
|
1440
|
+
return ff_compiler_Parser.Parser_parseDynamicMember(self_, ff_compiler_Parser.Parser_parseVariant(self_, ""), true)
|
|
1634
1441
|
} else if(ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LUpper())) {
|
|
1635
1442
|
return ff_compiler_Parser.Parser_parseVariant(self_, "")
|
|
1636
1443
|
} else if(ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "{")) {
|
|
@@ -1776,7 +1583,7 @@ if(items_a.length === 1 && items_a[0].second_) {
|
|
|
1776
1583
|
const p_ = items_a[0].first_;
|
|
1777
1584
|
return p_
|
|
1778
1585
|
}
|
|
1779
|
-
|
|
1586
|
+
{
|
|
1780
1587
|
const p_ = items_a[0].first_;
|
|
1781
1588
|
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(p_.at_, "Invalid pattern: ... is only allowed for the last element in a list"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
1782
1589
|
}
|
|
@@ -1835,7 +1642,7 @@ return self_.end_
|
|
|
1835
1642
|
|
|
1836
1643
|
export async function Parser_current$(self_, $task) {
|
|
1837
1644
|
if((self_.offset_ < self_.tokens_.length)) {
|
|
1838
|
-
return (self_.tokens_[self_.offset_] ?? ff_core_List.
|
|
1645
|
+
return (self_.tokens_[self_.offset_] ?? ff_core_List.List_grab(self_.tokens_, self_.offset_))
|
|
1839
1646
|
} else {
|
|
1840
1647
|
return self_.end_
|
|
1841
1648
|
}
|
|
@@ -1910,10 +1717,12 @@ return ff_compiler_Parser.Parser_skip(self_, kind_)
|
|
|
1910
1717
|
|
|
1911
1718
|
export async function Parser_parseModuleWithoutPackageInfo$(self_, $task) {
|
|
1912
1719
|
const moduleWithPackageInfo_ = ff_compiler_Parser.Parser_parseModuleWithPackageInfo(self_);
|
|
1913
|
-
|
|
1914
|
-
const
|
|
1720
|
+
{
|
|
1721
|
+
const if_o = moduleWithPackageInfo_.packageInfo_
|
|
1722
|
+
if(if_o.Some) {
|
|
1723
|
+
const info_ = if_o.value_;
|
|
1915
1724
|
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(info_.package_.at_, "Package and dependencies already declared in package.ff"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
1916
|
-
|
|
1725
|
+
}
|
|
1917
1726
|
};
|
|
1918
1727
|
return moduleWithPackageInfo_.module_
|
|
1919
1728
|
}
|
|
@@ -2018,137 +1827,16 @@ if(self_.lspHook_.trackSymbols_) {
|
|
|
2018
1827
|
ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseSymbolBegin())
|
|
2019
1828
|
};
|
|
2020
1829
|
const signature_ = ff_compiler_Parser.Parser_parseSignature(self_, member_);
|
|
2021
|
-
const body_ =
|
|
2022
|
-
|
|
2023
|
-
: ff_core_Option.None());
|
|
2024
|
-
const targets_ = ff_compiler_Parser.Parser_parseTargets(self_, signature_.parameters_.length);
|
|
2025
|
-
const bestTarget_ = ff_compiler_Parser.findBestTarget_(self_.targetIsNode_, body_, targets_);
|
|
2026
|
-
const result_ = ff_compiler_Syntax.DFunction(signature_.at_, signature_, bestTarget_);
|
|
1830
|
+
const body_ = ff_compiler_Parser.Parser_parseLambda(self_, signature_.parameters_.length, false, false);
|
|
1831
|
+
const result_ = ff_compiler_Syntax.DFunction(signature_.at_, signature_, body_);
|
|
2027
1832
|
if(self_.lspHook_.trackSymbols_) {
|
|
2028
1833
|
ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseSymbolEnd(signature_.name_, ff_compiler_LspHook.SFunction(member_), signature_.at_, (((_c) => {
|
|
2029
|
-
return ff_compiler_Syntax.Location(_c.file_, _c.line_, (signature_.at_.column_ +
|
|
1834
|
+
return ff_compiler_Syntax.Location(_c.file_, _c.line_, (signature_.at_.column_ + signature_.name_.length))
|
|
2030
1835
|
}))(signature_.at_), signature_.at_, ff_compiler_Token.Token_end(ff_compiler_Parser.Parser_behind(self_))))
|
|
2031
1836
|
};
|
|
2032
1837
|
return result_
|
|
2033
1838
|
}
|
|
2034
1839
|
|
|
2035
|
-
export async function Parser_parseTargets$(self_, parameterCount_, $task) {
|
|
2036
|
-
function processCode_(code_) {
|
|
2037
|
-
const dropCount_ = (ff_core_String.String_startsWith(code_, "\"\"\"", 0)
|
|
2038
|
-
? 3
|
|
2039
|
-
: 1);
|
|
2040
|
-
return ff_core_String.String_replace(ff_core_String.String_replace(ff_core_String.String_replace(ff_core_String.String_replace(ff_core_String.String_replace(ff_core_String.String_dropLast(ff_core_String.String_dropFirst(code_, dropCount_), dropCount_), "\\\"", "\""), "\\r", "\r"), "\\n", "\n"), "\\t", "\t"), "\\\\", "\\")
|
|
2041
|
-
}
|
|
2042
|
-
let targets_ = ff_compiler_Parser.ParsedTargets(ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None());
|
|
2043
|
-
while(((ff_compiler_Parser.Parser_currentIsSeparator(self_, ff_compiler_Token.LSemicolon()) && ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_ahead(self_), ff_compiler_Token.LKeyword())) && ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_ahead(self_), "target"))) {
|
|
2044
|
-
ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LSeparator());
|
|
2045
|
-
const at_ = ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LKeyword()));
|
|
2046
|
-
const target_ = (ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LLower())
|
|
2047
|
-
? ff_compiler_Token.Token_raw(ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LLower()))
|
|
2048
|
-
: ff_compiler_Token.Token_raw(ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LKeyword())));
|
|
2049
|
-
if(ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "{")) {
|
|
2050
|
-
const lambda_ = ff_compiler_Parser.Parser_parseLambda(self_, parameterCount_, false, false);
|
|
2051
|
-
do {
|
|
2052
|
-
const _1 = target_;
|
|
2053
|
-
if(_1 === "js") {
|
|
2054
|
-
if(ff_core_Equal.notEquals_(targets_.jsSync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
2055
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
2056
|
-
};
|
|
2057
|
-
targets_ = (((_c) => {
|
|
2058
|
-
return ff_compiler_Parser.ParsedTargets(ff_core_Option.Some(lambda_), _c.jsSync_, _c.jsAsync_, _c.browser_, _c.browserSync_, _c.browserAsync_, _c.node_, _c.nodeSync_, _c.nodeAsync_)
|
|
2059
|
-
}))(targets_)
|
|
2060
|
-
break
|
|
2061
|
-
}
|
|
2062
|
-
if(_1 === "browser") {
|
|
2063
|
-
if(ff_core_Equal.notEquals_(targets_.browserSync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
2064
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
2065
|
-
};
|
|
2066
|
-
targets_ = (((_c) => {
|
|
2067
|
-
return ff_compiler_Parser.ParsedTargets(_c.js_, _c.jsSync_, _c.jsAsync_, ff_core_Option.Some(lambda_), _c.browserSync_, _c.browserAsync_, _c.node_, _c.nodeSync_, _c.nodeAsync_)
|
|
2068
|
-
}))(targets_)
|
|
2069
|
-
break
|
|
2070
|
-
}
|
|
2071
|
-
if(_1 === "node") {
|
|
2072
|
-
if(ff_core_Equal.notEquals_(targets_.nodeAsync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
2073
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
2074
|
-
};
|
|
2075
|
-
targets_ = (((_c) => {
|
|
2076
|
-
return ff_compiler_Parser.ParsedTargets(_c.js_, _c.jsSync_, _c.jsAsync_, _c.browser_, _c.browserSync_, _c.browserAsync_, ff_core_Option.Some(lambda_), _c.nodeSync_, _c.nodeAsync_)
|
|
2077
|
-
}))(targets_)
|
|
2078
|
-
break
|
|
2079
|
-
}
|
|
2080
|
-
{
|
|
2081
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Unknown target"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
2082
|
-
}
|
|
2083
|
-
} while(false)
|
|
2084
|
-
} else {
|
|
2085
|
-
const mode_ = ff_compiler_Token.Token_raw(ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LKeyword()));
|
|
2086
|
-
const code_ = processCode_(ff_compiler_Token.Token_raw(ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LString())));
|
|
2087
|
-
do {
|
|
2088
|
-
const _1 = ff_core_Pair.Pair(target_, mode_);
|
|
2089
|
-
if(_1.first_ === "js" && _1.second_ === "sync") {
|
|
2090
|
-
if(ff_core_Equal.notEquals_(targets_.jsSync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
2091
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
2092
|
-
};
|
|
2093
|
-
targets_ = (((_c) => {
|
|
2094
|
-
return ff_compiler_Parser.ParsedTargets(_c.js_, ff_core_Option.Some(code_), _c.jsAsync_, _c.browser_, _c.browserSync_, _c.browserAsync_, _c.node_, _c.nodeSync_, _c.nodeAsync_)
|
|
2095
|
-
}))(targets_)
|
|
2096
|
-
break
|
|
2097
|
-
}
|
|
2098
|
-
if(_1.first_ === "js" && _1.second_ === "async") {
|
|
2099
|
-
if(ff_core_Equal.notEquals_(targets_.jsAsync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
2100
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
2101
|
-
};
|
|
2102
|
-
targets_ = (((_c) => {
|
|
2103
|
-
return ff_compiler_Parser.ParsedTargets(_c.js_, _c.jsSync_, ff_core_Option.Some(code_), _c.browser_, _c.browserSync_, _c.browserAsync_, _c.node_, _c.nodeSync_, _c.nodeAsync_)
|
|
2104
|
-
}))(targets_)
|
|
2105
|
-
break
|
|
2106
|
-
}
|
|
2107
|
-
if(_1.first_ === "browser" && _1.second_ === "sync") {
|
|
2108
|
-
if(ff_core_Equal.notEquals_(targets_.browserSync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
2109
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
2110
|
-
};
|
|
2111
|
-
targets_ = (((_c) => {
|
|
2112
|
-
return ff_compiler_Parser.ParsedTargets(_c.js_, _c.jsSync_, _c.jsAsync_, _c.browser_, ff_core_Option.Some(code_), _c.browserAsync_, _c.node_, _c.nodeSync_, _c.nodeAsync_)
|
|
2113
|
-
}))(targets_)
|
|
2114
|
-
break
|
|
2115
|
-
}
|
|
2116
|
-
if(_1.first_ === "browser" && _1.second_ === "async") {
|
|
2117
|
-
if(ff_core_Equal.notEquals_(targets_.browserAsync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
2118
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
2119
|
-
};
|
|
2120
|
-
targets_ = (((_c) => {
|
|
2121
|
-
return ff_compiler_Parser.ParsedTargets(_c.js_, _c.jsSync_, _c.jsAsync_, _c.browser_, _c.browserSync_, ff_core_Option.Some(code_), _c.node_, _c.nodeSync_, _c.nodeAsync_)
|
|
2122
|
-
}))(targets_)
|
|
2123
|
-
break
|
|
2124
|
-
}
|
|
2125
|
-
if(_1.first_ === "node" && _1.second_ === "sync") {
|
|
2126
|
-
if(ff_core_Equal.notEquals_(targets_.nodeSync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
2127
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
2128
|
-
};
|
|
2129
|
-
targets_ = (((_c) => {
|
|
2130
|
-
return ff_compiler_Parser.ParsedTargets(_c.js_, _c.jsSync_, _c.jsAsync_, _c.browser_, _c.browserSync_, _c.browserAsync_, _c.node_, ff_core_Option.Some(code_), _c.nodeAsync_)
|
|
2131
|
-
}))(targets_)
|
|
2132
|
-
break
|
|
2133
|
-
}
|
|
2134
|
-
if(_1.first_ === "node" && _1.second_ === "async") {
|
|
2135
|
-
if(ff_core_Equal.notEquals_(targets_.nodeAsync_, ff_core_Option.None(), ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String))) {
|
|
2136
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Duplicate target definition"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
2137
|
-
};
|
|
2138
|
-
targets_ = (((_c) => {
|
|
2139
|
-
return ff_compiler_Parser.ParsedTargets(_c.js_, _c.jsSync_, _c.jsAsync_, _c.browser_, _c.browserSync_, _c.browserAsync_, _c.node_, _c.nodeSync_, ff_core_Option.Some(code_))
|
|
2140
|
-
}))(targets_)
|
|
2141
|
-
break
|
|
2142
|
-
}
|
|
2143
|
-
{
|
|
2144
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, "Unknown target or mode"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
2145
|
-
}
|
|
2146
|
-
} while(false)
|
|
2147
|
-
}
|
|
2148
|
-
};
|
|
2149
|
-
return targets_
|
|
2150
|
-
}
|
|
2151
|
-
|
|
2152
1840
|
export async function Parser_parseSignature$(self_, member_, $task) {
|
|
2153
1841
|
const nameToken_ = ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LLower());
|
|
2154
1842
|
const poly_ = (ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "[")
|
|
@@ -2186,17 +1874,14 @@ ff_compiler_Parser.Parser_skipSeparator(self_, ff_compiler_Token.LSemicolon())
|
|
|
2186
1874
|
ff_compiler_Parser.Parser_rawSkip(self_, ff_compiler_Token.LBracketRight(), "}");
|
|
2187
1875
|
if(self_.lspHook_.trackSymbols_) {
|
|
2188
1876
|
let name_ = ff_compiler_Syntax.Type_show(type_, []);
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
const
|
|
2192
|
-
const constraint_ = _1.second_;
|
|
1877
|
+
for(let for_a = poly_.generics_, for_i = 0, for_l = for_a.length, for_a2 = poly_.constraints_, for_i2 = 0, for_l2 = for_a2.length; for_i < for_l && for_i2 < for_l2; for_i++, for_i2++) {
|
|
1878
|
+
const generic_ = for_a[for_i];
|
|
1879
|
+
const constraint_ = for_a2[for_i2];
|
|
2193
1880
|
name_ = ff_core_String.String_replace(name_, (("[" + generic_) + "]"), (((("[" + generic_) + ": ") + constraint_.name_) + "]"));
|
|
2194
1881
|
name_ = ff_core_String.String_replace(name_, (("[" + generic_) + ","), (((("[" + generic_) + ": ") + constraint_.name_) + ","));
|
|
2195
1882
|
name_ = ff_core_String.String_replace(name_, ((", " + generic_) + ","), ((((", " + generic_) + ": ") + constraint_.name_) + ","));
|
|
2196
1883
|
name_ = ff_core_String.String_replace(name_, ((", " + generic_) + "]"), ((((", " + generic_) + ": ") + constraint_.name_) + "]"))
|
|
2197
|
-
|
|
2198
|
-
}
|
|
2199
|
-
}));
|
|
1884
|
+
};
|
|
2200
1885
|
ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseSymbolEnd(name_, ff_compiler_LspHook.SExtend(), ff_compiler_Token.Token_at(nameToken_), ff_compiler_Token.Token_end(nameToken_), ff_compiler_Token.Token_at(extendToken_), ff_compiler_Token.Token_end(ff_compiler_Parser.Parser_behind(self_))))
|
|
2201
1886
|
};
|
|
2202
1887
|
return ff_compiler_Syntax.DExtend(ff_compiler_Token.Token_at(nameToken_), ff_compiler_Token.Token_raw(nameToken_), poly_.generics_, poly_.constraints_, type_, ff_core_Array.Array_toList(methods_, 0, 9007199254740991))
|
|
@@ -2489,7 +2174,7 @@ const parts_ = ff_core_String.String_split(ff_compiler_Token.Token_raw(majorMino
|
|
|
2489
2174
|
const patch_ = (ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LDot())
|
|
2490
2175
|
? (ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LDot()), ff_core_String.String_grabInt(ff_compiler_Token.Token_raw(ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LInt()))))
|
|
2491
2176
|
: 0);
|
|
2492
|
-
return ff_compiler_Syntax.Version(ff_compiler_Token.Token_at(majorMinor_), ff_core_String.String_grabInt((parts_[0] ?? ff_core_List.
|
|
2177
|
+
return ff_compiler_Syntax.Version(ff_compiler_Token.Token_at(majorMinor_), ff_core_String.String_grabInt((parts_[0] ?? ff_core_List.List_grab(parts_, 0))), ff_core_String.String_grabInt((parts_[1] ?? ff_core_List.List_grab(parts_, 1))), patch_)
|
|
2493
2178
|
} else {
|
|
2494
2179
|
const major_ = ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LInt());
|
|
2495
2180
|
return ff_compiler_Syntax.Version(ff_compiler_Token.Token_at(major_), ff_core_String.String_grabInt(ff_compiler_Token.Token_raw(major_)), 0, 0)
|
|
@@ -2906,7 +2591,7 @@ if((ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_comp
|
|
|
2906
2591
|
return ff_compiler_Parser.Parser_parseFunctions(self_)
|
|
2907
2592
|
} else {
|
|
2908
2593
|
const term_ = ff_compiler_Parser.Parser_parseTerm(self_);
|
|
2909
|
-
if((
|
|
2594
|
+
if((!ff_compiler_Token.Token_is5(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssign(), ff_compiler_Token.LAssignPlus(), ff_compiler_Token.LAssignMinus(), ff_compiler_Token.LAssignMultiplication(), ff_compiler_Token.LAssignDivision()))) {
|
|
2910
2595
|
return term_
|
|
2911
2596
|
} else {
|
|
2912
2597
|
const token_ = ff_core_Core.do_((() => {
|
|
@@ -2916,9 +2601,17 @@ return ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssignPlus())
|
|
|
2916
2601
|
if(ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssignMinus())) {
|
|
2917
2602
|
return ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssignMinus())
|
|
2918
2603
|
} else {
|
|
2604
|
+
if(ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssignMultiplication())) {
|
|
2605
|
+
return ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssignMultiplication())
|
|
2606
|
+
} else {
|
|
2607
|
+
if(ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssignDivision())) {
|
|
2608
|
+
return ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssignDivision())
|
|
2609
|
+
} else {
|
|
2919
2610
|
return ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssign())
|
|
2920
2611
|
}
|
|
2921
2612
|
}
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2922
2615
|
}));
|
|
2923
2616
|
const operator_ = ff_core_String.String_dropLast(ff_compiler_Token.Token_raw(token_), 1);
|
|
2924
2617
|
const value_ = ff_compiler_Parser.Parser_parseTerm(self_);
|
|
@@ -2986,10 +2679,10 @@ const temporaryEffect_ = ff_compiler_Syntax.TConstructor(functionAt_, "Temporary
|
|
|
2986
2679
|
return ff_compiler_Syntax.Lambda(functionAt_, temporaryEffect_, [])
|
|
2987
2680
|
})())
|
|
2988
2681
|
: ff_compiler_Parser.Parser_parseLambda(self_, signature_.parameters_.length, false, false));
|
|
2989
|
-
functions_.array.push(ff_compiler_Syntax.DFunction(signature_.at_, signature_,
|
|
2682
|
+
functions_.array.push(ff_compiler_Syntax.DFunction(signature_.at_, signature_, body_));
|
|
2990
2683
|
if(self_.lspHook_.trackSymbols_) {
|
|
2991
2684
|
ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseSymbolEnd(signature_.name_, ff_compiler_LspHook.SFunction(false), signature_.at_, (((_c) => {
|
|
2992
|
-
return ff_compiler_Syntax.Location(_c.file_, _c.line_, (signature_.at_.column_ +
|
|
2685
|
+
return ff_compiler_Syntax.Location(_c.file_, _c.line_, (signature_.at_.column_ + signature_.name_.length))
|
|
2993
2686
|
}))(signature_.at_), functionAt_, ff_compiler_Token.Token_end(ff_compiler_Parser.Parser_behind(self_))))
|
|
2994
2687
|
};
|
|
2995
2688
|
if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!ff_compiler_Parser.Parser_currentIsSeparator(self_, ff_compiler_Token.LSemicolon())))) {
|
|
@@ -3010,7 +2703,7 @@ export async function Parser_parseBinary$(self_, level_, $task) {
|
|
|
3010
2703
|
if((level_ >= ff_compiler_Parser.binaryOperators_.length)) {
|
|
3011
2704
|
return ff_compiler_Parser.Parser_parseUnary(self_)
|
|
3012
2705
|
} else {
|
|
3013
|
-
const operators_ = (ff_compiler_Parser.binaryOperators_[level_] ?? ff_core_List.
|
|
2706
|
+
const operators_ = (ff_compiler_Parser.binaryOperators_[level_] ?? ff_core_List.List_grab(ff_compiler_Parser.binaryOperators_, level_));
|
|
3014
2707
|
let result_ = ff_compiler_Parser.Parser_parseBinary(self_, (level_ + 1));
|
|
3015
2708
|
if(ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LOperator())) {
|
|
3016
2709
|
while(ff_core_List.List_any(operators_, ((value_) => {
|
|
@@ -3039,6 +2732,12 @@ return ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EVariable(ff_compiler_T
|
|
|
3039
2732
|
if(_1 === ">=") {
|
|
3040
2733
|
return ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EVariable(ff_compiler_Token.Token_at(token_), "ff:core/Ordering.notBefore"), false)
|
|
3041
2734
|
}
|
|
2735
|
+
if(_1 === "===") {
|
|
2736
|
+
return ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EVariable(ff_compiler_Token.Token_at(token_), "ff:core/JsValue.JsValue_equals"), false)
|
|
2737
|
+
}
|
|
2738
|
+
if(_1 === "!==") {
|
|
2739
|
+
return ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EVariable(ff_compiler_Token.Token_at(token_), "ff:core/JsValue.JsValue_notEquals"), false)
|
|
2740
|
+
}
|
|
3042
2741
|
{
|
|
3043
2742
|
const o_ = _1;
|
|
3044
2743
|
return ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EVariable(ff_compiler_Token.Token_at(token_), o_), false)
|
|
@@ -3084,12 +2783,12 @@ const token_ = ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LLower())
|
|
|
3084
2783
|
result_ = ff_compiler_Syntax.EField(ff_compiler_Token.Token_at(token_), false, result_, ff_compiler_Token.Token_raw(token_))
|
|
3085
2784
|
}
|
|
3086
2785
|
} else if(ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LArrowThin())) {
|
|
3087
|
-
result_ = ff_compiler_Parser.Parser_parseDynamicMember(self_, result_)
|
|
2786
|
+
result_ = ff_compiler_Parser.Parser_parseDynamicMember(self_, result_, false)
|
|
3088
2787
|
} else if(ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LUnary())) {
|
|
3089
2788
|
const token_ = ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LUnary());
|
|
3090
2789
|
const method_ = (ff_compiler_Token.Token_rawIs(token_, "!")
|
|
3091
|
-
? "ff:core/
|
|
3092
|
-
: "ff:core/
|
|
2790
|
+
? "ff:core/Js.value"
|
|
2791
|
+
: "ff:core/Js.fromValue");
|
|
3093
2792
|
const target_ = ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EVariable(ff_compiler_Token.Token_at(token_), method_), false);
|
|
3094
2793
|
const effect_ = ff_compiler_Parser.Parser_freshUnificationVariable(self_, ff_compiler_Token.Token_at(token_));
|
|
3095
2794
|
result_ = ff_compiler_Syntax.ECall(ff_compiler_Token.Token_at(token_), target_, effect_, [], [ff_compiler_Syntax.Argument(result_.at_, ff_core_Option.None(), result_)], [])
|
|
@@ -3111,7 +2810,21 @@ result_ = ff_compiler_Syntax.EField(ff_compiler_Token.Token_at(token_), false, r
|
|
|
3111
2810
|
return result_
|
|
3112
2811
|
}
|
|
3113
2812
|
|
|
3114
|
-
export async function Parser_parseDynamicMember$(self_, record_, $task) {
|
|
2813
|
+
export async function Parser_parseDynamicMember$(self_, record_, isModule_, $task) {
|
|
2814
|
+
function recordField_(at_, name_) {
|
|
2815
|
+
{
|
|
2816
|
+
const _1 = record_;
|
|
2817
|
+
if(_1.EVariant) {
|
|
2818
|
+
const e_ = _1;
|
|
2819
|
+
if(isModule_) {
|
|
2820
|
+
return ff_compiler_Syntax.EVariable(at_, ((e_.name_ + ".") + name_))
|
|
2821
|
+
}
|
|
2822
|
+
}
|
|
2823
|
+
{
|
|
2824
|
+
return ff_compiler_Syntax.EField(at_, false, record_, name_)
|
|
2825
|
+
}
|
|
2826
|
+
}
|
|
2827
|
+
}
|
|
3115
2828
|
const token_ = ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LArrowThin());
|
|
3116
2829
|
if(ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "(")) {
|
|
3117
2830
|
const arguments_ = ff_compiler_Parser.Parser_parseFunctionArguments(self_, ff_compiler_Token.Token_at(token_), false);
|
|
@@ -3121,13 +2834,13 @@ const _1 = ff_core_List.List_indexWhere(arguments_.first_, ((_w1) => {
|
|
|
3121
2834
|
return (!ff_core_Option.Option_isEmpty(_w1.name_))
|
|
3122
2835
|
}));
|
|
3123
2836
|
if(_1.None) {
|
|
3124
|
-
const target_ = ff_compiler_Syntax.DynamicCall(
|
|
2837
|
+
const target_ = ff_compiler_Syntax.DynamicCall(recordField_(ff_compiler_Token.Token_at(token_), ("new" + arguments_.first_.length)), false);
|
|
3125
2838
|
return ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], arguments_.first_, [])
|
|
3126
2839
|
}
|
|
3127
2840
|
if(_1.Some && _1.value_ === 0) {
|
|
3128
|
-
const objectTarget_ = ff_compiler_Syntax.DynamicCall(
|
|
2841
|
+
const objectTarget_ = ff_compiler_Syntax.DynamicCall(recordField_(ff_compiler_Token.Token_at(token_), "object"), false);
|
|
3129
2842
|
let result_ = ff_compiler_Syntax.ECall(record_.at_, objectTarget_, effect_, [], [], []);
|
|
3130
|
-
for(let
|
|
2843
|
+
for(let for_a = arguments_.first_, for_i = 0, for_l = for_a.length; for_i < for_l; for_i++) {
|
|
3131
2844
|
const argument_ = for_a[for_i];
|
|
3132
2845
|
if(ff_core_Option.Option_isEmpty(argument_.name_)) {
|
|
3133
2846
|
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(argument_.at_, "Expected a named argument"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
@@ -3137,16 +2850,16 @@ result_ = ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], [ff_compil
|
|
|
3137
2850
|
};
|
|
3138
2851
|
return result_
|
|
3139
2852
|
}
|
|
3140
|
-
|
|
2853
|
+
{
|
|
3141
2854
|
const i_ = _1.value_;
|
|
3142
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError((arguments_.first_[i_] ?? ff_core_List.
|
|
2855
|
+
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError((arguments_.first_[i_] ?? ff_core_List.List_grab(arguments_.first_, i_)).at_, "Unexpected named argument"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
3143
2856
|
}
|
|
3144
2857
|
}
|
|
3145
2858
|
} else if(ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "{")) {
|
|
3146
2859
|
const lambda_ = ff_compiler_Parser.Parser_parseLambda(self_, 0, false, false);
|
|
3147
2860
|
const effect_ = ff_compiler_Parser.Parser_freshUnificationVariable(self_, record_.at_);
|
|
3148
2861
|
const arguments_ = ff_core_List.List_grabFirst(lambda_.cases_).patterns_.length;
|
|
3149
|
-
const target_ = ff_compiler_Syntax.DynamicCall(
|
|
2862
|
+
const target_ = ff_compiler_Syntax.DynamicCall(recordField_(ff_compiler_Token.Token_at(token_), ("function" + arguments_)), false);
|
|
3150
2863
|
return ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], [ff_compiler_Syntax.Argument(lambda_.at_, ff_core_Option.None(), ff_compiler_Syntax.ELambda(lambda_.at_, lambda_))], [])
|
|
3151
2864
|
} else {
|
|
3152
2865
|
const token_ = (ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LLower())
|
|
@@ -3159,29 +2872,35 @@ const member_ = ff_compiler_Syntax.EString(ff_compiler_Token.Token_at(token_), (
|
|
|
3159
2872
|
: (("\"" + ff_compiler_Token.Token_raw(token_)) + "\"")));
|
|
3160
2873
|
if(ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "(")) {
|
|
3161
2874
|
const arguments_ = ff_compiler_Parser.Parser_parseFunctionArguments(self_, record_.at_, false);
|
|
3162
|
-
|
|
2875
|
+
{
|
|
2876
|
+
const if_o = ff_core_List.List_find(arguments_.first_, ((_w1) => {
|
|
3163
2877
|
return (!ff_core_Option.Option_isEmpty(_w1.name_))
|
|
3164
|
-
}))
|
|
3165
|
-
|
|
2878
|
+
}))
|
|
2879
|
+
if(if_o.Some) {
|
|
2880
|
+
const argument_ = if_o.value_;
|
|
3166
2881
|
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(argument_.at_, "Unexpected named argument"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
3167
|
-
|
|
2882
|
+
}
|
|
3168
2883
|
};
|
|
3169
2884
|
const effect_ = ff_compiler_Parser.Parser_freshUnificationVariable(self_, record_.at_);
|
|
3170
|
-
const target_ = ff_compiler_Syntax.DynamicCall(
|
|
2885
|
+
const target_ = ff_compiler_Syntax.DynamicCall(recordField_(ff_compiler_Token.Token_at(token_), ("call" + arguments_.first_.length)), false);
|
|
3171
2886
|
return ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], [ff_compiler_Syntax.Argument(member_.at_, ff_core_Option.None(), member_), ...arguments_.first_], [])
|
|
3172
|
-
} else if(ff_compiler_Token.
|
|
2887
|
+
} else if(ff_compiler_Token.Token_is5(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssign(), ff_compiler_Token.LAssignPlus(), ff_compiler_Token.LAssignMinus(), ff_compiler_Token.LAssignMultiplication(), ff_compiler_Token.LAssignDivision())) {
|
|
3173
2888
|
const method_ = (ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssign())
|
|
3174
2889
|
? (ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssign()), "set")
|
|
3175
2890
|
: ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssignPlus())
|
|
3176
2891
|
? (ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssignPlus()), "increment")
|
|
3177
|
-
: (ff_compiler_Parser.
|
|
2892
|
+
: ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssignMinus())
|
|
2893
|
+
? (ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssignMinus()), "decrement")
|
|
2894
|
+
: ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssignMultiplication())
|
|
2895
|
+
? (ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssignMultiplication()), "multiply")
|
|
2896
|
+
: (ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LAssignDivision()), "divide"));
|
|
3178
2897
|
const value_ = ff_compiler_Parser.Parser_parseTerm(self_);
|
|
3179
2898
|
const effect_ = ff_compiler_Parser.Parser_freshUnificationVariable(self_, record_.at_);
|
|
3180
|
-
const target_ = ff_compiler_Syntax.DynamicCall(
|
|
2899
|
+
const target_ = ff_compiler_Syntax.DynamicCall(recordField_(ff_compiler_Token.Token_at(token_), method_), false);
|
|
3181
2900
|
return ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], [ff_compiler_Syntax.Argument(member_.at_, ff_core_Option.None(), member_), ff_compiler_Syntax.Argument(value_.at_, ff_core_Option.None(), value_)], [])
|
|
3182
2901
|
} else {
|
|
3183
2902
|
const effect_ = ff_compiler_Parser.Parser_freshUnificationVariable(self_, record_.at_);
|
|
3184
|
-
const target_ = ff_compiler_Syntax.DynamicCall(
|
|
2903
|
+
const target_ = ff_compiler_Syntax.DynamicCall(recordField_(ff_compiler_Token.Token_at(token_), "get"), false);
|
|
3185
2904
|
return ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], [ff_compiler_Syntax.Argument(member_.at_, ff_core_Option.None(), member_)], [])
|
|
3186
2905
|
}
|
|
3187
2906
|
}
|
|
@@ -3217,6 +2936,8 @@ return ff_compiler_Syntax.EVariable(ff_compiler_Token.Token_at(token_), (prefix_
|
|
|
3217
2936
|
} else {
|
|
3218
2937
|
return ff_compiler_Parser.Parser_parseVariant(self_, prefix_)
|
|
3219
2938
|
}
|
|
2939
|
+
} else if((ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LUpper()) && ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_ahead(self_), ff_compiler_Token.LArrowThin()))) {
|
|
2940
|
+
return ff_compiler_Parser.Parser_parseDynamicMember(self_, ff_compiler_Parser.Parser_parseVariant(self_, ""), true)
|
|
3220
2941
|
} else if(ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LUpper())) {
|
|
3221
2942
|
return ff_compiler_Parser.Parser_parseVariant(self_, "")
|
|
3222
2943
|
} else if(ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "{")) {
|
|
@@ -3362,7 +3083,7 @@ if(items_a.length === 1 && items_a[0].second_) {
|
|
|
3362
3083
|
const p_ = items_a[0].first_;
|
|
3363
3084
|
return p_
|
|
3364
3085
|
}
|
|
3365
|
-
|
|
3086
|
+
{
|
|
3366
3087
|
const p_ = items_a[0].first_;
|
|
3367
3088
|
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(p_.at_, "Invalid pattern: ... is only allowed for the last element in a list"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
|
|
3368
3089
|
}
|
|
@@ -3412,15 +3133,6 @@ return ff_core_Any.internalAnyTag_((("ff:compiler/Parser.Poly" + "[") + "]"))
|
|
|
3412
3133
|
}
|
|
3413
3134
|
};
|
|
3414
3135
|
|
|
3415
|
-
export const ff_core_Any_HasAnyTag$ff_compiler_Parser_ParsedTargets = {
|
|
3416
|
-
anyTag_() {
|
|
3417
|
-
return ff_core_Any.internalAnyTag_((("ff:compiler/Parser.ParsedTargets" + "[") + "]"))
|
|
3418
|
-
},
|
|
3419
|
-
async anyTag_$($task) {
|
|
3420
|
-
return ff_core_Any.internalAnyTag_((("ff:compiler/Parser.ParsedTargets" + "[") + "]"))
|
|
3421
|
-
}
|
|
3422
|
-
};
|
|
3423
|
-
|
|
3424
3136
|
export const ff_core_Show_Show$ff_compiler_Parser_Poly = {
|
|
3425
3137
|
show_(value_) {
|
|
3426
3138
|
const value_a = value_;
|
|
@@ -3438,23 +3150,6 @@ return ((((("Poly" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_
|
|
|
3438
3150
|
}
|
|
3439
3151
|
};
|
|
3440
3152
|
|
|
3441
|
-
export const ff_core_Show_Show$ff_compiler_Parser_ParsedTargets = {
|
|
3442
|
-
show_(value_) {
|
|
3443
|
-
const value_a = value_;
|
|
3444
|
-
{
|
|
3445
|
-
const z_ = value_a;
|
|
3446
|
-
return ((((((((((((((((((("ParsedTargets" + "(") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Lambda).show_(z_.js_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.jsSync_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.jsAsync_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Lambda).show_(z_.browser_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.browserSync_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.browserAsync_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Lambda).show_(z_.node_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.nodeSync_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.nodeAsync_)) + ")")
|
|
3447
|
-
}
|
|
3448
|
-
},
|
|
3449
|
-
async show_$(value_, $task) {
|
|
3450
|
-
const value_a = value_;
|
|
3451
|
-
{
|
|
3452
|
-
const z_ = value_a;
|
|
3453
|
-
return ((((((((((((((((((("ParsedTargets" + "(") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Lambda).show_(z_.js_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.jsSync_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.jsAsync_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Lambda).show_(z_.browser_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.browserSync_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.browserAsync_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Lambda).show_(z_.node_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.nodeSync_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.nodeAsync_)) + ")")
|
|
3454
|
-
}
|
|
3455
|
-
}
|
|
3456
|
-
};
|
|
3457
|
-
|
|
3458
3153
|
export const ff_core_Equal_Equal$ff_compiler_Parser_Poly = {
|
|
3459
3154
|
equals_(x_, y_) {
|
|
3460
3155
|
const x_a = x_;
|
|
@@ -3478,29 +3173,6 @@ return (ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Equal.ff_core
|
|
|
3478
3173
|
}
|
|
3479
3174
|
};
|
|
3480
3175
|
|
|
3481
|
-
export const ff_core_Equal_Equal$ff_compiler_Parser_ParsedTargets = {
|
|
3482
|
-
equals_(x_, y_) {
|
|
3483
|
-
const x_a = x_;
|
|
3484
|
-
const y_a = y_;
|
|
3485
|
-
if((x_ === y_)) {
|
|
3486
|
-
return true
|
|
3487
|
-
}
|
|
3488
|
-
{
|
|
3489
|
-
return (ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Lambda).equals_(x_.js_, y_.js_) && (ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.jsSync_, y_.jsSync_) && (ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.jsAsync_, y_.jsAsync_) && (ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Lambda).equals_(x_.browser_, y_.browser_) && (ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.browserSync_, y_.browserSync_) && (ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.browserAsync_, y_.browserAsync_) && (ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Lambda).equals_(x_.node_, y_.node_) && (ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.nodeSync_, y_.nodeSync_) && ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.nodeAsync_, y_.nodeAsync_)))))))))
|
|
3490
|
-
}
|
|
3491
|
-
},
|
|
3492
|
-
async equals_$(x_, y_, $task) {
|
|
3493
|
-
const x_a = x_;
|
|
3494
|
-
const y_a = y_;
|
|
3495
|
-
if((x_ === y_)) {
|
|
3496
|
-
return true
|
|
3497
|
-
}
|
|
3498
|
-
{
|
|
3499
|
-
return (ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Lambda).equals_(x_.js_, y_.js_) && (ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.jsSync_, y_.jsSync_) && (ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.jsAsync_, y_.jsAsync_) && (ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Lambda).equals_(x_.browser_, y_.browser_) && (ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.browserSync_, y_.browserSync_) && (ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.browserAsync_, y_.browserAsync_) && (ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Lambda).equals_(x_.node_, y_.node_) && (ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.nodeSync_, y_.nodeSync_) && ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.nodeAsync_, y_.nodeAsync_)))))))))
|
|
3500
|
-
}
|
|
3501
|
-
}
|
|
3502
|
-
};
|
|
3503
|
-
|
|
3504
3176
|
export const ff_core_Ordering_Order$ff_compiler_Parser_Poly = {
|
|
3505
3177
|
compare_(x_, y_) {
|
|
3506
3178
|
const x_a = x_;
|
|
@@ -3546,121 +3218,6 @@ return
|
|
|
3546
3218
|
}
|
|
3547
3219
|
};
|
|
3548
3220
|
|
|
3549
|
-
export const ff_core_Ordering_Order$ff_compiler_Parser_ParsedTargets = {
|
|
3550
|
-
compare_(x_, y_) {
|
|
3551
|
-
const x_a = x_;
|
|
3552
|
-
const y_a = y_;
|
|
3553
|
-
if((x_ === y_)) {
|
|
3554
|
-
return ff_core_Ordering.OrderingSame()
|
|
3555
|
-
}
|
|
3556
|
-
{
|
|
3557
|
-
const jsOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Lambda).compare_(x_.js_, y_.js_);
|
|
3558
|
-
if((jsOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3559
|
-
return jsOrdering_
|
|
3560
|
-
} else {
|
|
3561
|
-
const jsSyncOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.jsSync_, y_.jsSync_);
|
|
3562
|
-
if((jsSyncOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3563
|
-
return jsSyncOrdering_
|
|
3564
|
-
} else {
|
|
3565
|
-
const jsAsyncOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.jsAsync_, y_.jsAsync_);
|
|
3566
|
-
if((jsAsyncOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3567
|
-
return jsAsyncOrdering_
|
|
3568
|
-
} else {
|
|
3569
|
-
const browserOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Lambda).compare_(x_.browser_, y_.browser_);
|
|
3570
|
-
if((browserOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3571
|
-
return browserOrdering_
|
|
3572
|
-
} else {
|
|
3573
|
-
const browserSyncOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.browserSync_, y_.browserSync_);
|
|
3574
|
-
if((browserSyncOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3575
|
-
return browserSyncOrdering_
|
|
3576
|
-
} else {
|
|
3577
|
-
const browserAsyncOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.browserAsync_, y_.browserAsync_);
|
|
3578
|
-
if((browserAsyncOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3579
|
-
return browserAsyncOrdering_
|
|
3580
|
-
} else {
|
|
3581
|
-
const nodeOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Lambda).compare_(x_.node_, y_.node_);
|
|
3582
|
-
if((nodeOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3583
|
-
return nodeOrdering_
|
|
3584
|
-
} else {
|
|
3585
|
-
const nodeSyncOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.nodeSync_, y_.nodeSync_);
|
|
3586
|
-
if((nodeSyncOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3587
|
-
return nodeSyncOrdering_
|
|
3588
|
-
} else {
|
|
3589
|
-
const nodeAsyncOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.nodeAsync_, y_.nodeAsync_);
|
|
3590
|
-
if((nodeAsyncOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3591
|
-
return nodeAsyncOrdering_
|
|
3592
|
-
} else {
|
|
3593
|
-
return ff_core_Ordering.OrderingSame()
|
|
3594
|
-
}
|
|
3595
|
-
}
|
|
3596
|
-
}
|
|
3597
|
-
}
|
|
3598
|
-
}
|
|
3599
|
-
}
|
|
3600
|
-
}
|
|
3601
|
-
}
|
|
3602
|
-
}
|
|
3603
|
-
return
|
|
3604
|
-
}
|
|
3605
|
-
},
|
|
3606
|
-
async compare_$(x_, y_, $task) {
|
|
3607
|
-
const x_a = x_;
|
|
3608
|
-
const y_a = y_;
|
|
3609
|
-
if((x_ === y_)) {
|
|
3610
|
-
return ff_core_Ordering.OrderingSame()
|
|
3611
|
-
}
|
|
3612
|
-
{
|
|
3613
|
-
const jsOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Lambda).compare_(x_.js_, y_.js_);
|
|
3614
|
-
if((jsOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3615
|
-
return jsOrdering_
|
|
3616
|
-
} else {
|
|
3617
|
-
const jsSyncOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.jsSync_, y_.jsSync_);
|
|
3618
|
-
if((jsSyncOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3619
|
-
return jsSyncOrdering_
|
|
3620
|
-
} else {
|
|
3621
|
-
const jsAsyncOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.jsAsync_, y_.jsAsync_);
|
|
3622
|
-
if((jsAsyncOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3623
|
-
return jsAsyncOrdering_
|
|
3624
|
-
} else {
|
|
3625
|
-
const browserOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Lambda).compare_(x_.browser_, y_.browser_);
|
|
3626
|
-
if((browserOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3627
|
-
return browserOrdering_
|
|
3628
|
-
} else {
|
|
3629
|
-
const browserSyncOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.browserSync_, y_.browserSync_);
|
|
3630
|
-
if((browserSyncOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3631
|
-
return browserSyncOrdering_
|
|
3632
|
-
} else {
|
|
3633
|
-
const browserAsyncOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.browserAsync_, y_.browserAsync_);
|
|
3634
|
-
if((browserAsyncOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3635
|
-
return browserAsyncOrdering_
|
|
3636
|
-
} else {
|
|
3637
|
-
const nodeOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Lambda).compare_(x_.node_, y_.node_);
|
|
3638
|
-
if((nodeOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3639
|
-
return nodeOrdering_
|
|
3640
|
-
} else {
|
|
3641
|
-
const nodeSyncOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.nodeSync_, y_.nodeSync_);
|
|
3642
|
-
if((nodeSyncOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3643
|
-
return nodeSyncOrdering_
|
|
3644
|
-
} else {
|
|
3645
|
-
const nodeAsyncOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.nodeAsync_, y_.nodeAsync_);
|
|
3646
|
-
if((nodeAsyncOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
3647
|
-
return nodeAsyncOrdering_
|
|
3648
|
-
} else {
|
|
3649
|
-
return ff_core_Ordering.OrderingSame()
|
|
3650
|
-
}
|
|
3651
|
-
}
|
|
3652
|
-
}
|
|
3653
|
-
}
|
|
3654
|
-
}
|
|
3655
|
-
}
|
|
3656
|
-
}
|
|
3657
|
-
}
|
|
3658
|
-
}
|
|
3659
|
-
return
|
|
3660
|
-
}
|
|
3661
|
-
}
|
|
3662
|
-
};
|
|
3663
|
-
|
|
3664
3221
|
export const ff_core_Serializable_Serializable$ff_compiler_Parser_Poly = {
|
|
3665
3222
|
serializeUsing_(serialization_, value_) {
|
|
3666
3223
|
const serialization_a = serialization_;
|
|
@@ -3720,77 +3277,4 @@ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serial
|
|
|
3720
3277
|
}
|
|
3721
3278
|
};
|
|
3722
3279
|
|
|
3723
|
-
export const ff_core_Serializable_Serializable$ff_compiler_Parser_ParsedTargets = {
|
|
3724
|
-
serializeUsing_(serialization_, value_) {
|
|
3725
|
-
const serialization_a = serialization_;
|
|
3726
|
-
const value_a = value_;
|
|
3727
|
-
{
|
|
3728
|
-
const v_ = value_a;
|
|
3729
|
-
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 32), 0);
|
|
3730
|
-
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
3731
|
-
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
|
|
3732
|
-
serialization_.offset_ += 1;
|
|
3733
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Lambda).serializeUsing_(serialization_, v_.js_);
|
|
3734
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.jsSync_);
|
|
3735
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.jsAsync_);
|
|
3736
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Lambda).serializeUsing_(serialization_, v_.browser_);
|
|
3737
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.browserSync_);
|
|
3738
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.browserAsync_);
|
|
3739
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Lambda).serializeUsing_(serialization_, v_.node_);
|
|
3740
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.nodeSync_);
|
|
3741
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.nodeAsync_)
|
|
3742
|
-
return
|
|
3743
|
-
}
|
|
3744
|
-
},
|
|
3745
|
-
deserializeUsing_(serialization_) {
|
|
3746
|
-
const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
|
|
3747
|
-
serialization_.offset_ += 1;
|
|
3748
|
-
{
|
|
3749
|
-
const _1 = variantIndex_;
|
|
3750
|
-
if(_1 === 0) {
|
|
3751
|
-
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 32), 0);
|
|
3752
|
-
return ff_compiler_Parser.ParsedTargets(ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Lambda).deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Lambda).deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Lambda).deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_))
|
|
3753
|
-
}
|
|
3754
|
-
{
|
|
3755
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
|
|
3756
|
-
}
|
|
3757
|
-
}
|
|
3758
|
-
},
|
|
3759
|
-
async serializeUsing_$(serialization_, value_, $task) {
|
|
3760
|
-
const serialization_a = serialization_;
|
|
3761
|
-
const value_a = value_;
|
|
3762
|
-
{
|
|
3763
|
-
const v_ = value_a;
|
|
3764
|
-
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 32), 0);
|
|
3765
|
-
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
3766
|
-
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
|
|
3767
|
-
serialization_.offset_ += 1;
|
|
3768
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Lambda).serializeUsing_(serialization_, v_.js_);
|
|
3769
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.jsSync_);
|
|
3770
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.jsAsync_);
|
|
3771
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Lambda).serializeUsing_(serialization_, v_.browser_);
|
|
3772
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.browserSync_);
|
|
3773
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.browserAsync_);
|
|
3774
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Lambda).serializeUsing_(serialization_, v_.node_);
|
|
3775
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.nodeSync_);
|
|
3776
|
-
ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.nodeAsync_)
|
|
3777
|
-
return
|
|
3778
|
-
}
|
|
3779
|
-
},
|
|
3780
|
-
async deserializeUsing_$(serialization_, $task) {
|
|
3781
|
-
const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
|
|
3782
|
-
serialization_.offset_ += 1;
|
|
3783
|
-
{
|
|
3784
|
-
const _1 = variantIndex_;
|
|
3785
|
-
if(_1 === 0) {
|
|
3786
|
-
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 32), 0);
|
|
3787
|
-
return ff_compiler_Parser.ParsedTargets(ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Lambda).deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Lambda).deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Lambda).deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_))
|
|
3788
|
-
}
|
|
3789
|
-
{
|
|
3790
|
-
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
|
|
3791
|
-
}
|
|
3792
|
-
}
|
|
3793
|
-
}
|
|
3794
|
-
};
|
|
3795
|
-
|
|
3796
3280
|
|