Skip to content

Conversation

@psxvoid
Copy link
Owner

@psxvoid psxvoid commented Dec 2, 2020

No description provided.

Additional notes:
- to prevent msbuild warnings install packages:
  System.CodeDome
  Microsoft.Win32.Registry
Additional notes:
- MethodBodyVirtualQuery now matches only
  actual SyntaxNodes that represent a method
  body instead of matching a parent, containing
  the body (like MethodDeclarationSyntax)
- MethodBodyVirtualQuery now performs multiple
  checks to ensure that the matched type is an
  actual method body variant
- MethodBodyVirtualQuery now replaces the
  matching nodes in the query walker
- MethodBodyDeclarationSyntax now supports
  ArrowExpressionClauseSyntax body type
- CombinedSyntaxNode now also has
  MixedNode property that can return
  VirtualNode or SyntaxNode
- add GetBody and TryGetBody methods
  (moved from RJ)
- GetBody and TryGetBody are more
  consistent with their purpose
Additional changes:
- fix combined query walker incorrect
  order of virtual query and sub-query
- add IsContainer and  GetFirstChildOfType
  SyntaxNode extensions
- move method-body-member, method
  member and method-body syntax node
  matchers from RJ
- add nested-block and nested-block-parent
  syntax node matchers
Additional notes:
- GetBody now works with local funcs
- treat LocalFunc as method body member
- treat LocalFunc as method body parent
- fix nested block parent matcher matches
  a method body (it shouldn't)
- fix nested block matcher matches
  a method body (it shouldn't)
Additional notes:
- fix incorrect equal behavior for combined nodes
  with the same base node but different virtual
  nodes
- treat try, finally, catch and else clauses as a nested block
  parents
- extract AssertMatch to SyntaxNodeMatcherTestBase
- add unit tests for MethodBodyMemberSyntaxNodeMatcher
- treat TryStatement as method body member
- do not treat several body member child statements
  as body members
- try-body virtual query now can also override
  the nested-body query
Previously mixed nodes were compared using
the equality operator. It means that two
virtual nodes of the same won't be equal
until operator == is overloaded. In contrast
by comparing mixed node types we don't
have to overload the == operator for the most
cases.
Additional notes:
- do not treat LocalFunctionStatement as nested block
  parent because it should match MethodBody instead
Additional notes:
- add missing v-queries to the query builder
  From(Span) method
Additional notes:
- add VirtualSyntaxNodeWithSpanOverride to override
  TextSpan of a SyntaxNode
- add "empty" virtual syntax node kind
- add a static property for getting an empty virtual
  syntax node (see VirtualSyntaxNode class)
- add NotNull extension for getting not nullable values
- add an extension for getting source text bounds from
  FileLinePositionSpan
- add an extension for casting a SyntaxNode to another
  SyntaxNode type
- add IVirtualSyntaxNodeMather for finding specific
  virtual nodes
- add experimental BasicSyntaxTreeQuery and
  BasicSyntaxTreeQueryWalker that support quering
  both virtual syntax nodes and native syntax nodes
  with separate syntax node matcher (no unit tests)
- use experimental BasicSyntaxTreeQuery for matching
  nodes by TextSpan in SyntaxTreeBuilder
- add SourceTextPosition virtual node matcher for
  matching virtual nodes with overriden SourceSpan
- consider IfConditionSyntax virtual node as a node
  with overridable source-span (to differentiate it
  from a condition expression)
- define more strictly differences between a method
  body syntax and nested block syntax
- multiple changes to method-body,
  method-body-member, method-body-parent,
  nested-block and nested-block-parent syntax
  node matchers accordingly to definition of
  related virtual syntax nodes
Additional notes:
- the support is only added to the basic syntax tree
  query walker
- for now it supports mixing multiple non-overridable
  queries and a single overridable query
- because of that IVirtualQueryRouting now returns
  array of results - a single result per overridable and
  non-overridable virtual query
Additional notes:
- treat arrow expression clause as nested block parent
- treat expression statement as nested block parent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants