Closed Jjagg closed 5 years ago
@tgjones All SyntaxNodes are done!
I'm not sure how to best reference the SyntaxGenerator
project to ensure it's built before the generator .targets file is run. I'm inexperienced with msbuild. I looked around a bit, and it seems there's an issue with build-time dependencies in the case where target frameworks are not compatible (Microsoft/msbuild#2661). 632673f might just do the trick though.
Some inconsistencies I came across and changed:
VisitPrefixCastExpression
=> VisitCastExpression
VisitFieldAccess
=> VisitFieldAccessExpression
VisitNumericConstructorInvocation
=> VisitNumericConstructorInvocationExpression
VisitSkippedTokensSyntaxTrivia
=> VisitSkippedTokensTrivia
MacroArgumentListSyntax
had SyntaxKind
VariableDeclarator
ParameterListSyntax
had SyntaxKind
ArgumentList
(SyntaxKind.ParameterList
did not exist)
VariableDeclaratorSyntax
had SyntaxKind
ArgumentList
This is amazing work, thank you! PRs that have the effect of removing ~1000 LOC are the best kind :)
Yay! :) I'll see if I can find some time to move along with the SyntaxRewriter
next.
This PR will use the
SyntaxGenerator
project to generate HLSL syntax nodes from a config file, the same way Roslyn does it. Generated code will implement the following:Update
(modify any number of fields),With[Field]
(modify 1 field),SetDiagnostics
.SyntaxVisitor
,SyntaxVisitor<T>
andSyntaxRewriter
)I'm currently throwing out some Roslyn code that's related to how they expose their syntax trees that's not relevant to this project. Roslyn uses what they call green and red trees. The red tree is an internal, mutable tree, used for performance while the green tree is the exposed layer on top that cannot be mutated by consumers directly. It's pretty neat, but also very complex.
@tgjones Putting this WIP PR up so progress can be tracked and commented.