diff options
author | Torsten Paul <Torsten.Paul@gmx.de> | 2013-11-11 00:16:57 (GMT) |
---|---|---|
committer | Torsten Paul <Torsten.Paul@gmx.de> | 2013-11-11 00:38:34 (GMT) |
commit | e6b2884805e79d4ce1b55916977ddede46fc7396 (patch) | |
tree | 9eb884063172ea821d0b5010ba6c12e4c866c56e /src | |
parent | 3c0e9f4f182dccea6dc0636daf8dbc06dd7c190f (diff) |
Fix output of range expressions.
Diffstat (limited to 'src')
-rw-r--r-- | src/expr.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/expr.cc b/src/expr.cc index 51accf3..08615ba 100644 --- a/src/expr.cc +++ b/src/expr.cc @@ -199,7 +199,11 @@ std::string Expression::toString() const stream << this->const_value; } else if (this->type == "R") { - stream << "[" << *this->children[0] << " : " << *this->children[1] << " : " << *this->children[2] << "]"; + stream << "[" << *this->children[0] << " : " << *this->children[1]; + if (this->children.size() > 2) { + stream << " : " << *this->children[2]; + } + stream << "]"; } else if (this->type == "V") { stream << "["; |