@lango-project/lango-js 0.1.4 → 0.1.5
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/package.json +1 -1
- package/src/compiler.mjs +4 -1
package/package.json
CHANGED
package/src/compiler.mjs
CHANGED
|
@@ -1055,7 +1055,10 @@ class Parser {
|
|
|
1055
1055
|
const next = this.peek();
|
|
1056
1056
|
if (next === undefined || spaces(next) < indent)
|
|
1057
1057
|
this.fail(line, "LNG1262", "unterminated multi-line expression");
|
|
1058
|
-
|
|
1058
|
+
const continuation = this.line().text.trim();
|
|
1059
|
+
const startsField = /^(?:\$?[A-Za-z_][\w-]*|['"][^'"]+['"]): /.test(continuation);
|
|
1060
|
+
if (startsField && !/[{,]\s*$/.test(source)) source += ",";
|
|
1061
|
+
source += ` ${continuation}`;
|
|
1059
1062
|
depth = curlyDelimiterDepth(source);
|
|
1060
1063
|
}
|
|
1061
1064
|
return source;
|