You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#2731 has embarked on the generalization of parse diagnostics functions. It was driven by the necessity of manipulating a whole TypeSyntax (the thrown type) instead of discrete TokenSyntaxs which the functions were originally designed for.
The refactoring effort stopped at generalizing ParseDiagnosticsGenerator.exchangeTokens into ParseDiagnosticsGenerator.exchangeNodes that has relaxed the accepted input type from TokenSyntax to Syntax. However several implementations of ParserError such as EffectsSpecifierAfterArrow, and implementations of ParserFixIt such as MoveTokensAfterFixIt that constitute Diagnostic still expect TokenSyntax. More importantly, nodesDescriptionAndCommonParent, the common utility function responsible for rendering several messages in the diagnostic, expects a list of TokenSyntax as its input.
We should continue refactoring on these functions to further improve generality.
The text was updated successfully, but these errors were encountered:
Description
#2731 has embarked on the generalization of parse diagnostics functions. It was driven by the necessity of manipulating a whole
TypeSyntax
(the thrown type) instead of discreteTokenSyntax
s which the functions were originally designed for.The refactoring effort stopped at generalizing
ParseDiagnosticsGenerator.exchangeTokens
intoParseDiagnosticsGenerator.exchangeNodes
that has relaxed the accepted input type fromTokenSyntax
toSyntax
. However several implementations ofParserError
such asEffectsSpecifierAfterArrow
, and implementations ofParserFixIt
such asMoveTokensAfterFixIt
that constituteDiagnostic
still expectTokenSyntax
. More importantly,nodesDescriptionAndCommonParent
, the common utility function responsible for rendering several messages in the diagnostic, expects a list ofTokenSyntax
as its input.We should continue refactoring on these functions to further improve generality.
The text was updated successfully, but these errors were encountered: