From 0323ed4d37fee4f84251a74dce04271160d2d1f1 Mon Sep 17 00:00:00 2001 From: wcohen Date: Tue, 9 May 2006 12:55:56 +0000 Subject: Print out information to make it easier to determine which probe in script associated with timing information. --- parse.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'parse.cxx') diff --git a/parse.cxx b/parse.cxx index 96d9a5d4..0eba81bb 100644 --- a/parse.cxx +++ b/parse.cxx @@ -76,6 +76,16 @@ tt2str(token_type tt) return "unknown token"; } +ostream& +operator << (ostream& o, const source_loc& loc) +{ + o << loc.file << ":" + << loc.line << ":" + << loc.column; + + return o; +} + ostream& operator << (ostream& o, const token& t) { @@ -93,9 +103,7 @@ operator << (ostream& o, const token& t) } o << " at " - << t.location.file << ":" - << t.location.line << ":" - << t.location.column; + << t.location; return o; } -- cgit