General Codebase clean up (#5939)

* Fixed refractoring issue in reflection/generate_code.sh. Also, mv deletes the original file, so I don't need to clean it up manually in that case.

* Ensuring test/generate_code.sh was ran

* Fixed Dart Tests by removing code-gen for included files.

* General cleanup of codebase.
This commit is contained in:
Derek Bailey
2020-06-01 08:40:55 -07:00
committed by GitHub
parent a0da0c08c6
commit 7179a5a8ba
8 changed files with 34 additions and 42 deletions

View File

@@ -1704,9 +1704,7 @@ CheckedError Parser::ParseSingleValue(const std::string *name, Value &e,
const auto is_tok_string = (token_ == kTokenStringConstant);
// First see if this could be a conversion function:
if (is_tok_ident && *cursor_ == '(') {
return ParseFunction(name, e);
}
if (is_tok_ident && *cursor_ == '(') { return ParseFunction(name, e); }
// clang-format off
auto match = false;
@@ -1757,8 +1755,7 @@ CheckedError Parser::ParseSingleValue(const std::string *name, Value &e,
if (!match && is_tok_string && IsScalar(in_type)) {
// Strip trailing whitespaces from attribute_.
auto last_non_ws = attribute_.find_last_not_of(' ');
if (std::string::npos != last_non_ws)
attribute_.resize(last_non_ws + 1);
if (std::string::npos != last_non_ws) attribute_.resize(last_non_ws + 1);
if (IsFloat(e.type.base_type)) {
// The functions strtod() and strtof() accept both 'nan' and
// 'nan(number)' literals. While 'nan(number)' is rejected by the parser