Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Berry updated syntax highlighting plugin for VSCode #19123

Merged
merged 1 commit into from
Jul 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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