Skip to content

Commit

Permalink
Added temporary fix for variable highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
zedritsch committed Jan 15, 2024
1 parent a405c7d commit 7c1ae0a
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 21 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## v0.1.8
### Bug fixes
* False highlighting of variables inside an expression

## v0.1.7
### Additions
* Invalid numbers are highlighted
Expand Down
24 changes: 18 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,33 @@
"description": "Laye support for Visual Studio Code",
"publisher": "laye-lang",
"license": "MIT",
"version": "0.1.7",
"version": "0.1.8",
"icon": "images/icon.png",
"repository": {
"type": "git",
"url": "https://github.com/laye-lang/laye-vscode"
},
"engines": { "vscode": "^1.75.0" },
"categories": [ "Programming Languages" ],
"keywords": [ "Laye", "laye" ],
"engines": {
"vscode": "^1.75.0"
},
"categories": [
"Programming Languages"
],
"keywords": [
"Laye",
"laye"
],
"contributes": {
"languages": [
{
"id": "laye",
"aliases": [ "Laye", "laye" ],
"extensions": [ ".laye" ],
"aliases": [
"Laye",
"laye"
],
"extensions": [
".laye"
],
"icon": {
"dark": "images/dark.png",
"light": "images/light.png"
Expand Down
58 changes: 43 additions & 15 deletions syntax/laye.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,39 @@
{
"name": "Laye",
"patterns": [
{ "include": "#punctuation" },
{ "include": "#comment" },
{ "include": "#keyword" },
{ "include": "#operator" },
{ "include": "#number" },
{ "include": "#string" },
{ "include": "#namespace" },
{ "include": "#type" },
{ "include": "#function" },
{ "include": "#variable.readonly" },
{ "include": "#variable" }
{
"include": "#punctuation"
},
{
"include": "#comment"
},
{
"include": "#keyword"
},
{
"include": "#operator"
},
{
"include": "#number"
},
{
"include": "#string"
},
{
"include": "#namespace"
},
{
"include": "#type"
},
{
"include": "#function"
},
{
"include": "#variable.readonly"
},
{
"include": "#variable"
}
],
"repository": {
"punctuation": {
Expand All @@ -37,7 +59,9 @@
"begin": "`",
"end": "`",
"patterns": [
{ "include": "$self" }
{
"include": "$self"
}
]
},
{
Expand Down Expand Up @@ -123,7 +147,9 @@
"name": "constant.character.escape.laye",
"match": "\\\\\""
},
{ "include": "#escape" },
{
"include": "#escape"
},
{
"name": "constant.other.placeholder.laye",
"match": "%[\\+#]*\\d*(?:\\.\\d+)?(?:hh|ll|l)?[%EGXc-gopsux]"
Expand All @@ -143,7 +169,9 @@
"name": "constant.character.escape.laye",
"match": "\\\\'"
},
{ "include": "#escape" },
{
"include": "#escape"
},
{
"name": "invalid.laye",
"match": "\\\\."
Expand All @@ -158,7 +186,7 @@
},
"type": {
"name": "entity.name.type.laye",
"match": "(?<=\\b(?:alias|const|enum|struct|variant)\\s+)[0-9A-Z_a-z]+\\b|(?<![.0-9A-Z_a-z]\\s*)\\b[0-9A-Z_a-z]+\\b(?!\\s*(?:and|is|x?or)\\b)(?=(?:\\s*<[\\s,0-9A-Z_a-z]*>)?[\\s&*?\\[\\]]*[0-9A-Z_a-z{])|(?<=<(?:[\\s,0-9A-Z_a-z]+,)?\\s*)[0-9A-Z_a-z]+(?=\\s*[,>])"
"match": "(?<=\\b(?:alias|const|enum|struct|variant)\\s+)[0-9A-Z_a-z]+\\b|(?<![.0-9A-Z_a-z]\\s*)\\b[0-9A-Z_a-z]+\\b(?!\\s*(?:and|is|x?or)\\b)(?=(?:\\s*<[\\s,0-9A-Z_a-z]*>)?[&*?\\[\\]]*\\s*[0-9A-Z_a-z{])|(?<=<(?:[\\s,0-9A-Z_a-z]+,)?\\s*)[0-9A-Z_a-z]+(?=\\s*[,>])"
},
"function": {
"name": "entity.name.function.laye",
Expand Down

0 comments on commit 7c1ae0a

Please sign in to comment.