backport: 11.1.0
ci: 11.1.0 (cherry picked from commit 05826d40e5d98fee3c3cabc6c012ed58682521e8) chore: Simpler cross-release version tracking (cherry picked from commit4f612f33e7
) grammar: update to latest langref (cherry picked from commit7b867d4f0b
) chore: ignore signing script file (cherry picked from commita21dddba19
)
This commit is contained in:
parent
d9c3fa80aa
commit
3f2240b4a9
6 changed files with 40 additions and 17 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -146,3 +146,4 @@ gradle-app.setting
|
||||||
|
|
||||||
jbr
|
jbr
|
||||||
secrets
|
secrets
|
||||||
|
.idea/runConfigurations/Sign_Plugin.xml
|
|
@ -18,6 +18,13 @@ Changelog structure reference:
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [11.1.0]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Zig
|
||||||
|
- Updated to latest language grammar (destructuring syntax)
|
||||||
|
|
||||||
## [11.0.0]
|
## [11.0.0]
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -43,6 +43,10 @@ tasks {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getPluginVersionFull(): Provider<String> {
|
||||||
|
return properties("pluginVersion").map { it + "-" + properties("pluginSinceBuild").get() }
|
||||||
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
apply {
|
apply {
|
||||||
plugin("org.jetbrains.grammarkit")
|
plugin("org.jetbrains.grammarkit")
|
||||||
|
@ -84,7 +88,7 @@ allprojects {
|
||||||
}
|
}
|
||||||
|
|
||||||
group = properties("pluginGroup").get()
|
group = properties("pluginGroup").get()
|
||||||
version = properties("pluginVersion").get()
|
version = getPluginVersionFull().get()
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
runIde { enabled = false }
|
runIde { enabled = false }
|
||||||
|
@ -303,7 +307,7 @@ project(":plugin") {
|
||||||
}
|
}
|
||||||
|
|
||||||
patchPluginXml {
|
patchPluginXml {
|
||||||
version = properties("pluginVersion")
|
version = getPluginVersionFull()
|
||||||
|
|
||||||
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
|
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
|
||||||
pluginDescription = providers.fileContents(rootProject.layout.projectDirectory.file("README.md")).asText.map {
|
pluginDescription = providers.fileContents(rootProject.layout.projectDirectory.file("README.md")).asText.map {
|
||||||
|
|
|
@ -2,7 +2,7 @@ pluginGroup = com.falsepattern.zigbrains
|
||||||
pluginName = ZigBrains
|
pluginName = ZigBrains
|
||||||
pluginRepositoryUrl = https://github.com/FalsePattern/ZigBrains
|
pluginRepositoryUrl = https://github.com/FalsePattern/ZigBrains
|
||||||
# SemVer format -> https://semver.org
|
# SemVer format -> https://semver.org
|
||||||
pluginVersion = 11.0.0-233
|
pluginVersion = 11.1.0
|
||||||
|
|
||||||
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
|
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
|
||||||
pluginSinceBuild = 233
|
pluginSinceBuild = 233
|
||||||
|
|
|
@ -35,7 +35,7 @@ public abstract class ZigTopLevelDeclarationLineMarkerContributorBase extends Ru
|
||||||
|
|
||||||
int nestingLevel = 0;
|
int nestingLevel = 0;
|
||||||
while (parent != null && !(parent instanceof PsiFile)) {
|
while (parent != null && !(parent instanceof PsiFile)) {
|
||||||
if (PsiUtil.getElementType(parent) == ZigTypes.CONTAINER_DECLARATION) {
|
if (PsiUtil.getElementType(parent) == ZigTypes.CONTAINER_DECLARATIONS) {
|
||||||
nestingLevel++;
|
nestingLevel++;
|
||||||
}
|
}
|
||||||
parent = parent.getParent();
|
parent = parent.getParent();
|
||||||
|
|
|
@ -168,12 +168,9 @@
|
||||||
Root ::= CONTAINER_DOC_COMMENT? ContainerMembers?
|
Root ::= CONTAINER_DOC_COMMENT? ContainerMembers?
|
||||||
|
|
||||||
// *** Top level ***
|
// *** Top level ***
|
||||||
private ContainerMembers ::= ContainerDeclaration* (ContainerField COMMA)* (ContainerField | ContainerDeclaration*)?
|
private ContainerMembers ::= ContainerDeclarations (ContainerField COMMA)* (ContainerField | ContainerDeclarations)?
|
||||||
|
|
||||||
ContainerDeclaration
|
ContainerDeclarations ::= (TestDecl | ComptimeDecl | DOC_COMMENT? KEYWORD_PUB? Decl)*
|
||||||
::= TestDecl
|
|
||||||
| ComptimeDecl
|
|
||||||
| DOC_COMMENT? KEYWORD_PUB? Decl
|
|
||||||
|
|
||||||
|
|
||||||
TestDecl ::= DOC_COMMENT? KEYWORD_TEST (STRING_LITERAL_SINGLE | IDENTIFIER)? Block
|
TestDecl ::= DOC_COMMENT? KEYWORD_TEST (STRING_LITERAL_SINGLE | IDENTIFIER)? Block
|
||||||
|
@ -181,13 +178,15 @@ TestDecl ::= DOC_COMMENT? KEYWORD_TEST (STRING_LITERAL_SINGLE | IDENTIFIER)? Blo
|
||||||
ComptimeDecl ::= KEYWORD_COMPTIME Block
|
ComptimeDecl ::= KEYWORD_COMPTIME Block
|
||||||
|
|
||||||
Decl
|
Decl
|
||||||
::= (KEYWORD_EXPORT | KEYWORD_EXTERN STRING_LITERAL_SINGLE? | (KEYWORD_INLINE | KEYWORD_NOILINE))? FnProto (SEMICOLON | Block)
|
::= (KEYWORD_EXPORT | KEYWORD_EXTERN STRING_LITERAL_SINGLE? | KEYWORD_INLINE | KEYWORD_NOILINE)? FnProto (SEMICOLON | Block)
|
||||||
| (KEYWORD_EXPORT | KEYWORD_EXTERN STRING_LITERAL_SINGLE?)? KEYWORD_THREADLOCAL? VarDecl
|
| (KEYWORD_EXPORT | KEYWORD_EXTERN STRING_LITERAL_SINGLE?)? KEYWORD_THREADLOCAL? GlobalVarDecl
|
||||||
| KEYWORD_USINGNAMESPACE Expr SEMICOLON
|
| KEYWORD_USINGNAMESPACE Expr SEMICOLON
|
||||||
|
|
||||||
FnProto ::= KEYWORD_FN IDENTIFIER? LPAREN ParamDeclList RPAREN ByteAlign? AddrSpace? LinkSection? CallConv? EXCLAMATIONMARK? TypeExpr
|
FnProto ::= KEYWORD_FN IDENTIFIER? LPAREN ParamDeclList RPAREN ByteAlign? AddrSpace? LinkSection? CallConv? EXCLAMATIONMARK? TypeExpr
|
||||||
|
|
||||||
VarDecl ::= (KEYWORD_CONST | KEYWORD_VAR) IDENTIFIER (COLON TypeExpr)? ByteAlign? AddrSpace? LinkSection? (EQUAL Expr)? SEMICOLON
|
VarDeclProto ::= (KEYWORD_CONST | KEYWORD_VAR) IDENTIFIER (COLON TypeExpr)? ByteAlign? AddrSpace? LinkSection?
|
||||||
|
|
||||||
|
GlobalVarDecl ::= VarDeclProto (EQUAL Expr)? SEMICOLON
|
||||||
|
|
||||||
ContainerField
|
ContainerField
|
||||||
::= DOC_COMMENT? KEYWORD_COMPTIME? IDENTIFIER (COLON (KEYWORD_ANYTYPE | TypeExpr) ByteAlign?)? (EQUAL Expr)?
|
::= DOC_COMMENT? KEYWORD_COMPTIME? IDENTIFIER (COLON (KEYWORD_ANYTYPE | TypeExpr) ByteAlign?)? (EQUAL Expr)?
|
||||||
|
@ -195,15 +194,18 @@ ContainerField
|
||||||
|
|
||||||
// *** Block Level ***
|
// *** Block Level ***
|
||||||
Statement
|
Statement
|
||||||
::= KEYWORD_COMPTIME? VarDecl
|
::= KEYWORD_COMPTIME? ComptimeStatement
|
||||||
| KEYWORD_COMPTIME BlockExprStatement
|
|
||||||
| KEYWORD_NOSUSPEND BlockExprStatement
|
| KEYWORD_NOSUSPEND BlockExprStatement
|
||||||
| KEYWORD_DEFER BlockExprStatement
|
| KEYWORD_DEFER BlockExprStatement
|
||||||
| KEYWORD_ERRDEFER Payload? BlockExprStatement
|
| KEYWORD_ERRDEFER Payload? BlockExprStatement
|
||||||
| IfStatement
|
| IfStatement
|
||||||
| LabeledStatement
|
| LabeledStatement
|
||||||
| SwitchExpr
|
| SwitchExpr
|
||||||
| AssignExpr SEMICOLON
|
| VarDeclExprStatement
|
||||||
|
|
||||||
|
ComptimeStatement
|
||||||
|
::= BlockExpr
|
||||||
|
| VarDeclExprStatement
|
||||||
|
|
||||||
IfStatement
|
IfStatement
|
||||||
::= IfPrefix BlockExpr ( KEYWORD_ELSE Payload? Statement )?
|
::= IfPrefix BlockExpr ( KEYWORD_ELSE Payload? Statement )?
|
||||||
|
@ -227,8 +229,17 @@ BlockExprStatement
|
||||||
|
|
||||||
BlockExpr ::= BlockLabel? Block
|
BlockExpr ::= BlockLabel? Block
|
||||||
|
|
||||||
|
//An expression, assignment, or any destructure, as a statement.
|
||||||
|
VarDeclExprStatement
|
||||||
|
::= VarDeclProto (COMMA (VarDeclProto | Expr))* EQUAL Expr SEMICOLON
|
||||||
|
| Expr (AssignOp Expr | (COMMA (VarDeclProto | Expr))+ EQUAL Expr)? SEMICOLON
|
||||||
|
|
||||||
// *** Expression Level ***
|
// *** Expression Level ***
|
||||||
AssignExpr ::= Expr (AssignOp Expr)?
|
|
||||||
|
// An assignment or a destructure whose LHS are all lvalue expressions.
|
||||||
|
AssignExpr ::= Expr (AssignOp Expr | (COMMA Expr)+ EQUAL Expr)?
|
||||||
|
|
||||||
|
SingleAssignExpr ::= Expr (AssignOp Expr)?
|
||||||
|
|
||||||
Expr ::= BoolOrExpr
|
Expr ::= BoolOrExpr
|
||||||
|
|
||||||
|
@ -382,7 +393,7 @@ PtrPayload ::= PIPE ASTERISK? IDENTIFIER PIPE
|
||||||
PtrIndexPayload ::= PIPE (ASTERISK? IDENTIFIER COMMA)* (ASTERISK? IDENTIFIER) PIPE
|
PtrIndexPayload ::= PIPE (ASTERISK? IDENTIFIER COMMA)* (ASTERISK? IDENTIFIER) PIPE
|
||||||
|
|
||||||
// Switch specific
|
// Switch specific
|
||||||
SwitchProng ::= KEYWORD_INLINE? SwitchCase EQUALRARROW PtrIndexPayload? AssignExpr
|
SwitchProng ::= KEYWORD_INLINE? SwitchCase EQUALRARROW PtrIndexPayload? SingleAssignExpr
|
||||||
|
|
||||||
SwitchCase
|
SwitchCase
|
||||||
::= SwitchItem (COMMA SwitchItem)* COMMA?
|
::= SwitchItem (COMMA SwitchItem)* COMMA?
|
||||||
|
|
Loading…
Add table
Reference in a new issue