You can view the rest of the videos on our
My Little Parser: Tooling is Magic
Code is abstraction. When we code, we punch keys to write tokens to form expressions to build great towering syntactical forests. When we code, we weave a flow of data from outset to outcome. When we code, we alter the course of electrons, inadvertantly hastening the heat death of the universe by just that little bit.
We edit code at that one level of abstraction -- keypresses, text -- and we treat with code -- searching, replacing, grep'ing -- at that level. What problems can we free ourselves from by interacting with our code at the AST level?
In this talk, I will touch on:
- The basics of ASTs and streaming parsers.
- CSS as a general purpose AST selector language.
- Using AST transformation to switch module loaders, test frameworks, and APIs.
- Using CSS-the-AST-selector to search for unsafe operations in existing codebases, intelligently grep for code, and build simple, flexible linters for common programmer errors.