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

Commit 348b519

Browse files
authored
Merge pull request #42 from MarioAriasC/0.3.0
0.3.0
2 parents 33ef230 + ae92b3a commit 348b519

File tree

5 files changed

+39
-17
lines changed

5 files changed

+39
-17
lines changed

.run/Run Plugin.run.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
<option value="runIde" />
1515
</list>
1616
</option>
17-
<option name="vmOptions" value="" />
17+
<option name="vmOptions" value="-Didea.is.internal=true" />
1818
</ExternalSystemSettings>
1919
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
2020
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
2121
<DebugAllEnabled>false</DebugAllEnabled>
22+
<RunAsTest>false</RunAsTest>
2223
<method v="2" />
2324
</configuration>
2425
</component>

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
## [Unreleased]
66

7+
### Added
8+
- Initial support for 0.11.0 release:
9+
- Multi-object For Loops
10+
- New builtins
11+
- Rename Casting Builtins
712
## [0.2.5] - 2023-07-30
813

914
### Added

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
pluginGroup = com.github.marioariasc.zigsupport
55
pluginName = zig-support
66
pluginRepositoryUrl = https://github.com/MarioAriasC/zig-support
7-
pluginVersion = 0.2.5
7+
pluginVersion = 0.3.0
88

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

src/main/kotlin/org/ziglang/jb/ZigLang.kt

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,11 @@ object ZigLang : Language("Zig") {
5656
"alignCast",
5757
"alignOf",
5858
"as",
59-
"asyncCall",
6059
"atomicLoad",
6160
"atomicRmw",
6261
"atomicStore",
6362
"bitCast",
6463
"bitOffsetOf",
65-
"boolToInt",
6664
"bitSizeOf",
6765
"breakpoint",
6866
"mulAdd",
@@ -78,36 +76,40 @@ object ZigLang : Language("Zig") {
7876
"cmpxchgWeak",
7977
"compileError",
8078
"compileLog",
79+
"constCast",
8180
"ctz",
8281
"cUndef",
82+
"cVaArg",
83+
"cVaCopy",
84+
"cVaEnd",
85+
"cVaStart",
8386
"divExact",
8487
"divFloor",
8588
"divTrunc",
8689
"embedFile",
87-
"enumToInt",
90+
"enumFromInt",
91+
"errorFromInt",
8892
"errorName",
8993
"errorReturnTrace",
90-
"errorToInt",
9194
"errSetCast",
9295
"export",
9396
"extern",
9497
"fence",
9598
"field",
9699
"fieldParentPtr",
97100
"floatCast",
98-
"floatToInt",
99-
"frame",
100-
"Frame",
101+
"floatFromInt",
101102
"frameAddress",
102-
"frameSize",
103103
"hasDecl",
104104
"hasField",
105105
"import",
106+
"inComptime",
106107
"intCast",
107-
"intToEnum",
108-
"intToError",
109-
"intToFloat",
110-
"intToPtr",
108+
"intFromBool",
109+
"intFromEnum",
110+
"intFromError",
111+
"intFromFloat",
112+
"intFromPtr",
111113
"max",
112114
"memcpy",
113115
"memset",
@@ -120,7 +122,7 @@ object ZigLang : Language("Zig") {
120122
"popCount",
121123
"prefetch",
122124
"ptrCast",
123-
"ptrToInt",
125+
"ptrFromInt",
124126
"rem",
125127
"returnAddress",
126128
"select",
@@ -154,12 +156,17 @@ object ZigLang : Language("Zig") {
154156
"subWithOverflow",
155157
"tagName",
156158
"This",
159+
"trap",
157160
"truncate",
158161
"Type",
159162
"typeInfo",
160163
"typeName",
161164
"TypeOf",
162165
"unionInit",
163166
"Vector",
167+
"volatileCast",
168+
"workGroupId",
169+
"workGroupSize",
170+
"workItemId",
164171
)
165172
}

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,12 @@ private ContainerDeclAuto ::= ContainerDeclType LBRACE ContainerDocComment? Cont
206206

207207
ContainerDeclType ::= STRUCT | OPAQUE | ENUM (LPAREN Expr RPAREN)? | UNION (LPAREN (ENUM (LPAREN Expr RPAREN)? | Expr) RPAREN)?
208208

209+
/*
210+
TypedTupleDecl ::= STRUCT LBRACE (TypeExpr COMMA)* TypeExpr RBRACE {
211+
pin = 1
212+
}
213+
*/
214+
209215
ErrorSetDecl ::= ERROR LBRACE IdentifierList RBRACE
210216

211217
GroupedExpr ::= LPAREN Expr RPAREN
@@ -342,11 +348,14 @@ SwitchProng ::= INLINE? SwitchCase EQUALRARROW PtrPayload? AssignExpr
342348
SwitchCase ::= SwitchItem (COMMA SwitchItem)* COMMA? | ELSE
343349
SwitchItem ::= Expr (DOT3 Expr)?
344350

345-
ForPrefix ::= FOR LPAREN Expr RPAREN PtrIndexPayload
351+
ForRange ::= Expr DOT2 Expr?
352+
ForOperand ::= ForRange | Expr
353+
354+
ForPrefix ::= FOR LPAREN (ForOperand COMMA)* ForOperand RPAREN PtrIndexPayload
346355
WhilePrefix ::= WHILE LPAREN Expr RPAREN PtrPayload? WhileContinueExpr?
347356

348357
WhileContinueExpr ::= COLON LPAREN AssignExpr RPAREN
349-
PtrIndexPayload ::= PIPE ASTERISK? ID (COMMA ID)? PIPE
358+
PtrIndexPayload ::= PIPE (ASTERISK? ID COMMA)* (ASTERISK? ID) PIPE
350359

351360
BlockExprStatement ::= BlockExpr | AssignExpr SEMICOLON
352361
AssignExpr ::= Expr (AssignOp Expr)?

0 commit comments

Comments
 (0)