X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Floader%2FParsedSource.cpp;h=8c3d3bd17415d5cd4fe7ff92df6b42a45204127a;hb=8fd08e32d902b1340dd686ba0d7990fb1be3b861;hp=6b2fc80413207811b90631c1bfc493982c95c5ee;hpb=3a30342daecdb9ee050ab20fcb50819a599d6343;p=l2e.git diff --git a/src/loader/ParsedSource.cpp b/src/loader/ParsedSource.cpp index 6b2fc80..8c3d3bd 100644 --- a/src/loader/ParsedSource.cpp +++ b/src/loader/ParsedSource.cpp @@ -485,7 +485,7 @@ const string &ScriptToken::CommandName() const { } } -const string &ScriptToken::GetIdentifier() const { +const string &ScriptToken::Identifier() const { if (type == IDENTIFIER) { return str; } else { @@ -493,6 +493,14 @@ const string &ScriptToken::GetIdentifier() const { } } +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;