@yannosay/sinth 5.2.2 → 5.2.3
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 +4 -0
- package/DOCS.md +2 -2
- package/dist/compiler/lexer.js +6 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.2.3
|
|
4
|
+
|
|
5
|
+
- `script { }` and `style { }` blocks are now recognized on the line after a statement that ends in `)` or `]`, such as `var data = JSON.parse(text)`. Before, this failed with a confusing syntax error.
|
|
6
|
+
|
|
3
7
|
## 5.2.2
|
|
4
8
|
|
|
5
9
|
- Documentation: clearer README and package description, working links for the VS Code extension and Sinth IDE.
|
package/DOCS.md
CHANGED
|
@@ -1238,8 +1238,8 @@ Run `sinth build` and upload `dist/`. On Netlify the `_headers` file is used aut
|
|
|
1238
1238
|
|
|
1239
1239
|
## 32. Editor support
|
|
1240
1240
|
|
|
1241
|
-
- **VS Code**: the official extension provides syntax highlighting, completions for elements, attributes, events, modifiers, metadata keys and sinth:ui
|
|
1242
|
-
- **Sinth IDE**: a desktop editor with Sinth highlighting, completions, inline diagnostics on save, an integrated terminal, one-click
|
|
1241
|
+
- **VS Code**: the official extension provides syntax highlighting, completions for elements, attributes, events, modifiers, metadata keys, your own components and sinth:ui (with auto-import), hover documentation, go to definition, snippets, error checking with `sinth check`, and commands to run the dev server, build, preview and deploy. Download `sinth-vscode-*.vsix` from the [latest release](https://github.com/Yannosay/sinth/releases/latest) and run **Extensions: Install from VSIX**.
|
|
1242
|
+
- **Sinth IDE**: a desktop editor for Windows, macOS and Linux with Sinth highlighting, completions, inline diagnostics on save, a Problems list, an integrated terminal, one-click Run/Build/Preview/Deploy and automatic updates. Download it from [Sinth IDE releases](https://github.com/Yannosay/sinth-ide/releases/latest).
|
|
1243
1243
|
- **Other editors**: run `sinth check --json` for diagnostics in any tool.
|
|
1244
1244
|
|
|
1245
1245
|
## 33. Programmatic API
|
package/dist/compiler/lexer.js
CHANGED
|
@@ -181,8 +181,12 @@ class Lexer {
|
|
|
181
181
|
return true;
|
|
182
182
|
if (prev.kind === "raw")
|
|
183
183
|
return true;
|
|
184
|
-
if (prev.kind === "punct")
|
|
185
|
-
|
|
184
|
+
if (prev.kind === "punct") {
|
|
185
|
+
if (prev.value === "{" || prev.value === "}" || prev.value === ";")
|
|
186
|
+
return true;
|
|
187
|
+
// `var x = f()` or `var xs = [1]` followed by a block on the next line.
|
|
188
|
+
return this.sawNewline && (prev.value === ")" || prev.value === "]");
|
|
189
|
+
}
|
|
186
190
|
return this.sawNewline && (prev.kind === "string" || prev.kind === "number" || prev.kind === "ident" || prev.kind === "template");
|
|
187
191
|
}
|
|
188
192
|
readNumber(loc, start) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yannosay/sinth",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.3",
|
|
4
4
|
"description": "A reactive language for websites and web apps of any size: type-checked components, file-based and dynamic routing, prerendered pages and one-command deploys.",
|
|
5
5
|
"author": "Yannosay Productions",
|
|
6
6
|
"license": "AGPL-3.0",
|