Skip to content

Commit 42f5902

Browse files
committed
Finish pre-release-0.6.2
2 parents 525e14e + f6e5f29 commit 42f5902

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2294
-1284
lines changed

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"eliotvu.uc",
66
"pedro-w.tmlanguage",
77
"amodio.tsl-problem-matcher",
8-
"rbbit.typescript-hero"
8+
"rbbit.typescript-hero",
9+
"nicoespeon.abracadabra"
910
]
1011
}

.vscode/settings.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
11
{
22
"typescript.preferences.quoteStyle": "single",
3+
"typescriptHero.imports.organizeOnSave": true,
34
"antlr4.generation": {
45
"language": "TypeScript",
56
"outputDir": "grammars"
67
},
78
"mochaExplorer.nodePath": null,
89
"mochaExplorer.cwd": "server",
910
"mochaExplorer.mochaPath": "server/node_modules/mocha",
10-
"mochaExplorer.require": "ts-node/register",
11-
"mochaExplorer.files": "**/*.test.ts",
11+
"mochaExplorer.require": "node_modules/ts-node/register",
12+
"mochaExplorer.files": "server/**/*.test.ts",
13+
"mochaExplorer.ignore": "server/node_modules/**/*.test.ts",
14+
// "mochaExplorer.launcherScript": "node_modules/mocha-explorer-launcher-scripts/vscode-test",
15+
"mochaExplorer.autoload": false,
16+
"mochaExplorer.esmLoader": false,
17+
// "mochaExplorer.ipcRole": "server",
1218
"mochaExplorer.env": {
1319
"TS_NODE_COMPILER_OPTIONS": "{\"module\":\"commonjs\",\"strict\":false}",
20+
// "VSCODE_VERSION": "insiders",
21+
"ELECTRON_RUN_AS_NODE": null
1422
},
23+
"mochaExplorer.globImplementation": "vscode",
24+
// "mochaExplorer.logpanel": true,
1525
"cSpell.words": [
1626
"antlr",
1727
"diagnoser",
1828
"Intrinsics",
1929
"Vect"
2030
],
21-
"typescriptHero.imports.organizeOnSave": true,
2231
}

CHANGELOG.md

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# UnrealScript Language Service
22

3+
## 0.6.2 (Feb 9, 2023)
4+
5+
- Implemented an option to enable auto-detection of the UnrealScript language generation that's being used by the workspace.
6+
- Implemented a new code-action to inline a constant's evaluated value.
7+
8+
- Quality of Life
9+
- General improvements to how indexing of documents is handled.
10+
- Fixed parser support for string types that have a fixed size e.g. ```String[255]``` (UE1).
11+
- Fixed type ```Pointer``` will be no longer recognized if the language is set to generation 3 (this has been displaced by the Core.Object.Pointer struct).
12+
- Fixed [No symbols found](https://github.com/EliotVU/UnrealScript-Language-Service/issues/157)
13+
14+
- Known Issues:
15+
-
16+
17+
## 0.6.1 (Jan 29, 2023)
18+
19+
- The service will now register .u/.upk (the extensions are configurable) files as known package symbols, this means such packages will be included in the auto-completion and indexing of references.
20+
- Note: The contents of the packages are not yet indexed.
21+
22+
- Implemented [Auto-insert when overriding a function](https://github.com/EliotVU/UnrealScript-Language-Service/issues/153).
23+
- Further improvements have been made to the auto-completion suggestions.
24+
325
## 0.6.0 (Jan 26, 2023)
426

527
- Implemented [LSP Semantic-Tokens #137](https://github.com/EliotVU/UnrealScript-Language-Service/issues/137) (References to a class will now be highlighted as such even where the tmLanguage cannot determine the identifier's type)
@@ -8,26 +30,26 @@
830
- Implemented [LSP Workspace Symbols #148](https://github.com/EliotVU/UnrealScript-Language-Service/issues/148)
931
- ![image](./docs/media/workspaceSymbols.png)
1032

11-
- Added [UnrealScript snippets #149](https://github.com/EliotVU/UnrealScript-Language-Service/issues/149)
33+
- Added [UnrealScript snippets #149](https://github.com/EliotVU/UnrealScript-Language-Service/issues/149).
1234

1335
- Typing, major improvements have been made to the type-checking system, there are almost no false-positive errors anymore!
14-
- Archetypes, overall better support for "begin object" constructions
15-
- Better and more responsive auto-completion suggestions
36+
- Archetypes, overall better support for "begin object" constructions.
37+
- Better and more responsive auto-completion suggestions.
1638

1739
- Quality of Life
18-
- Overall improvements have been made to UnrealScript parsing
19-
- Overall improvements to UnrealScript syntax highlighting
20-
- Fixed [(DefaultProperties) Issue with structs written on multiple lines](https://github.com/EliotVU/UnrealScript-Language-Service/issues/138)
21-
- Fixed an issue where a Function call in a member context ```Outer.SomeIdentifier(...)``` could mismatch a Class's name
22-
- Partially fixed an issue (in some cases) where a Function/Class invocation could be mistaken for one another
23-
- Fixed LSP/documentSymbol [VSCode's Sticky scroll feature](https://github.com/EliotVU/UnrealScript-Language-Service/issues/148)
40+
- Overall improvements have been made to UnrealScript parsing.
41+
- Overall improvements to UnrealScript syntax highlighting.
42+
- Fixed [(DefaultProperties) Issue with structs written on multiple lines](https://github.com/EliotVU/UnrealScript-Language-Service/issues/138).
43+
- Fixed an issue where a Function call in a member context ```Outer.SomeIdentifier(...)``` could mismatch a Class's name.
44+
- Partially fixed an issue (in some cases) where a Function/Class invocation could be mistaken for one another.
45+
- Fixed LSP/documentSymbol [VSCode's Sticky scroll feature](https://github.com/EliotVU/UnrealScript-Language-Service/issues/148).
2446
- Fixed an issue that caused the document transformer to abort when trying to build a property with bad type-grammar (actually usually triggered by use of macros).
2547

2648
## 0.5.0 (Nov 8, 2021)
2749

2850
- Autocomplete and IntelliSense
29-
- Has been displaced with the help of a third-party library [c3](https://github.com/mike-lischke/antlr4-c3)
30-
- This switch has made it much easier to implement context-aware autocompletes, but more work will be needed to bring it the quality that we all take for granted in popular languages :)
51+
- Has been displaced with the help of a third-party library [c3](https://github.com/mike-lischke/antlr4-c3).
52+
- This switch has made it much easier to implement context-aware autocompletes, but more work will be needed to bring it the quality that we all take for granted in popular languages.
3153

3254
- Added the first CodeAction
3355
- If a type is missing where a class type is expected, the service will now suggest to generate the class for you.
@@ -63,10 +85,10 @@
6385
This option tells the service which UnrealScript edition it should optimize for.
6486

6587
- Quality of Life
66-
- Fixed [Closing unopened comment](https://github.com/EliotVU/UnrealScript-Language-Service/issues/28)
67-
- Fixed ["default:" is not highlighted](https://github.com/EliotVU/UnrealScript-Language-Service/issues/22)
68-
- Fixed ["Spawn" return type is not coerced to its first parameter's type. #21](https://github.com/EliotVU/UnrealScript-Language-Service/issues/21)
69-
- Fixed ["no viable alternative at input 'return A -='"](https://github.com/EliotVU/UnrealScript-Language-Service/issues/20)
70-
- Fixed [Highlighting issue regarding a comment if on the same line as a struct declaration #19](https://github.com/EliotVU/UnrealScript-Language-Service/issues/19)
71-
- Fixed [Class and package name confusion](https://github.com/EliotVU/UnrealScript-Language-Service/issues/15)
72-
- Fixed ["const ref" argument confusing the parser](https://github.com/EliotVU/UnrealScript-Language-Service/issues/14)
88+
- Fixed [Closing unopened comment](https://github.com/EliotVU/UnrealScript-Language-Service/issues/28).
89+
- Fixed ["default:" is not highlighted](https://github.com/EliotVU/UnrealScript-Language-Service/issues/22).
90+
- Fixed ["Spawn" return type is not coerced to its first parameter's type. #21](https://github.com/EliotVU/UnrealScript-Language-Service/issues/21).
91+
- Fixed ["no viable alternative at input 'return A -='"](https://github.com/EliotVU/UnrealScript-Language-Service/issues/20).
92+
- Fixed [Highlighting issue regarding a comment if on the same line as a struct declaration #19](https://github.com/EliotVU/UnrealScript-Language-Service/issues/19).
93+
- Fixed [Class and package name confusion](https://github.com/EliotVU/UnrealScript-Language-Service/issues/15).
94+
- Fixed ["const ref" argument confusing the parser](https://github.com/EliotVU/UnrealScript-Language-Service/issues/14).

grammars/UCParser.g4

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -542,19 +542,13 @@ variableModifier
542542
| ('privatewrite' exportBlockText?)
543543
;
544544

545-
primitiveType
546-
: 'byte'
547-
| 'int'
548-
| 'float'
549-
| 'bool'
550-
| 'string'
551-
| 'name'
552-
| 'pointer'
553-
| 'button' // alias for a string with an input modifier
545+
varType
546+
: variableModifier* typeDecl
554547
;
555548

556549
typeDecl
557550
: primitiveType
551+
| stringType
558552
| classType
559553
| arrayType
560554
| delegateType
@@ -564,10 +558,20 @@ typeDecl
564558
| qualifiedIdentifier
565559
;
566560

567-
varType
568-
: variableModifier* typeDecl
561+
primitiveType
562+
: 'byte'
563+
| 'int'
564+
| 'float'
565+
| 'bool'
566+
| 'name'
567+
| 'pointer'
568+
| 'button' // alias for a string with an input modifier
569569
;
570570

571+
stringType
572+
: 'string' (OPEN_BRACKET INTEGER_LITERAL CLOSE_BRACKET)?
573+
;
574+
571575
// Note: inlinedDeclTypes includes another arrayGeneric!
572576
arrayType
573577
: 'array' (LT varType GT)
@@ -738,7 +742,7 @@ codeBlockOptional
738742
;
739743

740744
statement
741-
: SEMICOLON
745+
: emptyStatement
742746
| ifStatement
743747
| forStatement
744748
| foreachStatement
@@ -762,6 +766,8 @@ statement
762766
| directive
763767
;
764768

769+
emptyStatement: SEMICOLON;
770+
765771
assignmentStatement: expr=assignmentExpression SEMICOLON;
766772
expressionStatement: expr=primaryExpression SEMICOLON;
767773

grammars/test/Grammar.uc

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
class Grammar;
2+
3+
const C1 = 0;
4+
5+
enum E1 {
6+
E1_1,
7+
E1_2,
8+
};
9+
10+
struct S1 {
11+
struct S2 {
12+
var int V1;
13+
};
14+
15+
var enum E2 {
16+
E2_1
17+
} V2;
18+
19+
var int V3;
20+
};
21+
22+
var int V4;
23+
24+
delegate D1();
25+
26+
function F1();
27+
28+
state ST1
29+
{
30+
ignores F1;
31+
32+
function F2();
33+
34+
begin:
35+
F2();
36+
}
37+
38+
defaultproperties
39+
{
40+
V4=1
41+
}
File renamed without changes.

0 commit comments

Comments
 (0)