AST and parser for const hooks