Skip to content

Commit 65e1cc9

Browse files
committed
parsert is not a messaget
Use a messaget member "log" for output. The member is public for now to facilitate a step-by-step transition towards not constructing messaget objects without a configured message handler, which is deprecated.
1 parent fb7f887 commit 65e1cc9

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/util/parser.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ void parsert::parse_error(
3535
if(!before.empty())
3636
tmp += " before '" + before + "'";
3737

38-
#if 0
39-
source_locationt tmp_source_location=source_location;
40-
tmp_source_location.set_column(column-before.size());
41-
print(1, tmp, -1, tmp_source_location);
42-
#else
4338
log.error().source_location = source_location;
4439
log.error() << tmp << messaget::eom;
45-
#endif
4640
}

src/util/parser.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class parsert
3939
last_line.clear();
4040
}
4141

42-
parsert():in(nullptr) { clear(); }
42+
parsert():in(nullptr), log(null_message_handler) { clear(); }
4343
virtual ~parsert() { }
4444

4545
// The following are for the benefit of the scanner
@@ -133,6 +133,7 @@ class parsert
133133

134134
// should be protected or even just be a reference to a message handler, but
135135
// for now enables a step-by-step transition
136+
null_message_handlert null_message_handler;
136137
messaget log;
137138

138139
protected:

0 commit comments

Comments
 (0)