Some trivial rewriters might be added (to simplify code even further)
removal of empty string concatenation
$S_X & "" => $S_X
Directly nested declare blocks
declare $M_X; begin declare $M_Y; begin $M_Stmts; end; end => declare $M_X; $M_Y; begin $M_Stmts; end;
[note this rewrite requires that libadalang supports capturing complex AST nodes
such that $M_X; can capture a sequence of declarations like X : Integer; Y : Float := 3.0;]
Some trivial rewriters might be added (to simplify code even further)
removal of empty string concatenation
$S_X & ""
=>$S_X
Directly nested declare blocks
declare $M_X; begin declare $M_Y; begin $M_Stmts; end; end
=>declare $M_X; $M_Y; begin $M_Stmts; end;
[note this rewrite requires that libadalang supports capturing complex AST nodes such that$M_X;
can capture a sequence of declarations likeX : Integer; Y : Float := 3.0;
]