nicole mazzuca 09af1e9b55
[vcpkg] Add initial JSON support (#10521)
* [vcpkg] Add initial JSON support

This adds a JSON parser, as well as the amount of unicode support
required for JSON parsing to work according to the specification. In the
future, I hope to rewrite our existing XML files into JSON.

Additionally, as a drive-by, we've added the following:

* add /wd4800 to pragmas.h -- this is a "performance warning", for when
  you implicitly convert pointers or integers to bool, and shouldn't be
  an issue for us.
* Switched Parse::ParserBase to read unicode (as utf-8), as opposed to
  ASCII
* Building again under VCPKG_DEVELOPMENT_WARNINGS, yay!
2020-04-17 18:16:20 -07:00

18 lines
580 B
C++

#pragma once
namespace vcpkg::Parse
{
struct TextRowCol
{
constexpr TextRowCol() noexcept = default;
constexpr TextRowCol(int row, int column) noexcept : row(row), column(column) { }
/// '0' indicates uninitialized; '1' is the first row.
int row = 0;
/// '0' indicates uninitialized; '1' is the first column.
int column = 0;
constexpr int row_or(int def) const noexcept { return row ? row : def; }
constexpr int column_or(int def) const noexcept { return column ? column : def; }
};
}