summaryrefslogtreecommitdiff
path: root/colm/load.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2013-03-24 22:21:35 -0400
committerAdrian Thurston <thurston@complang.org>2013-03-24 22:21:35 -0400
commit27f6e5f7d878a4391af3ce2f725c08ac682857c9 (patch)
tree8a72f83f9f6bc0c0d2b1f14667ca5c5bec17e3ad /colm/load.cc
parentee0c2cae844cbbe7dfa6667a098cb456088d15d1 (diff)
downloadcolm-27f6e5f7d878a4391af3ce2f725c08ac682857c9.tar.gz
show the colm parse error on parse failure
not the right format, but at least shows the line
Diffstat (limited to 'colm/load.cc')
-rw-r--r--colm/load.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/colm/load.cc b/colm/load.cc
index dccdc521..e199a8fe 100644
--- a/colm/load.cc
+++ b/colm/load.cc
@@ -620,10 +620,11 @@ struct LoadSource
/* Extract the parse tree. */
start Start = ColmTree( program );
+ str Error = ColmError( program );
if ( Start == 0 ) {
gblErrorCount += 1;
- std::cerr << inputFileName << ": include parse error" << std::endl;
+ std::cerr << inputFileName << ": parse error: " << Error.text() << std::endl;
return 0;
}
@@ -1862,10 +1863,11 @@ void LoadSource::go()
/* Extract the parse tree. */
start Start = ColmTree( program );
+ str Error = ColmError( program );
if ( Start == 0 ) {
gblErrorCount += 1;
- std::cerr << inputFileName << ": parse error" << std::endl;
+ std::cerr << inputFileName << ": parse error: " << Error.text() << std::endl;
return;
}