mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-10 04:51:17 +00:00
Moved scalar scanning-related parameters to a struct.
Renamed the valid/possible tokens to a single variable status with enums valid, invalid, and unverified.
This commit is contained in:
6
token.h
6
token.h
@@ -4,13 +4,15 @@
|
||||
|
||||
namespace YAML
|
||||
{
|
||||
enum TOKEN_STATUS { TS_VALID, TS_INVALID, TS_UNVERIFIED };
|
||||
|
||||
struct Token {
|
||||
Token(): isValid(true), isPossible(true) {}
|
||||
Token(): status(TS_VALID) {}
|
||||
virtual ~Token() {}
|
||||
virtual void Write(std::ostream& out) const {}
|
||||
|
||||
friend std::ostream& operator << (std::ostream& out, const Token& token) { token.Write(out); return out; }
|
||||
bool isValid, isPossible;
|
||||
TOKEN_STATUS status;
|
||||
};
|
||||
|
||||
struct StreamStartToken: public Token {};
|
||||
|
Reference in New Issue
Block a user