}
}
-const string &ScriptToken::GetIdentifier() const {
+const string &ScriptToken::Identifier() const {
if (type == IDENTIFIER) {
return str;
} else {
}
}
+const string &ScriptToken::Label() const {
+ if (type == LABEL) {
+ return str;
+ } else {
+ throw runtime_error("access to label of non-label script token");
+ }
+}
+
const Literal *ScriptToken::GetLiteral() const {
if (type == LITERAL) {
return literal;