rip-lang 3.13.21 → 3.13.22

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rip-lang",
3
- "version": "3.13.21",
3
+ "version": "3.13.22",
4
4
  "description": "A modern language that compiles to JavaScript",
5
5
  "type": "module",
6
6
  "main": "src/compiler.js",
package/src/components.js CHANGED
@@ -397,7 +397,17 @@ export function installComponentSupport(CodeGenerator, Lexer) {
397
397
  // ─────────────────────────────────────────────────────────────────────
398
398
  // Implicit nesting (inject -> before INDENT)
399
399
  // ─────────────────────────────────────────────────────────────────────
400
- if (nextToken && nextToken[0] === 'INDENT' && !nextToken.fromThen) {
400
+ if (nextToken && nextToken[0] === 'INDENT') {
401
+ // Skip fromThen INDENTs inside string interpolation (e.g. "#{if x then y else z}")
402
+ if (nextToken.fromThen) {
403
+ let depth = 0;
404
+ for (let j = i; j >= 0; j--) {
405
+ let jt = tokens[j][0];
406
+ if (jt === 'INTERPOLATION_END' || jt === 'STRING_END') depth++;
407
+ if (jt === 'INTERPOLATION_START' || jt === 'STRING_START') depth--;
408
+ if (depth < 0) { return 1; }
409
+ }
410
+ }
401
411
  if (tag === '->' || tag === '=>' || tag === 'CALL_START' || tag === '(') {
402
412
  return 1;
403
413
  }