Skip to content

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