firefly-compiler 0.4.7 → 0.4.9

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.
Files changed (91) hide show
  1. package/compiler/Compiler.ff +2 -0
  2. package/compiler/Deriver.ff +7 -0
  3. package/core/Array.ff +17 -4
  4. package/core/AssetSystem.ff +1 -1
  5. package/core/BrowserSystem.ff +27 -0
  6. package/core/List.ff +4 -0
  7. package/core/Lock.ff +2 -2
  8. package/core/Path.ff +6 -2
  9. package/core/Random.ff +148 -0
  10. package/core/SourceLocation.ff +27 -0
  11. package/core/Task.ff +3 -0
  12. package/core/WebSocket.ff +127 -0
  13. package/httpserver/HttpServer.ff +1 -1
  14. package/lux/Css.ff +648 -0
  15. package/lux/CssTest.ff +48 -0
  16. package/lux/Lux.ff +33 -18
  17. package/lux/Main.ff +4 -1
  18. package/output/js/ff/compiler/Builder.mjs +4 -0
  19. package/output/js/ff/compiler/Compiler.mjs +5 -1
  20. package/output/js/ff/compiler/Dependencies.mjs +4 -0
  21. package/output/js/ff/compiler/Deriver.mjs +10 -2
  22. package/output/js/ff/compiler/Dictionaries.mjs +6 -0
  23. package/output/js/ff/compiler/Environment.mjs +10 -0
  24. package/output/js/ff/compiler/Inference.mjs +4 -0
  25. package/output/js/ff/compiler/JsEmitter.mjs +14 -0
  26. package/output/js/ff/compiler/JsImporter.mjs +4 -0
  27. package/output/js/ff/compiler/LspHook.mjs +6 -0
  28. package/output/js/ff/compiler/Main.mjs +16 -0
  29. package/output/js/ff/compiler/Parser.mjs +8 -0
  30. package/output/js/ff/compiler/Patterns.mjs +8 -0
  31. package/output/js/ff/compiler/Resolver.mjs +4 -0
  32. package/output/js/ff/compiler/Substitution.mjs +4 -0
  33. package/output/js/ff/compiler/Syntax.mjs +132 -0
  34. package/output/js/ff/compiler/Token.mjs +56 -0
  35. package/output/js/ff/compiler/Tokenizer.mjs +4 -0
  36. package/output/js/ff/compiler/Unification.mjs +10 -0
  37. package/output/js/ff/compiler/Wildcards.mjs +4 -0
  38. package/output/js/ff/compiler/Workspace.mjs +8 -0
  39. package/output/js/ff/core/Any.mjs +4 -0
  40. package/output/js/ff/core/Array.mjs +27 -1
  41. package/output/js/ff/core/AssetSystem.mjs +6 -2
  42. package/output/js/ff/core/Atomic.mjs +4 -0
  43. package/output/js/ff/core/Bool.mjs +4 -0
  44. package/output/js/ff/core/Box.mjs +4 -0
  45. package/output/js/ff/core/BrowserSystem.mjs +55 -0
  46. package/output/js/ff/core/Buffer.mjs +4 -0
  47. package/output/js/ff/core/BuildSystem.mjs +4 -0
  48. package/output/js/ff/core/Channel.mjs +4 -0
  49. package/output/js/ff/core/Char.mjs +4 -0
  50. package/output/js/ff/core/Core.mjs +4 -0
  51. package/output/js/ff/core/Duration.mjs +4 -0
  52. package/output/js/ff/core/Equal.mjs +4 -0
  53. package/output/js/ff/core/Error.mjs +4 -0
  54. package/output/js/ff/core/FileHandle.mjs +4 -0
  55. package/output/js/ff/core/Float.mjs +4 -0
  56. package/output/js/ff/core/HttpClient.mjs +4 -0
  57. package/output/js/ff/core/Instant.mjs +4 -0
  58. package/output/js/ff/core/Int.mjs +4 -0
  59. package/output/js/ff/core/IntMap.mjs +4 -0
  60. package/output/js/ff/core/JsSystem.mjs +4 -0
  61. package/output/js/ff/core/JsValue.mjs +4 -0
  62. package/output/js/ff/core/List.mjs +12 -0
  63. package/output/js/ff/core/Lock.mjs +6 -2
  64. package/output/js/ff/core/Log.mjs +4 -0
  65. package/output/js/ff/core/Map.mjs +4 -0
  66. package/output/js/ff/core/NodeSystem.mjs +4 -0
  67. package/output/js/ff/core/Nothing.mjs +4 -0
  68. package/output/js/ff/core/Option.mjs +8 -0
  69. package/output/js/ff/core/Ordering.mjs +4 -0
  70. package/output/js/ff/core/Pair.mjs +6 -0
  71. package/output/js/ff/core/Path.mjs +10 -2
  72. package/output/js/ff/core/Random.mjs +340 -0
  73. package/output/js/ff/core/RbMap.mjs +4 -0
  74. package/output/js/ff/core/Serializable.mjs +4 -0
  75. package/output/js/ff/core/Set.mjs +4 -0
  76. package/output/js/ff/core/Show.mjs +4 -0
  77. package/output/js/ff/core/SourceLocation.mjs +45 -1
  78. package/output/js/ff/core/Stack.mjs +4 -0
  79. package/output/js/ff/core/Stream.mjs +4 -0
  80. package/output/js/ff/core/String.mjs +4 -0
  81. package/output/js/ff/core/StringMap.mjs +4 -0
  82. package/output/js/ff/core/Task.mjs +7 -1
  83. package/output/js/ff/core/Try.mjs +4 -0
  84. package/output/js/ff/core/Unit.mjs +4 -0
  85. package/output/js/ff/core/WebSocket.mjs +198 -0
  86. package/package.json +1 -1
  87. package/vscode/package.json +1 -1
  88. package/webserver/.firefly/include/package-lock.json +16 -0
  89. package/webserver/.firefly/include/package.json +5 -0
  90. package/webserver/.firefly/package.ff +2 -0
  91. package/webserver/WebServer.ff +608 -0
@@ -66,6 +66,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
66
66
 
67
67
  import * as ff_core_Path from "../../ff/core/Path.mjs"
68
68
 
69
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
70
+
69
71
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
70
72
 
71
73
  import * as ff_core_Set from "../../ff/core/Set.mjs"
@@ -88,6 +90,8 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
88
90
 
89
91
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
90
92
 
93
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
94
+
91
95
  // type Unit
92
96
  const Unit$ = {Unit: true};
93
97
  export function Unit() {
@@ -0,0 +1,198 @@
1
+
2
+
3
+ import * as ff_core_Any from "../../ff/core/Any.mjs"
4
+
5
+ import * as ff_core_Array from "../../ff/core/Array.mjs"
6
+
7
+ import * as ff_core_AssetSystem from "../../ff/core/AssetSystem.mjs"
8
+
9
+ import * as ff_core_Atomic from "../../ff/core/Atomic.mjs"
10
+
11
+ import * as ff_core_Bool from "../../ff/core/Bool.mjs"
12
+
13
+ import * as ff_core_Box from "../../ff/core/Box.mjs"
14
+
15
+ import * as ff_core_BrowserSystem from "../../ff/core/BrowserSystem.mjs"
16
+
17
+ import * as ff_core_Buffer from "../../ff/core/Buffer.mjs"
18
+
19
+ import * as ff_core_BuildSystem from "../../ff/core/BuildSystem.mjs"
20
+
21
+ import * as ff_core_Channel from "../../ff/core/Channel.mjs"
22
+
23
+ import * as ff_core_Char from "../../ff/core/Char.mjs"
24
+
25
+ import * as ff_core_Core from "../../ff/core/Core.mjs"
26
+
27
+ import * as ff_core_Duration from "../../ff/core/Duration.mjs"
28
+
29
+ import * as ff_core_Equal from "../../ff/core/Equal.mjs"
30
+
31
+ import * as ff_core_Error from "../../ff/core/Error.mjs"
32
+
33
+ import * as ff_core_FileHandle from "../../ff/core/FileHandle.mjs"
34
+
35
+ import * as ff_core_Float from "../../ff/core/Float.mjs"
36
+
37
+ import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
38
+
39
+ import * as ff_core_Instant from "../../ff/core/Instant.mjs"
40
+
41
+ import * as ff_core_Int from "../../ff/core/Int.mjs"
42
+
43
+ import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
44
+
45
+ import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
46
+
47
+ import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
48
+
49
+ import * as ff_core_List from "../../ff/core/List.mjs"
50
+
51
+ import * as ff_core_Lock from "../../ff/core/Lock.mjs"
52
+
53
+ import * as ff_core_Log from "../../ff/core/Log.mjs"
54
+
55
+ import * as ff_core_Map from "../../ff/core/Map.mjs"
56
+
57
+ import * as ff_core_NodeSystem from "../../ff/core/NodeSystem.mjs"
58
+
59
+ import * as ff_core_Nothing from "../../ff/core/Nothing.mjs"
60
+
61
+ import * as ff_core_Option from "../../ff/core/Option.mjs"
62
+
63
+ import * as ff_core_Ordering from "../../ff/core/Ordering.mjs"
64
+
65
+ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
66
+
67
+ import * as ff_core_Path from "../../ff/core/Path.mjs"
68
+
69
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
70
+
71
+ import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
72
+
73
+ import * as ff_core_Set from "../../ff/core/Set.mjs"
74
+
75
+ import * as ff_core_Show from "../../ff/core/Show.mjs"
76
+
77
+ import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
78
+
79
+ import * as ff_core_Stack from "../../ff/core/Stack.mjs"
80
+
81
+ import * as ff_core_Stream from "../../ff/core/Stream.mjs"
82
+
83
+ import * as ff_core_String from "../../ff/core/String.mjs"
84
+
85
+ import * as ff_core_StringMap from "../../ff/core/StringMap.mjs"
86
+
87
+ import * as ff_core_Task from "../../ff/core/Task.mjs"
88
+
89
+ import * as ff_core_Try from "../../ff/core/Try.mjs"
90
+
91
+ import * as ff_core_Unit from "../../ff/core/Unit.mjs"
92
+
93
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
94
+
95
+ // type WebSocket
96
+
97
+
98
+
99
+
100
+ export function internalOpenBrowserWebSocket_(browserSystem_, url_) {
101
+ throw new Error('Function internalOpenBrowserWebSocket is missing on this target in sync context.');
102
+ }
103
+
104
+ export async function internalOpenBrowserWebSocket_$(browserSystem_, url_, $task) {
105
+ throw new Error('Function internalOpenBrowserWebSocket is missing on this target in async context.');
106
+ }
107
+
108
+ export function WebSocket_readText(self_, encoding_ = "utf8") {
109
+ return ff_core_WebSocket.WebSocket_readAny(self_, ((_w1) => {
110
+ return _w1
111
+ }), ((_w1) => {
112
+ return ff_core_Buffer.Buffer_toString(_w1, encoding_)
113
+ }))
114
+ }
115
+
116
+ export function WebSocket_readBuffer(self_) {
117
+ return ff_core_WebSocket.WebSocket_readAny(self_, ((_w1) => {
118
+ return ff_core_String.String_toBuffer(_w1)
119
+ }), ((_w1) => {
120
+ return _w1
121
+ }))
122
+ }
123
+
124
+ export function WebSocket_readAny(self_, fromText_, fromBuffer_) {
125
+ throw new Error('Function WebSocket_readAny is missing on this target in sync context.');
126
+ }
127
+
128
+ export function WebSocket_writeBuffer(self_, data_) {
129
+ throw new Error('Function WebSocket_writeBuffer is missing on this target in sync context.');
130
+ }
131
+
132
+ export function WebSocket_writeText(self_, data_) {
133
+ throw new Error('Function WebSocket_writeText is missing on this target in sync context.');
134
+ }
135
+
136
+ export function WebSocket_close(self_, code_ = 1000, reason_ = "") {
137
+ throw new Error('Function WebSocket_close is missing on this target in sync context.');
138
+ }
139
+
140
+ export function WebSocket_isOpen(self_) {
141
+ throw new Error('Function WebSocket_isOpen is missing on this target in sync context.');
142
+ }
143
+
144
+ export function WebSocket_isClosing(self_) {
145
+ throw new Error('Function WebSocket_isClosing is missing on this target in sync context.');
146
+ }
147
+
148
+ export function WebSocket_isClosed(self_) {
149
+ throw new Error('Function WebSocket_isClosed is missing on this target in sync context.');
150
+ }
151
+
152
+ export async function WebSocket_readText$(self_, encoding_ = "utf8", $task) {
153
+ return (await ff_core_WebSocket.WebSocket_readAny$(self_, (async (_w1, $task) => {
154
+ return _w1
155
+ }), (async (_w1, $task) => {
156
+ return ff_core_Buffer.Buffer_toString(_w1, encoding_)
157
+ }), $task))
158
+ }
159
+
160
+ export async function WebSocket_readBuffer$(self_, $task) {
161
+ return (await ff_core_WebSocket.WebSocket_readAny$(self_, (async (_w1, $task) => {
162
+ return ff_core_String.String_toBuffer(_w1)
163
+ }), (async (_w1, $task) => {
164
+ return _w1
165
+ }), $task))
166
+ }
167
+
168
+ export async function WebSocket_readAny$(self_, fromText_, fromBuffer_, $task) {
169
+ throw new Error('Function WebSocket_readAny is missing on this target in async context.');
170
+ }
171
+
172
+ export async function WebSocket_writeBuffer$(self_, data_, $task) {
173
+ throw new Error('Function WebSocket_writeBuffer is missing on this target in async context.');
174
+ }
175
+
176
+ export async function WebSocket_writeText$(self_, data_, $task) {
177
+ throw new Error('Function WebSocket_writeText is missing on this target in async context.');
178
+ }
179
+
180
+ export async function WebSocket_close$(self_, code_ = 1000, reason_ = "", $task) {
181
+ throw new Error('Function WebSocket_close is missing on this target in async context.');
182
+ }
183
+
184
+ export async function WebSocket_isOpen$(self_, $task) {
185
+ throw new Error('Function WebSocket_isOpen is missing on this target in async context.');
186
+ }
187
+
188
+ export async function WebSocket_isClosing$(self_, $task) {
189
+ throw new Error('Function WebSocket_isClosing is missing on this target in async context.');
190
+ }
191
+
192
+ export async function WebSocket_isClosed$(self_, $task) {
193
+ throw new Error('Function WebSocket_isClosed is missing on this target in async context.');
194
+ }
195
+
196
+
197
+
198
+
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly compiler",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.4.7",
7
+ "version": "0.4.9",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly language support",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.4.7",
7
+ "version": "0.4.9",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "include",
3
+ "lockfileVersion": 3,
4
+ "requires": true,
5
+ "packages": {
6
+ "": {
7
+ "dependencies": {
8
+ "uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.41.0"
9
+ }
10
+ },
11
+ "node_modules/uWebSockets.js": {
12
+ "version": "20.41.0",
13
+ "resolved": "git+ssh://git@github.com/uNetworking/uWebSockets.js.git#105d9ec47126cb82e4a6f3a08aa2ac78b4bb14f1"
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "dependencies": {
3
+ "uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.41.0"
4
+ }
5
+ }
@@ -0,0 +1,2 @@
1
+ package ff:webserver:0.0.0
2
+ include "node_modules"