Browse Source

Format: Allow user-defined types in Parser

master
Riyyi 2 years ago
parent
commit
a83615083d
  1. 2
      src/ruc/format/formatter.h
  2. 2
      src/ruc/format/parser.cpp
  3. 1
      src/ruc/format/parser.h
  4. 2
      test/unit/testutilformat.cpp

2
src/ruc/format/formatter.h

@ -314,8 +314,6 @@ struct Formatter<Specifier> : Formatter<std::nullptr_t> {
} // namespace ruc::format
using ruc::format::Formatter;
#if 0
TODO:

2
src/ruc/format/parser.cpp

@ -411,6 +411,8 @@ constexpr void Parser::checkSpecifierType(const Specifier& specifier, ParameterT
case ParameterType::Container:
checkSpecifierContainerType(specifier);
break;
case ParameterType::UserDefined:
break;
default:
VERIFY_NOT_REACHED();
}

1
src/ruc/format/parser.h

@ -32,6 +32,7 @@ public:
String,
Pointer,
Container,
UserDefined,
};
Parser(std::string_view format, size_t parameterCount);

2
test/unit/testutilformat.cpp

@ -513,5 +513,5 @@ TEST_CASE(FormatContainers)
}
// Local Variables:
// lsp-in-cpp-project-cache: nil
// lsp-in-cpp-project-cache: (nil)
// End:

Loading…
Cancel
Save