diff --git a/CHANGELOG.md b/CHANGELOG.md index 99d29e9..9b91a50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ ## [Unreleased] +### Features + +- Slint-LSP binary v1.9.1 + +### Fixed + +- Fixed `@tr` syntax ([issue 65](https://github.com/kizeevov/slint-idea-plugin/issues/65)) +- Fixed `gradient-steps()` array syntax ([issue 65](https://github.com/kizeevov/slint-idea-plugin/issues/65)) + ## [1.3.0] - 2024-11-22 ### Features diff --git a/gradle.properties b/gradle.properties index e0c22f3..4f79211 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,4 +17,4 @@ pluginUntilBuild = platformPlugins = jvmVersion = 17 -slintLspVersion = 1.8.0 +slintLspVersion = 1.9.1 diff --git a/src/main/grammars/SlintParser.bnf b/src/main/grammars/SlintParser.bnf index 60ca1c8..fb6338f 100644 --- a/src/main/grammars/SlintParser.bnf +++ b/src/main/grammars/SlintParser.bnf @@ -389,6 +389,7 @@ Expression ::= | AnonymousStructExpression | ArrayAnonymousStructExpression | ArrayValExpression + | ArrayFunctionExpression MathematicalOperators ::= ADDITION @@ -436,6 +437,7 @@ ArrayExpression ::= PropertyExpression '[' Expression ']' ArrayAnonymousStructExpression ::= ArrayAnonymousStruct AnonymousStructExpression ::= AnonymousStructDeclaration ArrayValExpression ::= '[' Expression? (',' (Expression | &']'))* ']' +ArrayFunctionExpression ::= CallExpression '[' Expression ']' ParenthesizedExpression ::= '(' ParenthesizedExpressionEnd { pin=1 } private ParenthesizedExpressionEnd ::= Expression ')' @@ -471,9 +473,10 @@ BuiltinFunctions ::= private ImageUrlFunction ::= '@image-url' '(' StringLiteral ')' { pin=2 } -private TranslateFunction ::= '@tr' '(' StringLiteral ')' { +private TranslateFunction ::= '@tr' '(' TranslateArguments ')' { pin=2 } +private TranslateArguments ::= Expression? (',' (Expression | &']'))* {} private RadialGradientFunction ::= '@radial-gradient' '(' Expression ',' GradientColorPercentageArgumentList ')' { pin=2 }