Skip to content

Commit 749ed52

Browse files
committed
Update alias and type handling.
1 parent 1858928 commit 749ed52

File tree

10 files changed

+99
-43
lines changed

10 files changed

+99
-43
lines changed

CHANGELOG.md

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

55
## [Unreleased]
66

7+
## [0.1.7] - 2025-08-05
8+
9+
- Fixes to `$Type = <expr>` and `alias module`
10+
711
## [0.1.6] - 2025-08-01
812

913
- Support 1LL. Remove support for 1u64.

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ pluginGroup = com.github.c3lang.c3intellij
44
pluginName = c3intellij
55
pluginRepositoryUrl = https://github.com/c3lang/c3intellij
66
# SemVer format -> https://semver.org
7-
pluginVersion = 0.1.6
7+
pluginVersion = 0.1.7
88

99
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
1010
pluginSinceBuild = 243
11-
pluginUntilBuild = 251.*
11+
pluginUntilBuild = 252.*
1212

1313
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
1414
platformType = IU

src/main/gen/org/c3lang/intellij/parser/C3Parser.java

Lines changed: 72 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/gen/org/c3lang/intellij/psi/C3AliasDecl.java

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/gen/org/c3lang/intellij/psi/C3AliasDeclarationSource.java

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/gen/org/c3lang/intellij/psi/C3VarDecl.java

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/gen/org/c3lang/intellij/psi/impl/C3AliasDeclImpl.java

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/gen/org/c3lang/intellij/psi/impl/C3AliasDeclarationSourceImpl.java

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/gen/org/c3lang/intellij/psi/impl/C3VarDeclImpl.java

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/org/c3lang/intellij/C3.bnf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,13 @@ generic_parameter ::= expr | type
184184
generic_parameters ::= LB generic_parameter (COMMA generic_parameter)* RB
185185

186186
def_attr_values ::= attribute (COMMA attribute)* COMMA?
187-
alias_declaration_source ::= (KW_MODULE path) | ((path_const | path_ident | path_at_ident) generic_parameters?)
187+
alias_declaration_source ::= (path_const | path_ident | path_at_ident) generic_parameters?
188188
attrdef_decl ::= KW_ATTRDEF attribute_user_name (LP parameter_list RP)? attributes? (EQ def_attr_values)? EOS
189189
typedef_decl ::= KW_TYPEDEF type_name interface_impl? attributes? EQ KW_INLINE? typedef_type EOS
190190
alias_type_decl ::= KW_ALIAS type_name attributes? EQ typedef_type EOS
191191
faultdef_decl ::= KW_FAULTDEF fault_definition (COMMA fault_definition)* COMMA? EOS
192192
alias_name ::= CONST_IDENT | AT_IDENT | IDENT
193-
alias_decl ::= KW_ALIAS alias_name attributes? EQ alias_declaration_source EOS
193+
alias_decl ::= KW_ALIAS alias_name attributes? EQ ((KW_MODULE module_path) | alias_declaration_source) EOS
194194
fault_definition ::= CONST_IDENT attributes?
195195

196196
struct_body ::= LB struct_member_declaration* RB { pin(".*")=2 }
@@ -307,7 +307,7 @@ ct_foreach_stmt ::= KW_CT_FOREACH CT_IDENT (COMMA CT_IDENT)? COLON expr COLON st
307307
ct_for_stmt ::= KW_CT_FOR for_cond COLON statement_list? KW_CT_ENDFOR
308308

309309
private eq_expr_pin ::= EQ expr { pin=1 }
310-
var_decl ::= KW_VAR (IDENT eq_expr_pin | CT_TYPE_IDENT eq_expr_pin? | CT_IDENT eq_expr_pin?)
310+
var_decl ::= KW_VAR (IDENT eq_expr_pin | CT_TYPE_IDENT (EQ (type !DOT | expr ))? | CT_IDENT eq_expr_pin?)
311311
var_stmt ::= var_decl EOS
312312
expr_stmt ::= expr EOS {pin=1}
313313

0 commit comments

Comments
 (0)