-- | Render the JS AST to text.
renderStatements :: Int -> [Statement] -> (Text,[Mapping])
renderStatements line = (write &&& mappings) . pp where
  pp = flip execState state . runPP . ppStatements
  write = toLazyText . psBuilder
  state = PrintState mempty line 0 []
  mappings = reverse . psMappings

-- | Pretty print statements.
renderStatements :: Int -> [Statement] -> (Text,[Mapping])
renderStatements line = (write &&& mappings) . pp where
  pp = flip execState state . runPP . ppStatements
  write = toLazyText . psBuilder
  state = PrintState mempty line 0 []
  mappings = reverse . psMappings

-- | Pretty print statements.
renderStatements line = (write &&& mappings) . pp where
  pp = flip execState state . runPP . ppStatements
  write = toLazyText . psBuilder
  state = PrintState mempty line 0 []
  mappings = reverse . psMappings

-- | Pretty print statements.