try using records for AST nodes and parse should be a multimethod that dispatches on an op