Skip to content

Commit ea0c55c

Browse files
authored
Merge pull request #60 from Tbusk/patch/delegate
change: update parser to permit delegate declaration in namespace area
2 parents ac81fc5 + 96e38da commit ea0c55c

File tree

13 files changed

+836
-718
lines changed

13 files changed

+836
-718
lines changed

CHANGELOG.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,10 @@
33
# vala-jetbrains-plugin Changelog
44
## [Unreleased]
55
### What's Changed
6-
- Adding semantic token colorization support from the language server.
7-
- Adding LSP4IJ configuration for code insight, spell checker, folding builder, psi structure viewer, and parameter
8-
info.
9-
- Adding syntax highlighting for .in files.
10-
- Adding comment out and uncomment functionality.
11-
- Adding single, double quotation, and backtick escape functionality.
12-
- Updated plugin logo and added a different dark mode icon.
13-
- Updated source file icon to be more consistent with the JetBrains theme.
14-
- Implemented robust parser that can handle majority of Vala syntax.
6+
7+
- Update parser to permit constants being declared in statements.
8+
- Update parser to no longer permit non-constant variables being declared in the namespace.
9+
- Update parser to allow delegate declaration in the namespace.
1510

1611
## [1.1.1-ALPHA]
1712
### What's Changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pluginGroup = com.tbusk.vala_plugin
44
pluginName = Vala Language
55
pluginRepositoryUrl = https://github.com/Tbusk/vala-jetbrains-plugin
66
# SemVer format -> https://semver.org
7-
pluginVersion = 1.1.2-ALPHA
7+
pluginVersion=1.1.3-ALPHA
88

99
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
1010
pluginSinceBuild = 251

src/main/gen/com/tbusk/vala_plugin/ValaLexer.java

Lines changed: 717 additions & 707 deletions
Large diffs are not rendered by default.

src/main/gen/com/tbusk/vala_plugin/ValaParser.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/com/tbusk/vala_plugin/psi/ValaNamespaceMember.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/com/tbusk/vala_plugin/psi/impl/ValaNamespaceMemberImpl.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/com/tbusk/vala_plugin/ValaTokenSets.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ public interface ValaTokenSets {
129129
ValaTypes.PREPROCESSOR_IF,
130130
ValaTypes.PREPROCESSOR_ELIF,
131131
ValaTypes.PREPROCESSOR_ELSE,
132-
ValaTypes.PREPROCESSOR_ENDIF
132+
ValaTypes.PREPROCESSOR_ENDIF,
133+
ValaTypes.INLINE
133134
);
134135

135136
Set<String> KEYWORDS_STRINGS = new HashSet<>(

src/main/java/com/tbusk/vala_plugin/syntax/Vala.bnf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ namespace_member ::= [ attributes ]
109109
enum_declaration |
110110
errordomain_declaration |
111111
method_declaration |
112+
delegate_declaration |
112113
constant_declaration)
113114

114115
attributes ::= attribute*

src/main/java/com/tbusk/vala_plugin/syntax/Vala.flex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ PREPROCESSOR_DIRECTIVE=("#if" | "#endif" | "#elif" | "#else") .* ("\r"|"\n"|"\r\
112112
"weak" {return ValaTypes.WEAK; }
113113
"extern" {return ValaTypes.EXTERN; }
114114
"delegate" {return ValaTypes.DELEGATE; }
115+
"inline" {return ValaTypes.INLINE; }
115116

116117
// Comments
117118
{DOC_COMMENT} { return ValaTypes.DOC_COMMENT; }
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
class DelegateClass {
2+
delegate int Compare (string a, string b);
3+
4+
public delegate uint CompareOne (string a, string b);
5+
6+
private delegate string CompareTwo (string a, string b);
7+
8+
protected delegate char CompareThree (string a, string b);
9+
10+
async delegate uchar CompareFour (string a, string b);
11+
12+
class delegate uchar CompareFive (string a, string b);
13+
14+
extern delegate uchar CompareSix (string a, string b);
15+
16+
inline delegate uchar CompareSeven (string a, string b);
17+
18+
abstract delegate uchar CompareEight (string a, string b);
19+
20+
virtual delegate uchar CompareNine (string a, string b);
21+
22+
override delegate uchar CompareTen (string a, string b);
23+
24+
public async delegate uchar CompareEleven (string a, string b);
25+
}

0 commit comments

Comments
 (0)