2018-10-12 02:29:11 +08:00
|
|
|
#pragma once
|
|
|
|
|
2018-11-05 10:19:00 +08:00
|
|
|
#include "common.h"
|
2018-10-12 02:29:11 +08:00
|
|
|
|
|
|
|
struct InfoForExtension
|
|
|
|
{
|
|
|
|
const char* name;
|
|
|
|
int64_t value;
|
|
|
|
InfoForExtension* next;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct SentenceInfo
|
|
|
|
{
|
|
|
|
const InfoForExtension* list;
|
|
|
|
// Traverse linked list to find info.
|
|
|
|
int64_t operator[](std::string propertyName)
|
|
|
|
{
|
|
|
|
for (auto i = list; i != nullptr; i = i->next) if (propertyName == i->name) return i->value;
|
|
|
|
throw;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
struct SKIP {};
|
|
|
|
inline void Skip() { throw SKIP(); }
|