This is rather technical question on how to approach it.
I ask because I work with 3rd party doc block parser and need to build the same feature around it.
Input
The parser returns Nodes (ParamNode for @param Type $name, VarNode etc.),
and lexer returns tokens (/**, , @, param ...).
Change
Let's say I change Type to TypeFoo via $paramNode->type (like here).
How to connect them together so I could print back the original format?
If that helps, I'm aware there is indent in printer and each node has original node on it.
Thank you for any guidance.
This is rather technical question on how to approach it.
I ask because I work with 3rd party doc block parser and need to build the same feature around it.
Input
The parser returns Nodes (
ParamNodefor@param Type $name,VarNodeetc.),and lexer returns tokens (
/**,,@,param...).Change
Let's say I change
TypetoTypeFoovia$paramNode->type(like here).How to connect them together so I could print back the original format?
If that helps, I'm aware there is indent in printer and each node has original node on it.
Thank you for any guidance.