3 require 'metalua.walk.id'
9 assert(x==type or not x)
13 disp = |msg,ast| printf("\n%s:\n%s", msg, table.tostring(ast, 80, 'nohash'))
14 disp('initial term', ast)
16 do -- Make globals explicit:
17 local ast = table.deep_copy(ast)
18 local cfg = { id = { } }
19 function cfg.id.free(i)
20 i <- `Index{ `Id '_G', `String{i[1]} }
23 walk_id.block(cfg, ast)
24 disp('Globals made explicit', ast)