@cilix/lightjs 0.0.9 → 0.0.11
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.js +8 -6
- package/package.json +1 -1
package/core.js
CHANGED
|
@@ -771,7 +771,7 @@ module.exports = (config, fs, path) => {
|
|
|
771
771
|
return acc;
|
|
772
772
|
}
|
|
773
773
|
|
|
774
|
-
function parse_atom () {
|
|
774
|
+
function parse_atom (noacc) {
|
|
775
775
|
let unop = tok.data;
|
|
776
776
|
let expr = { pos: tok.pos, file: tok.file };
|
|
777
777
|
if (accept('!') || accept('-')) {
|
|
@@ -814,6 +814,9 @@ module.exports = (config, fs, path) => {
|
|
|
814
814
|
} else {
|
|
815
815
|
unexpected();
|
|
816
816
|
}
|
|
817
|
+
if (noacc) {
|
|
818
|
+
return expr;
|
|
819
|
+
}
|
|
817
820
|
let acc = parse_acc();
|
|
818
821
|
if (acc) {
|
|
819
822
|
acc.unshift(expr);
|
|
@@ -998,6 +1001,9 @@ module.exports = (config, fs, path) => {
|
|
|
998
1001
|
if (accept("ident") || accept("as")) {
|
|
999
1002
|
// allow ':' in attribute names
|
|
1000
1003
|
while (accept(':')) {
|
|
1004
|
+
if (key === 'bind') {
|
|
1005
|
+
includeRuntime = true;
|
|
1006
|
+
}
|
|
1001
1007
|
key += ':'
|
|
1002
1008
|
key += tok.data;
|
|
1003
1009
|
expect("ident");
|
|
@@ -1009,11 +1015,7 @@ module.exports = (config, fs, path) => {
|
|
|
1009
1015
|
} else if (peek("string")) {
|
|
1010
1016
|
attr[key] = parse_string();
|
|
1011
1017
|
} else {
|
|
1012
|
-
|
|
1013
|
-
msg: "unexpected " + tok.type,
|
|
1014
|
-
pos: tok.pos,
|
|
1015
|
-
file: tok.file
|
|
1016
|
-
});
|
|
1018
|
+
attr[key] = parse_atom(true);
|
|
1017
1019
|
}
|
|
1018
1020
|
} else {
|
|
1019
1021
|
attr[key] = { type: "bool", data: true };
|