renamed class TreeNode to Node and function parseNext() to parseNextToken()