fixed astree to also record tokens