@xnoxs/flux-lang 3.5.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.md +3 -1
- package/dist/flux-cli.js +219 -15
- package/dist/flux.cjs.js +86 -3
- package/dist/flux.esm.js +86 -3
- package/dist/flux.min.js +20 -20
- package/package.json +1 -1
- package/src/self/cli.js +1 -1
- package/src/self/codegen.flux +5 -2
- package/src/self/codegen.js +1 -794
- package/src/self/css-preprocessor.js +1 -1
- package/src/self/lexer.flux +1 -1
- package/src/self/lexer.js +1 -713
- package/src/self/lexer.stage2.js +700 -0
- package/src/self/parser.flux +41 -0
- package/src/self/parser.js +1 -1571
- package/src/self/pkg.flux +107 -10
- package/src/self/pkg.js +108 -2
- package/src/self/test-runner.js +1 -1
- package/src/self/transpiler.flux +14 -4
- package/src/self/transpiler.js +1 -83
- package/src/self/type-checker.flux +12 -0
- package/src/self/type-checker.js +1 -1114
|
@@ -298,7 +298,7 @@ class CssPreprocessor {
|
|
|
298
298
|
const charAfter = (this.src[(this.pos + 3)] ?? "");
|
|
299
299
|
if ((!/[a-zA-Z0-9_]/.test(charBefore) && !/[a-zA-Z0-9_]/.test(charAfter))) {
|
|
300
300
|
let j = (this.pos + 3);
|
|
301
|
-
while (((j < this.src.length) && ((((this.src[j] == " ") || (this.src[j] == "\t")) || (this.src[j] == "\n")) || (this.src[j] == "
|
|
301
|
+
while (((j < this.src.length) && ((((this.src[j] == " ") || (this.src[j] == "\t")) || (this.src[j] == "\n")) || (this.src[j] == "\r")))) {
|
|
302
302
|
j = (j + 1);
|
|
303
303
|
}
|
|
304
304
|
if ((this.src[j] == "{")) {
|
package/src/self/lexer.flux
CHANGED
|
@@ -43,7 +43,7 @@ export val T = {
|
|
|
43
43
|
export val TokenType = T
|
|
44
44
|
|
|
45
45
|
val KEYWORDS = {
|
|
46
|
-
"var": 'VAR', "val": 'VAL', "fn": 'FN', "return": 'RETURN',
|
|
46
|
+
"var": 'VAR', "val": 'VAL', "fn": 'FN', "return": 'RETURN', "declare": 'DECLARE',
|
|
47
47
|
"if": 'IF', "else": 'ELSE', "for": 'FOR', "in": 'IN',
|
|
48
48
|
"while": 'WHILE', "break": 'BREAK', "continue": 'CONTINUE', "do": 'DO',
|
|
49
49
|
"class": 'CLASS', "extends": 'EXTENDS', "self": 'SELF', "new": 'NEW',
|