fix conditionals in lexer (add functions)