Skip to content

More SymbolResult improvements #2027

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 20, 2023
Merged

Conversation

adamsitnik
Copy link
Member

  • remove RootCommandResult (internal), introduce SymbolResultTree (internal) and make all virtual SymbolResult methods non-virtual and delegating to SymbolResultTree
  • remove internal SymbolResult.GetChildren, expose SymbolResult.SymbolResultTree as internal field, optimize SymbolResultTree.GetChildren for AgumentResult
  • make SymbolResultTree derive from Dictionary<Symbol, SymbolResult
  • update the token with missing information during parsing, so later stages don't need to modify it
  • refactor the code so root command and inner most command are never nulls

I was not able to finish the removal of a list copy per symbol result:
d84ca2a
b28a616

I've run into situation where I am not sure whether this will be possible to implement, I'll finish that tomorrow.

…rnal) and make all virtual SymbolResult methods non-virtual and delegating to SymbolResultTree
…esultTree as internal field, optimize SymbolResultTree.GetChildren for AgumentResult
* it makes SymbolResultTree more responsible and less artificial (subjective)
* it removes one allocation (nit)
@adamsitnik
Copy link
Member Author

The CI has still not started, will close and reopen the PR.

@adamsitnik adamsitnik closed this Jan 20, 2023
@adamsitnik adamsitnik reopened this Jan 20, 2023
@jonsequitur jonsequitur merged commit daec22f into dotnet:main Jan 20, 2023
@adamsitnik adamsitnik deleted the resultSymbolTree branch January 22, 2023 18:19
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