| 315 | } |
| 316 | |
| 317 | CheckedError Parser::SkipByteOrderMark() { |
| 318 | if (static_cast<unsigned char>(*cursor_) != 0xef) return NoError(); |
| 319 | cursor_++; |
| 320 | if (static_cast<unsigned char>(*cursor_) != 0xbb) |
| 321 | return Error("invalid utf-8 byte order mark"); |
| 322 | cursor_++; |
| 323 | if (static_cast<unsigned char>(*cursor_) != 0xbf) |
| 324 | return Error("invalid utf-8 byte order mark"); |
| 325 | cursor_++; |
| 326 | return NoError(); |
| 327 | } |
| 328 | |
| 329 | static inline bool IsIdentifierStart(char c) { |
| 330 | return is_alpha(c) || (c == '_'); |