Added type for ASTNode
Changed advance to all

advance is deprecated