refactor: use the linked list container for AST