Skip to content
This repository was archived by the owner on Dec 8, 2023. It is now read-only.

Commit 14b7cfa

Browse files
authored
Merge pull request #28 from MarioAriasC/0.2.0
0.2.0
2 parents 327ca59 + 44ada26 commit 14b7cfa

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

CHANGELOG.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
# zig-support Changelog
44

55
## [Unreleased]
6-
6+
### Added
7+
- Support for Zig 0.10.0
8+
- `packed` structs with backing field, e.g.: `packed struct(i32)`
9+
- `inline` switch cases
10+
- Remove `anytype` fields
711
## [0.1.0]
8-
### Added
9-
- [#24](https://github.com/MarioAriasC/zig-support/issues/24) Use `zig fmt` to format `*.zig` files. You can use
10-
the `Reformat code` action (By default `Cmd/Ctrl + Alt + L`)
12+
### Added
13+
- [#24](https://github.com/MarioAriasC/zig-support/issues/24) Use `zig fmt` to format `*.zig` files. You can use
14+
the `Reformat code` action (By default `Cmd/Ctrl + Alt + L`)
1115
- Updated to the latest JetBrain's IntelliJ platform plugin version.
1216

1317
## [0.0.7]

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
pluginGroup = com.github.marioariasc.zigsupport
55
pluginName = zig-support
6-
pluginVersion = 0.1.0
6+
pluginVersion = 0.2.0
77

88
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
99
# for insight into build numbers and IntelliJ Platform versions.

src/main/kotlin/org/ziglang/jb/grammar/zig.bnf

+3-3
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ Symbol ::= ID {
192192

193193
ContainerDecl ::= ContainerDeclAuto | PackedContainerDecl | ExternContainerDecl
194194

195-
private PackedContainerDecl ::= PACKED ContainerDeclType LBRACE ContainerDocComment? ContainerMembers RBRACE {
195+
private PackedContainerDecl ::= PACKED (STRUCT (LPAREN Expr RPAREN) | ContainerDeclType) LBRACE ContainerDocComment? ContainerMembers RBRACE {
196196
pin = 1
197197
}
198198

@@ -233,7 +233,7 @@ EqualExpr ::= EQUAL Expr {
233233
pin = 1
234234
}
235235

236-
ContainerField ::= DocComment? COMPTIME? ID (COLON (ANY_TYPE|TypeExpr) ByteAlign?)? (EQUAL Expr)? {
236+
ContainerField ::= DocComment? COMPTIME? ID (COLON TypeExpr ByteAlign?)? (EQUAL Expr)? {
237237
implements=['com.intellij.psi.PsiNameIdentifierOwner']
238238
mixin='org.ziglang.jb.reference.ContainerFieldMixin'
239239
}
@@ -338,7 +338,7 @@ WhileStatement ::= WhilePrefix BlockExpr (ELSE Payload? Statement)? | WhilePrefi
338338

339339
SwitchExpr ::= SWITCH LPAREN Expr RPAREN LBRACE SwitchProngList RBRACE
340340
SwitchProngList ::= (SwitchProng COMMA)* SwitchProng?
341-
SwitchProng ::= SwitchCase EQUALRARROW PtrPayload? AssignExpr
341+
SwitchProng ::= INLINE? SwitchCase EQUALRARROW PtrPayload? AssignExpr
342342
SwitchCase ::= SwitchItem (COMMA SwitchItem)* COMMA? | ELSE
343343
SwitchItem ::= Expr (DOT3 Expr)?
344344

0 commit comments

Comments
 (0)