aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-09-11 14:22:16 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-09-11 14:22:16 -0700
commit46452e7634b658f2a5f704890ae9d77d932d4610 (patch)
treea1be8c0177fcef8808eb728b341cadc63f8ed8d3 /parser.cpp
parentee3b355c3445368adf524af79c99244a77e46169 (diff)
Improve error messages for double square brackets -
Diffstat (limited to 'parser.cpp')
-rw-r--r--parser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/parser.cpp b/parser.cpp
index c6cbd9b5..93e068d7 100644
--- a/parser.cpp
+++ b/parser.cpp
@@ -3535,8 +3535,8 @@ int parser_t::test(const wchar_t *buff, int *block_level, wcstring *out, const w
}
else
{
- err = 1;
- if (out)
+ // Only print errors once
+ if (out && ! err)
{
error(SYNTAX_ERROR,
tok_get_pos(&tok),
@@ -3546,6 +3546,7 @@ int parser_t::test(const wchar_t *buff, int *block_level, wcstring *out, const w
print_errors(*out, prefix);
}
+ err = 1;
}
break;