rip-lang 3.9.0 → 3.9.1
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 +29 -0
- package/README.md +14 -14
- package/docs/RIP-LANG.md +10 -1
- package/docs/dist/rip-ui.min.js +119 -119
- package/docs/dist/rip-ui.min.js.br +0 -0
- package/docs/dist/rip.browser.min.js +143 -143
- package/docs/dist/rip.browser.min.js.br +0 -0
- package/docs/example/index.html +34 -0
- package/docs/example/index.json +14 -0
- package/docs/index.html +1475 -3
- package/docs/sierpinski.html +114 -0
- package/package.json +1 -1
- package/src/browser.js +18 -9
- package/src/compiler.js +3 -0
- package/src/components.js +63 -16
- package/src/grammar/grammar.rip +2 -2
- package/src/grammar/parser.js +360 -0
- package/src/lexer.js +10 -0
- package/src/parser.js +5 -6
- package/docs/demo.html +0 -342
- package/docs/playground-app.html +0 -1022
- package/docs/playground-js.html +0 -1645
- package/docs/playground-rip-ui.html +0 -1419
- package/docs/playground-rip.html +0 -1450
package/src/lexer.js
CHANGED
|
@@ -758,6 +758,16 @@ export class Lexer {
|
|
|
758
758
|
if (this.inRenderBlock && LINE_CONTINUER_RE.test(this.chunk) && /^\s*\./.test(this.chunk)) {
|
|
759
759
|
return false;
|
|
760
760
|
}
|
|
761
|
+
// Inside render blocks, a bare . at line start is div shorthand, not continuation
|
|
762
|
+
if (this.inRenderBlock && this.prevTag() === '.') {
|
|
763
|
+
let len = this.tokens.length;
|
|
764
|
+
if (len >= 2) {
|
|
765
|
+
let beforeDot = this.tokens[len - 2][0];
|
|
766
|
+
if (beforeDot === 'INDENT' || beforeDot === 'TERMINATOR' || beforeDot === 'OUTDENT') {
|
|
767
|
+
return false;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
}
|
|
761
771
|
return LINE_CONTINUER_RE.test(this.chunk) || UNFINISHED.has(this.prevTag());
|
|
762
772
|
}
|
|
763
773
|
|