Skip to content

Commit

Permalink
Berry updated syntax highlighting plugin for VSCode (#19123)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-hadinger committed Jul 15, 2023
1 parent 0c0ca82 commit ca8ec6a
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file.
- ESP32 shutter driver support up to 16 shutters (#18295)
- Configuration backup and restore now backup and restore ``.xdrvsetXXX`` files too (#18295)
- Berry extend `range(lower, upper, incr)` to arbitrary increment
- Berry updated syntax highlighting plugin for VSCode

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ All notable changes to the "none" extension will be documented in this file.
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## [Unreleased]
- Initial release
- Initial release
- add support for f-strings, `_class` and indent on `do`
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
["'", "'"]
],
"indentationRules": {
"increaseIndentPattern": "(^((\\s*(class|while|for|if|elif|else|try|except))|(.*\\bdef))\\b((?!\\b(end)\\b).)*)$",
"increaseIndentPattern": "(^((\\s*(class|while|for|if|elif|else|try|except|do))|(.*\\bdef))\\b((?!\\b(end)\\b).)*)$",
"decreaseIndentPattern": "^\\s*((\\b(elif|else|except|end)\\b)|(\\)))"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "berry",
"displayName": "Berry Script Language",
"description": "A small embedded script language.",
"version": "0.1.0",
"version": "1.1.0",
"publisher": "skiars",
"engines": {
"vscode": "^1.15.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,55 @@
"patterns": [
{
"name": "string.quoted.double.berry",
"match": "\"(\\\\.|[^\"])*\""
"begin": "(\"|')",
"end": "\\1",
"patterns": [
{
"name": "constant.character.escape.berry",
"match": "\\\\."
}
]
},
{
"name": "string.quoted.single.berry",
"match": "'(\\\\.|[^'])*'"
"name": "string.quoted.other.berry",
"begin": "f(\"|')",
"end": "\\1",
"patterns": [
{
"name": "constant.character.escape.berry",
"match": "\\\\."
},
{
"name": "string.quoted.other.berry",
"match": "\\{\\{[^\\}]*\\}\\}"
},
{
"name": "keyword.other.unit.berry",
"begin": "\\{",
"end": "\\}",
"patterns": [
{
"include": "#keywords"
},
{
"include": "#numbers"
},
{
"include": "#identifier"
},
{
"include": "#operator"
},
{
"include": "#member"
},
{
"include": "#function"
}
]
}

]
}
]
},
Expand Down

0 comments on commit ca8ec6a

Please sign in to comment.