From 2f50e30b89a06e2f3c439f4a8440e4d35b4ebb27 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 24 Jun 2010 19:53:59 -0400 Subject: Scopes can now provide a description of themselves This isn't being used yet, but it likely will to improve the information presented to users if their value expressions fail to compile or evaluate. --- src/post.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/post.h') diff --git a/src/post.h b/src/post.h index e1535a46..7d5abcd8 100644 --- a/src/post.h +++ b/src/post.h @@ -99,6 +99,16 @@ public: TRACE_DTOR(post_t); } + virtual string description() { + if (pos) { + std::ostringstream buf; + buf << _("posting at line %1") << pos->beg_line; + return buf.str(); + } else { + return string(_("generated posting")); + } + } + virtual bool has_tag(const string& tag, bool inherit = true) const; virtual bool has_tag(const mask_t& tag_mask, -- cgit v1.2.3