TNO / Rewriters-Ada

Advanced manipulation of Ada code
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

Add some rewriters #3

Open pjljvandelaar opened 2 years ago

pjljvandelaar commented 2 years ago

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;]