aboutsummaryrefslogtreecommitdiffhomepage
path: root/parse_tree.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-03-18 14:14:32 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-03-20 21:32:02 -0700
commite5ef45e4c04b6126ea74c4010b2d8fe1c0b06cca (patch)
treed200c10a700c9cfae10d170a600acfda8508086a /parse_tree.cpp
parente780637cf42bc8d26e0e963f5ff84b11007459c5 (diff)
Rewrite parser_t::test_args and parser_t::eval_args to use new parser
Diffstat (limited to 'parse_tree.cpp')
-rw-r--r--parse_tree.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/parse_tree.cpp b/parse_tree.cpp
index ae8e42d0..caba268a 100644
--- a/parse_tree.cpp
+++ b/parse_tree.cpp
@@ -14,7 +14,7 @@ static bool production_is_empty(const production_t *production)
}
/** Returns a string description of this parse error */
-wcstring parse_error_t::describe_with_prefix(const wcstring &src, const wcstring &prefix, bool skip_caret) const
+wcstring parse_error_t::describe_with_prefix(const wcstring &src, const wcstring &prefix, bool is_interactive, bool skip_caret) const
{
wcstring result = text;
if (! skip_caret && source_start < src.size() && source_start + source_length <= src.size())
@@ -44,7 +44,7 @@ wcstring parse_error_t::describe_with_prefix(const wcstring &src, const wcstring
assert(source_start >= line_start);
// Don't include the caret and line if we're interactive this is the first line, because then it's obvious
- bool skip_caret = (get_is_interactive() && source_start == 0);
+ bool skip_caret = (is_interactive && source_start == 0);
if (! skip_caret)
{
@@ -91,7 +91,7 @@ wcstring parse_error_t::describe_with_prefix(const wcstring &src, const wcstring
wcstring parse_error_t::describe(const wcstring &src) const
{
- return this->describe_with_prefix(src, wcstring(), false);
+ return this->describe_with_prefix(src, wcstring(), get_is_interactive(), false);
}
wcstring parse_errors_description(const parse_error_list_t &errors, const wcstring &src, const wchar_t *prefix)