| // Copyright 2015 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #ifndef MOJO_PUBLIC_TOOLS_BINDINGS_MOJOM_CPP_LEXER_H_ |
| #define MOJO_PUBLIC_TOOLS_BINDINGS_MOJOM_CPP_LEXER_H_ |
| ERROR_UNTERMINATED_STRING_LITERAL, |
| // Punctuators and Separators |
| // TODO(azani): Check that all tokens were implemented. |
| // TODO(azani): Error out on octal. |
| return (token_type == TokenType::ERROR_ILLEGAL_CHAR || |
| token_type == TokenType::ERROR_UNTERMINATED_STRING_LITERAL || |
| token_type == TokenType::ERROR_UNKNOWN); |
| // Accepts the text of a mojom file and returns the ordered list of tokens |
| std::vector<Token> Tokenize(const std::string& source); |
| #endif // MOJO_PUBLIC_TOOLS_BINDINGS_MOJOM_CPP_LEXER_H_ |