aboutsummaryrefslogtreecommitdiffhomepage
path: root/parse_tree.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-03-21 17:13:33 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-03-21 17:13:33 -0700
commitad6367018b5d04bdba99f10ec3afcb3398fe880e (patch)
treefd54aaaf145a313bece854a321482323233b21fd /parse_tree.h
parentc71b1684020515f342f7dfd5e31324f84e2c6294 (diff)
Excise use of parser_t's error() functionality. Thread a
parse_error_list_t through all of the expand functions, enabling them to report errors more directly. Improve aspects of error reporting for expansion failures.
Diffstat (limited to 'parse_tree.h')
-rw-r--r--parse_tree.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/parse_tree.h b/parse_tree.h
index 99c3bf29..706ee9c5 100644
--- a/parse_tree.h
+++ b/parse_tree.h
@@ -21,26 +21,6 @@ class parse_node_tree_t;
typedef size_t node_offset_t;
#define NODE_OFFSET_INVALID (static_cast<node_offset_t>(-1))
-struct parse_error_t
-{
- /** Text of the error */
- wcstring text;
-
- /** Code for the error */
- enum parse_error_code_t code;
-
- /** Offset and length of the token in the source code that triggered this error */
- size_t source_start;
- size_t source_length;
-
- /** Return a string describing the error, suitable for presentation to the user. If skip_caret is false, the offending line with a caret is printed as well */
- wcstring describe(const wcstring &src) const;
-
- /** Return a string describing the error, suitable for presentation to the user, with the given prefix. If skip_caret is false, the offending line with a caret is printed as well */
- wcstring describe_with_prefix(const wcstring &src, const wcstring &prefix, bool is_interactive, bool skip_caret) const;
-};
-typedef std::vector<parse_error_t> parse_error_list_t;
-
/* Returns a description of a list of parse errors */
wcstring parse_errors_description(const parse_error_list_t &errors, const wcstring &src, const wchar_t *prefix = NULL);