Skip to content

Commit 6515c9a

Browse files
committed
v1.2.2: fix label
1 parent b24f619 commit 6515c9a

8 files changed

Lines changed: 27 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [1.2.2] - 2023-09-28
4+
5+
- Syntax highlighting:
6+
+ Fix: `break`, `continue` are not highlighted when the label name begins with a keyword.
7+
38
## [1.2.1] - 2023-09-27
49

510
- Syntax highlighting:

dist/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [1.2.2] - 2023-09-28
4+
5+
- Syntax highlighting:
6+
+ Fix: `break`, `continue` are not highlighted when the label name begins with a keyword.
7+
38
## [1.2.1] - 2023-09-27
49

510
- Syntax highlighting:

dist/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"livescript-vscode","version":"1.2.1","displayName":"LiveScript 2","description":"Syntax highlighting, autocomplete, and snippets","icon":"./icon.png","publisher":"tientq64","author":{"name":"tientq64","email":"tientq64@gmail.com","url":"https://github.com/tientq64"},"repository":{"type":"git","url":"https://github.com/tientq64/livescript-vscode.git"},"bugs":{"url":"https://github.com/tientq64/livescript-vscode/issues","email":"tientq64@gmail.com"},"engines":{"vscode":"^1.74.0"},"categories":["Programming Languages","Snippets"],"keywords":["livescript","syntax-highlighting","autocomplete","snippets","vscode-extension"],"scripts":{"build-and-publish":"ls2 build.ls && cd dist && vsce publish"},"devDependencies":{"fs-extra":"^11.1.1","livescript2":"^1.5.0","terser":"^5.20.0","js-yaml":"^4.1.0","@vscode/vsce":"^2.21.0"},"contributes":{"languages":[{"id":"livescript","aliases":["LiveScript"],"extensions":[".ls",".livescript"],"configuration":"./language-configuration.json"}],"grammars":[{"language":"livescript","scopeName":"source.livescript","path":"./syntaxes/livescript.tmLanguage.json"}],"snippets":[{"language":"livescript","path":"./snippets/livescript.code-snippets"}]},"license":"MIT"}
1+
{"name":"livescript-vscode","version":"1.2.2","displayName":"LiveScript 2","description":"Syntax highlighting, autocomplete, and snippets","icon":"./icon.png","publisher":"tientq64","author":{"name":"tientq64","email":"tientq64@gmail.com","url":"https://github.com/tientq64"},"repository":{"type":"git","url":"https://github.com/tientq64/livescript-vscode.git"},"bugs":{"url":"https://github.com/tientq64/livescript-vscode/issues","email":"tientq64@gmail.com"},"engines":{"vscode":"^1.74.0"},"categories":["Programming Languages","Snippets"],"keywords":["livescript","syntax-highlighting","autocomplete","snippets","vscode-extension"],"scripts":{"build-and-publish":"ls2 build.ls && cd dist && vsce publish"},"devDependencies":{"fs-extra":"^11.1.1","livescript2":"^1.5.0","terser":"^5.20.0","js-yaml":"^4.1.0","@vscode/vsce":"^2.21.0"},"contributes":{"languages":[{"id":"livescript","aliases":["LiveScript"],"extensions":[".ls",".livescript"],"configuration":"./language-configuration.json"}],"grammars":[{"language":"livescript","scopeName":"source.livescript","path":"./syntaxes/livescript.tmLanguage.json"}],"snippets":[{"language":"livescript","path":"./snippets/livescript.code-snippets"}]},"license":"MIT"}

dist/syntaxes/livescript.tmLanguage.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "livescript-vscode",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"displayName": "LiveScript 2",
55
"description": "Syntax highlighting, autocomplete, and snippets",
66
"icon": "./icon.png",

sample.ls

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,18 @@ nam3~10 = ->
182182

183183
:build loop
184184
break build
185+
break if
186+
break if a > 0
187+
break ifaa
188+
break if44
189+
break if$
190+
break if_
191+
break aaif
192+
break 44if
193+
break $if
194+
break _if
195+
break and
196+
break class A
185197

186198
obj =
187199
if: 4

syntaxes/livescript.tmLanguage.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,13 @@ repository:
339339

340340
label:
341341
patterns:
342-
- match: (:)(?!<<keywords>>)(<<ident>>)
342+
- match: (:)(?!(?:<<keywords>>)(?![\w$]))(<<ident>>)
343343
captures:
344344
1:
345345
name: punctuation.separator.label.livescript
346346
2:
347347
name: entity.name.label.livescript
348-
- match: (break|continue)\s+(?!<<keywords>>)(<<ident>>)
348+
- match: (break|continue)\s+(?!(?:<<keywords>>)(?![\w$]))(<<ident>>)
349349
captures:
350350
1:
351351
name: keyword.control.livescript

0 commit comments

Comments
 (0)