File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 55-- @usage fusion-ast [FILE]
66local argparse = require (" argparse" )
77local parser = require (" fusion.core.parser" )
8- local pretty = require (" pl.pretty " ) -- TODO: replace
8+ local serpent = require (" serpent " )
99
1010local argparser = argparse () {
1111 name = " fusion-ast" ;
@@ -19,9 +19,10 @@ local function read_file(file)
1919 local file_handler = assert (io.open (file ))
2020 local line = file_handler :read ()
2121 if line :sub (1 , 2 ) == " #!" then
22- pretty . dump (parser :match (file_handler :read (" *a" )))
22+ print ( serpent . block (parser :match (file_handler :read (" *a" ) )))
2323 else
24- pretty .dump (parser :match (line .. ' \n ' .. file_handler :read (" *a" )))
24+ print (serpent .block (parser :match (line .. ' \n ' ..
25+ file_handler :read (" *a" ))))
2526 end
2627 file_handler :close ()
2728end
You can’t perform that action at this time.
0 commit comments