Skip to content

Commit 207c403

Browse files
authored
fix: group properties were not being resolved as members (#22)
1 parent 17667b3 commit 207c403

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/DarkId.Papyrus.LanguageService/Program/SemanticExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public static IEnumerable<PapyrusSymbol> GetScriptMemberSymbols(this ScriptSymbo
7373

7474
if (!globalOnly)
7575
{
76-
var kindFilter = SymbolKinds.Property | SymbolKinds.Function | SymbolKinds.Struct;
76+
var kindFilter = SymbolKinds.Property | SymbolKinds.Function | SymbolKinds.Struct | SymbolKinds.Group;
7777
if (includeDeclaredPrivates)
7878
{
7979
kindFilter |= SymbolKinds.Variable | SymbolKinds.Event;

src/DarkId.Papyrus.Test/LanguageService/Program/SemanticExtensionsTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ public void GetReferencableSymbols_FunctionBody()
6565
{
6666
var symbols = GetReferencableSymbolsAtMarker("function-body");
6767
symbols.AssertAreOfKinds(SymbolKinds.Script | SymbolKinds.Struct | SymbolKinds.Function | SymbolKinds.Variable | SymbolKinds.Property);
68+
69+
#if FALLOUT4
70+
Assert.IsNotNull(symbols.SingleOrDefault(s => s.Name == "GroupProperty"));
71+
#endif
6872
}
6973

7074
[TestMethod]

src/DarkId.Papyrus.Test/scripts/Fallout 4/BaseScript.psc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ Scriptname BaseScript extends ScriptObject
33
int scriptObjectIntVariable
44
int Property ScriptObjectIntProperty Auto
55

6+
Group PropertyGroup
7+
int Property GroupProperty Auto
8+
EndGroup
9+
610
Struct StructA
711
int structIntVariable
812
string structStringVariable

0 commit comments

Comments
 (0)