summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-09 17:29:20 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-09 17:29:20 +0100
commit7092a4e862e784cae34ac1346eebd4038a42144d (patch)
tree6432f956ced5cdd1c468954bf3ba9f898cc99a6f
parent5d156c7a47ae5a743d6245965ffc932301f8a3bd (diff)
Allowing tokens to be passed to logger functions
-rw-r--r--src/plugins/plain/DynamicTokenizer.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/plain/DynamicTokenizer.hpp b/src/plugins/plain/DynamicTokenizer.hpp
index 0b4dd39..0cac2e8 100644
--- a/src/plugins/plain/DynamicTokenizer.hpp
+++ b/src/plugins/plain/DynamicTokenizer.hpp
@@ -85,6 +85,14 @@ struct DynamicToken {
* @param type is the id corresponding to the type of the token.
*/
DynamicToken(TokenTypeId type) : type(type) {}
+
+ /**
+ * The getLocation function allows the tokens to be directly passed as
+ * parameter to Logger or LoggableException instances.
+ *
+ * @return a reference at the location field
+ */
+ const SourceLocation &getLocation() const { return location; }
};
/**