-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: vb issues fix incorrect module block name in model manually add mscorlib for address vb build errors and bad semantic model * test: add and update tests * fix: argumentlist being treated as invocation expression * fix: handle property as type of invocation expression
- Loading branch information
Showing
7 changed files
with
144 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,57 @@ | ||
namespace Codelyzer.Analysis.Model | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Newtonsoft.Json; | ||
|
||
namespace Codelyzer.Analysis.Model | ||
{ | ||
public class ArgumentList : InvocationExpression | ||
public class ArgumentList : UstNode | ||
{ | ||
[Obsolete(Constants.ObsoleteParameterMessage, Constants.DoNotThrowErrorOnUse)] | ||
[JsonProperty("parameters", Order = 50)] | ||
public List<Parameter> Parameters { get; set; } | ||
|
||
[JsonProperty("arguments", Order = 51)] | ||
public List<Argument> Arguments { get; set; } | ||
|
||
[JsonProperty("semantic-properties", Order = 65)] | ||
public List<string> SemanticProperties { get; set; } | ||
public ArgumentList() | ||
: base(IdConstants.ArgumentListName) | ||
{ | ||
SemanticProperties = new List<string>(); | ||
#pragma warning disable CS0618 // Type or member is obsolete | ||
Parameters = new List<Parameter>(); | ||
#pragma warning restore CS0618 // Type or member is obsolete | ||
Arguments = new List<Argument>(); | ||
} | ||
public override bool Equals(object obj) | ||
{ | ||
if (obj is ArgumentList) | ||
{ | ||
return Equals(obj as ArgumentList); | ||
} | ||
return false; | ||
} | ||
|
||
public bool Equals(ArgumentList compareNode) | ||
{ | ||
return | ||
compareNode != null && | ||
#pragma warning disable CS0618 // Type or member is obsolete | ||
Parameters?.SequenceEqual(compareNode.Parameters) != false && | ||
#pragma warning restore CS0618 // Type or member is obsolete | ||
Arguments?.SequenceEqual(compareNode.Arguments) != false && | ||
base.Equals(compareNode); | ||
|
||
} | ||
public override int GetHashCode() | ||
{ | ||
return HashCode.Combine( | ||
#pragma warning disable CS0618 // Type or member is obsolete | ||
HashCode.Combine(Parameters, Arguments), | ||
#pragma warning restore CS0618 // Type or member is obsolete | ||
base.GetHashCode()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters