mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-04 04:33:23 +00:00
Utility for checking the encoding and line ending of source files (#5188)
* Add utility for checking the encoding of source files - accept source files with ASCII or UTF-8 without BOM - accept only CRLF line ending * Fix non-ascii symbol in idl_parcer.cpp * Remove BOM from test.cpp
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
957d167199
commit
0eaaf18192
@@ -428,7 +428,7 @@ CheckedError Parser::Next() {
|
||||
|
||||
auto dot_lvl = (c == '.') ? 0 : 1; // dot_lvl==0 <=> exactly one '.' seen
|
||||
if (!dot_lvl && !is_digit(*cursor_)) return NoError(); // enum?
|
||||
// Parser accepts hexadecimal-floating-literal (see C++ 5.13.4).
|
||||
// Parser accepts hexadecimal-floating-literal (see C++ 5.13.4).
|
||||
if (is_digit(c) || has_sign || !dot_lvl) {
|
||||
const auto start = cursor_ - 1;
|
||||
auto start_digits = !is_digit(c) ? cursor_ : cursor_ - 1;
|
||||
|
||||
Reference in New Issue
Block a user