| 166 | } |
| 167 | |
| 168 | Token TokenStream::next() |
| 169 | { |
| 170 | Token token; |
| 171 | skipSeparators(); |
| 172 | ParseLocation loc = cin->loc(); |
| 173 | if (trySymbols (token,loc)) return token; /**< try to parse a symbol */ |
| 174 | if (tryFloat (token,loc)) return token; /**< try to parse float */ |
| 175 | if (tryInt (token,loc)) return token; /**< try to parse integer */ |
| 176 | if (tryString (token,loc)) return token; /**< try to parse string */ |
| 177 | if (tryIdentifier(token,loc)) return token; /**< try to parse identifier */ |
| 178 | if (cin->peek() == EOF ) return Token(loc); /**< return EOF token */ |
| 179 | return Token((char)cin->get(),loc); /**< return invalid character token */ |
| 180 | } |
| 181 | } |
no test coverage detected