Dart replacing the node in the abstract syntax tree

Issue

i want to replace print(a) with print(a+b) in the following code.

void main(){
   String a ="hey";
   String b ="there"; 
   print(\$a);
}

cn is the AstNode & cn contains print($a)

Is their any way i can do this? Please help me, i am new to dart.

Solution

https://happystudiess.blogspot.in/2017/08/dart-replacing-node-in-abstract-syntax-tree.html

this is the link for the answer.

Answered By – Rishab Jain

Answer Checked By – Pedro (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *