aboutsummaryrefslogtreecommitdiffhomepage
path: root/parse_tree.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-12-16 16:52:23 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-12-16 16:52:23 -0800
commit3e9153d955aa2e908f1dd661c8b91556ca8e0ee8 (patch)
tree71e1d1c592d727181a9eaee53b9355ba7c6194e4 /parse_tree.cpp
parent0e421ea31dd8293c64960912ab9651b2a3b2b07d (diff)
Clean up some error messages. Don't show the line in the error message
if it's the first line and we're interactive, since then it's obvious
Diffstat (limited to 'parse_tree.cpp')
-rw-r--r--parse_tree.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse_tree.cpp b/parse_tree.cpp
index ad83a0d6..81b6c163 100644
--- a/parse_tree.cpp
+++ b/parse_tree.cpp
@@ -12,10 +12,10 @@ static bool production_is_empty(const production_t *production)
}
/** Returns a string description of this parse error */
-wcstring parse_error_t::describe(const wcstring &src) const
+wcstring parse_error_t::describe(const wcstring &src, bool skip_caret) const
{
wcstring result = text;
- if (source_start < src.size() && source_start + source_length <= src.size())
+ if (! skip_caret && source_start < src.size() && source_start + source_length <= src.size())
{
// Locate the beginning of this line of source
size_t line_start = 0;