Made scanner history immutable in case of user want to save lexeme for future use.