fix(compiler): give ASTWithSource its own visit method #31347
ASTWithSource contains more information that AST and should have its own
Part 1 of template parsing refactoring for stability.
Please check if your PR fulfills the following requirements:
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?