firefly-compiler 0.4.65 → 0.4.66
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/core/NodeSystem.ff +0 -7
- package/core/Random.ff +7 -7
- package/lsp/CompletionHandler.ff +1 -1
- package/output/js/ff/core/NodeSystem.mjs +0 -18
- package/output/js/ff/core/Random.mjs +15 -15
- package/package.json +1 -1
- package/vscode/package.json +1 -1
package/core/NodeSystem.ff
CHANGED
|
@@ -195,13 +195,6 @@ internalProcessError(problem: String): Error {
|
|
|
195
195
|
} grab()
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
internalFindCommand(out: String): String {
|
|
199
|
-
out.lines().find {line =>
|
|
200
|
-
let l = line.lower()
|
|
201
|
-
l.endsWith(".exe") || l.endsWith(".cmd") || l.endsWith(".bat") || l.endsWith(".com")
|
|
202
|
-
}.else {""}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
198
|
internalWindowsWhere(
|
|
206
199
|
system: NodeSystem
|
|
207
200
|
cmd: String
|
package/core/Random.ff
CHANGED
|
@@ -3,21 +3,21 @@ class Random {}
|
|
|
3
3
|
// Using Alea PRNG by Johannes Baagøe <baagoe@baagoe.com>, 2010
|
|
4
4
|
// Typical use: Random.seedInstant(system.task().now())
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
newFromInt(seed: Int): Random {
|
|
7
|
+
newFromFloat(seed.toFloat())
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
newFromFloat(seed: Float): Random {
|
|
11
11
|
let buffer = Buffer.new(8)
|
|
12
12
|
buffer.setFloat64(0, seed)
|
|
13
|
-
|
|
13
|
+
newFromBuffer(buffer)
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
newFromInstant(seed: Instant): Random {
|
|
17
|
+
newFromFloat(seed.since1970.seconds)
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
newFromBuffer(buffer: Buffer): Random
|
|
21
21
|
target js sync """
|
|
22
22
|
var n = 0xefc8249d;
|
|
23
23
|
function mash(data) {
|
package/lsp/CompletionHandler.ff
CHANGED
|
@@ -353,8 +353,8 @@ makeCompletion(
|
|
|
353
353
|
let beforeAfter = memberScheme.signature.parameters.first().map {
|
|
354
354
|
Pair(unification.substitute(_.valueType).show([]) + ".", "")
|
|
355
355
|
}.else {Pair("", "")}
|
|
356
|
-
beforeAfter.first +
|
|
357
356
|
if(memberScheme.isMutable) {"mutable "} else {""} +
|
|
357
|
+
beforeAfter.first +
|
|
358
358
|
unqualifiedName + generics +
|
|
359
359
|
": " + returnType.show([]) +
|
|
360
360
|
beforeAfter.second
|
|
@@ -127,15 +127,6 @@ return error_
|
|
|
127
127
|
})))
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
export function internalFindCommand_(out_) {
|
|
131
|
-
return ff_core_Option.Option_else(ff_core_List.List_find(ff_core_String.String_lines(out_), ((line_) => {
|
|
132
|
-
const l_ = ff_core_String.String_lower(line_);
|
|
133
|
-
return (((ff_core_String.String_endsWith(l_, ".exe") || ff_core_String.String_endsWith(l_, ".cmd")) || ff_core_String.String_endsWith(l_, ".bat")) || ff_core_String.String_endsWith(l_, ".com"))
|
|
134
|
-
})), (() => {
|
|
135
|
-
return ""
|
|
136
|
-
}))
|
|
137
|
-
}
|
|
138
|
-
|
|
139
130
|
export function internalWindowsWhere_(system_, cmd_, command_, directory_ = ff_core_Option.None(), environment_ = ff_core_Option.None()) {
|
|
140
131
|
if((!ff_core_String.String_all(command_, ((c_) => {
|
|
141
132
|
return ((ff_core_Char.Char_isAsciiLetterOrDigit(c_) || (c_ === 95)) || (c_ === 45))
|
|
@@ -172,15 +163,6 @@ return error_
|
|
|
172
163
|
})))
|
|
173
164
|
}
|
|
174
165
|
|
|
175
|
-
export async function internalFindCommand_$(out_, $task) {
|
|
176
|
-
return ff_core_Option.Option_else(ff_core_List.List_find(ff_core_String.String_lines(out_), ((line_) => {
|
|
177
|
-
const l_ = ff_core_String.String_lower(line_);
|
|
178
|
-
return (((ff_core_String.String_endsWith(l_, ".exe") || ff_core_String.String_endsWith(l_, ".cmd")) || ff_core_String.String_endsWith(l_, ".bat")) || ff_core_String.String_endsWith(l_, ".com"))
|
|
179
|
-
})), (() => {
|
|
180
|
-
return ""
|
|
181
|
-
}))
|
|
182
|
-
}
|
|
183
|
-
|
|
184
166
|
export async function internalWindowsWhere_$(system_, cmd_, command_, directory_ = ff_core_Option.None(), environment_ = ff_core_Option.None(), $task) {
|
|
185
167
|
if((!ff_core_String.String_all(command_, ((c_) => {
|
|
186
168
|
return ((ff_core_Char.Char_isAsciiLetterOrDigit(c_) || (c_ === 95)) || (c_ === 45))
|
|
@@ -95,21 +95,21 @@ import * as ff_core_Unit from "../../ff/core/Unit.mjs"
|
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
export function
|
|
99
|
-
return ff_core_Random.
|
|
98
|
+
export function newFromInt_(seed_) {
|
|
99
|
+
return ff_core_Random.newFromFloat_(ff_core_Int.Int_toFloat(seed_))
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
export function
|
|
102
|
+
export function newFromFloat_(seed_) {
|
|
103
103
|
const buffer_ = ff_core_Buffer.new_(8, false);
|
|
104
104
|
ff_core_Buffer.Buffer_setFloat64(buffer_, 0, seed_, true);
|
|
105
|
-
return ff_core_Random.
|
|
105
|
+
return ff_core_Random.newFromBuffer_(buffer_)
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
export function
|
|
109
|
-
return ff_core_Random.
|
|
108
|
+
export function newFromInstant_(seed_) {
|
|
109
|
+
return ff_core_Random.newFromFloat_(seed_)
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
export function
|
|
112
|
+
export function newFromBuffer_(buffer_) {
|
|
113
113
|
|
|
114
114
|
var n = 0xefc8249d;
|
|
115
115
|
function mash(data) {
|
|
@@ -143,22 +143,22 @@ export function seedBuffer_(buffer_) {
|
|
|
143
143
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
export async function
|
|
147
|
-
return ff_core_Random.
|
|
146
|
+
export async function newFromInt_$(seed_, $task) {
|
|
147
|
+
return ff_core_Random.newFromFloat_(ff_core_Int.Int_toFloat(seed_))
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
export async function
|
|
150
|
+
export async function newFromFloat_$(seed_, $task) {
|
|
151
151
|
const buffer_ = ff_core_Buffer.new_(8, false);
|
|
152
152
|
ff_core_Buffer.Buffer_setFloat64(buffer_, 0, seed_, true);
|
|
153
|
-
return ff_core_Random.
|
|
153
|
+
return ff_core_Random.newFromBuffer_(buffer_)
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
export async function
|
|
157
|
-
return ff_core_Random.
|
|
156
|
+
export async function newFromInstant_$(seed_, $task) {
|
|
157
|
+
return ff_core_Random.newFromFloat_(seed_)
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
export async function
|
|
161
|
-
throw new Error('Function
|
|
160
|
+
export async function newFromBuffer_$(buffer_, $task) {
|
|
161
|
+
throw new Error('Function newFromBuffer is missing on this target in async context.');
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
export function Random_copy(self_) {
|
package/package.json
CHANGED