diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-10-12 01:17:55 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-10-12 01:17:55 -0700 |
commit | 5490f54d005dcc9b35409315aefc698203b81ff1 (patch) | |
tree | ec996497f84626cc81cf030f0fe5b4c2f2e99793 /parse_tree.h | |
parent | 58447c147f20d55555ed4035e3add1ccafec2998 (diff) |
Make parse_t::parse a static method so we don't have to create lots of
useless parse_t objects
Diffstat (limited to 'parse_tree.h')
-rw-r--r-- | parse_tree.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/parse_tree.h b/parse_tree.h index 941ddd4e..f6e913c2 100644 --- a/parse_tree.h +++ b/parse_tree.h @@ -141,12 +141,14 @@ class parse_t { parse_ll_t * const parser; + bool parse_internal(const wcstring &str, parse_tree_flags_t flags, parse_node_tree_t *output, parse_error_list_t *errors, bool log_it = false); + public: parse_t(); ~parse_t(); - /* Parse a string */ - bool parse(const wcstring &str, parse_tree_flags_t flags, parse_node_tree_t *output, parse_error_list_t *errors, bool log_it = false); + /* Parse a string all at once */ + static bool parse(const wcstring &str, parse_tree_flags_t flags, parse_node_tree_t *output, parse_error_list_t *errors, bool log_it = false); /* Parse a single token */ bool parse_1_token(parse_token_type_t token, parse_keyword_t keyword, parse_node_tree_t *output, parse_error_list_t *errors); |