aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-03-18 14:42:38 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-03-20 21:32:03 -0700
commit4deb46290da1f89422cf1f269b516317d98822a6 (patch)
tree39ab5aed46c7bac35bb1f5be556cddcb072a95f3 /parser.cpp
parente5ef45e4c04b6126ea74c4010b2d8fe1c0b06cca (diff)
Remove additional dead code from old parser
Diffstat (limited to 'parser.cpp')
-rw-r--r--parser.cpp61
1 files changed, 1 insertions, 60 deletions
diff --git a/parser.cpp b/parser.cpp
index 16dcd971..cb3b913f 100644
--- a/parser.cpp
+++ b/parser.cpp
@@ -381,10 +381,6 @@ void parser_t::forbid_function(const wcstring &function)
void parser_t::allow_function()
{
- /*
- if( al_peek( &forbidden_function) )
- debug( 2, L"Allow %ls\n", al_peek( &forbidden_function) );
- */
forbidden_function.pop_back();
}
@@ -846,25 +842,6 @@ wcstring parser_t::current_line()
return line_info;
}
-
-const wchar_t *parser_t::get_buffer() const
-{
- return tok_string(current_tokenizer);
-}
-
-
-int parser_t::is_help(const wchar_t *s, int min_match)
-{
- CHECK(s, 0);
-
- size_t len = wcslen(s);
-
- min_match = maxi(min_match, 3);
-
- return (wcscmp(L"-h", s) == 0) ||
- (len >= (size_t)min_match && (wcsncmp(L"--help", s, len) == 0));
-}
-
void parser_t::job_add(job_t *job)
{
assert(job != NULL);
@@ -948,7 +925,7 @@ profile_item_t *parser_t::create_profile_item()
}
-int parser_t::eval_new_parser(const wcstring &cmd, const io_chain_t &io, enum block_type_t block_type)
+int parser_t::eval(const wcstring &cmd, const io_chain_t &io, enum block_type_t block_type)
{
CHECK_BLOCK(1);
@@ -1055,42 +1032,6 @@ int parser_t::eval_block_node(node_offset_t node_idx, const io_chain_t &io, enum
}
-int parser_t::eval(const wcstring &cmd_str, const io_chain_t &io, enum block_type_t block_type)
-{
- return this->eval_new_parser(cmd_str, io, block_type);
-}
-
-
-/**
- \return the block type created by the specified builtin, or -1 on error.
-*/
-block_type_t parser_get_block_type(const wcstring &cmd)
-{
- for (size_t i=0; block_lookup[i].desc; i++)
- {
- if (block_lookup[i].name && cmd == block_lookup[i].name)
- {
- return block_lookup[i].type;
- }
- }
- return (block_type_t)-1;
-}
-
-/**
- \return the block command that createa the specified block type, or null on error.
-*/
-const wchar_t *parser_get_block_command(int type)
-{
- for (size_t i=0; block_lookup[i].desc; i++)
- {
- if (block_lookup[i].type == type)
- {
- return block_lookup[i].name;
- }
- }
- return NULL;
-}
-
/**
Test if this argument contains any errors. Detected errors include
syntax errors in command substitutions, improperly escaped