Open
Conversation
Replace all solang_parser usage in forge-doc with solar AST. Use owned purpose-built structs (ParamInfo, ContractSource, FunctionSource, etc.) extracted at walk time instead of cloning arena-allocated solar AST nodes. - Add parser/source.rs with owned doc structs - Rewrite Parser to walk solar AST items directly - Parse doc comments from solar's DocComments (raw text) - Update builder to use solar AST from gcx, remove solang re-parse - Update writer and preprocessor layers for owned structs - Delete solang_ext/ module (Visitor, Visitable, AstEq, etc.) - Remove solang-parser dependency from forge-doc - Decouple chisel from forge-doc (inline CodeLocation/SafeUnwrap) Co-authored-by: Amp <amp@ampcode.com>
Member
|
would be nicer to rewrite from scratch and have an actual test harness and suite for this, but i guess at this point we can leave that for the future. |
| @@ -315,12 +310,20 @@ impl Document { | |||
| fn write_function( | |||
Collaborator
There was a problem hiding this comment.
this duplicates the logic in ParseSource::signature(). Maybe a FunctionSource::signature() method can be added and both can share it.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Replace all
solang_parserusage in forge-doc with solar AST. Use owned purpose-built structs (ParamInfo, ContractSource, FunctionSource, etc.) extracted at walk time instead of cloning arena-allocated solar AST nodes.PR Checklist