[WIP] make ASTs cachable

pass in both `context` and `userData`