Closed amis92 closed 5 years ago
I'm very open for suggestions. I know this project needs a lot of refactoring and rethinking it.
For one, I'm heavily considering rewriting the whole generation to be string-based with the final step being parsing the generated syntax back to SyntaxNodes as required by CG.R framework.
It'd definitely improve readability. No idea about performance impact, but a wild guess is it wouldn't be much worse, maybe even better since we'd drop a lot of allocations being done when fluent-building syntax by SyntaxFactory.
Regarding RecordDescriptor
getting overused, I agree. We probably ought to create a record generation context that'd contain necessary information, and keep descriptor focused on syntax nodes.
Random thought: One of the things I think could help readability is refactoring GeneratedCodeAttributeGenerator to use SyntaxRewriter approach instead of the custom dictionary with delegates.
edit: extracted to #80
This was addressed by 60277823d04b3725096911eb564ad79654f502ca thus close?
_Originally posted by @atifaziz in https://github.com/_render_node/MDIzOlB1bGxSZXF1ZXN0UmV2aWV3VGhyZWFkMTg4OTc3NDE2OnYy/pull_request_review_threads/discussion_