@cilix/lightjs 0.0.10 → 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 +5 -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);
|
|
@@ -1012,11 +1015,7 @@ module.exports = (config, fs, path) => {
|
|
|
1012
1015
|
} else if (peek("string")) {
|
|
1013
1016
|
attr[key] = parse_string();
|
|
1014
1017
|
} else {
|
|
1015
|
-
|
|
1016
|
-
msg: "unexpected " + tok.type,
|
|
1017
|
-
pos: tok.pos,
|
|
1018
|
-
file: tok.file
|
|
1019
|
-
});
|
|
1018
|
+
attr[key] = parse_atom(true);
|
|
1020
1019
|
}
|
|
1021
1020
|
} else {
|
|
1022
1021
|
attr[key] = { type: "bool", data: true };
|