css-tree

A tool set for CSS: fast detailed parser (CSS → AST), walker (AST traversal), generator (AST → CSS) and lexer (validation and matching) based on specs and browser implementations

recast

JavaScript syntax tree transformer, nondestructive pretty-printer, and automatic source map generator