mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-12 13:08:49 +00:00
Expunge INTERNAL_BLOCK from the codebase
It's a relic of the old parser, and isn't used anymore.
This commit is contained in:
parent
51527612d3
commit
489fb7ec3f
2 changed files with 3 additions and 23 deletions
14
exec.cpp
14
exec.cpp
|
@ -909,7 +909,6 @@ void exec_job(parser_t &parser, job_t *j)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case INTERNAL_BLOCK:
|
|
||||||
case INTERNAL_BLOCK_NODE:
|
case INTERNAL_BLOCK_NODE:
|
||||||
{
|
{
|
||||||
if (p->next)
|
if (p->next)
|
||||||
|
@ -930,17 +929,7 @@ void exec_job(parser_t &parser, job_t *j)
|
||||||
|
|
||||||
if (! exec_error)
|
if (! exec_error)
|
||||||
{
|
{
|
||||||
if (p->type == INTERNAL_BLOCK)
|
internal_exec_helper(parser, wcstring(), p->internal_block_node, TOP, process_net_io_chain);
|
||||||
{
|
|
||||||
/* The block contents (as in, fish code) are stored in argv0 (ugh) */
|
|
||||||
assert(p->argv0() != NULL);
|
|
||||||
internal_exec_helper(parser, p->argv0(), NODE_OFFSET_INVALID, TOP, process_net_io_chain);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
assert(p->type == INTERNAL_BLOCK_NODE);
|
|
||||||
internal_exec_helper(parser, wcstring(), p->internal_block_node, TOP, process_net_io_chain);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1108,7 +1097,6 @@ void exec_job(parser_t &parser, job_t *j)
|
||||||
switch (p->type)
|
switch (p->type)
|
||||||
{
|
{
|
||||||
|
|
||||||
case INTERNAL_BLOCK:
|
|
||||||
case INTERNAL_BLOCK_NODE:
|
case INTERNAL_BLOCK_NODE:
|
||||||
case INTERNAL_FUNCTION:
|
case INTERNAL_FUNCTION:
|
||||||
{
|
{
|
||||||
|
|
12
proc.h
12
proc.h
|
@ -69,10 +69,6 @@ enum process_type_t
|
||||||
A shellscript function
|
A shellscript function
|
||||||
*/
|
*/
|
||||||
INTERNAL_FUNCTION,
|
INTERNAL_FUNCTION,
|
||||||
/**
|
|
||||||
A block of commands
|
|
||||||
*/
|
|
||||||
INTERNAL_BLOCK,
|
|
||||||
|
|
||||||
/** A block of commands, represented as a node */
|
/** A block of commands, represented as a node */
|
||||||
INTERNAL_BLOCK_NODE,
|
INTERNAL_BLOCK_NODE,
|
||||||
|
@ -100,7 +96,7 @@ enum
|
||||||
commands to be evaluated by calling eval. Lastly, this process can
|
commands to be evaluated by calling eval. Lastly, this process can
|
||||||
be the result of an exec command. The role of this process_t is
|
be the result of an exec command. The role of this process_t is
|
||||||
determined by the type field, which can be one of EXTERNAL,
|
determined by the type field, which can be one of EXTERNAL,
|
||||||
INTERNAL_BUILTIN, INTERNAL_FUNCTION, INTERNAL_BLOCK, INTERNAL_EXEC.
|
INTERNAL_BUILTIN, INTERNAL_FUNCTION, INTERNAL_EXEC.
|
||||||
|
|
||||||
The process_t contains information on how the process should be
|
The process_t contains information on how the process should be
|
||||||
started, such as command name and arguments, as well as runtime
|
started, such as command name and arguments, as well as runtime
|
||||||
|
@ -119,9 +115,6 @@ enum
|
||||||
If the process is of type INTERNAL_FUNCTION, argv is the argument
|
If the process is of type INTERNAL_FUNCTION, argv is the argument
|
||||||
vector, and argv[0] is the name of the shellscript function.
|
vector, and argv[0] is the name of the shellscript function.
|
||||||
|
|
||||||
If the process is of type INTERNAL_BLOCK, argv has exactly one
|
|
||||||
element, which is the block of commands to execute.
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
class process_t
|
class process_t
|
||||||
{
|
{
|
||||||
|
@ -146,8 +139,7 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Type of process. Can be one of \c EXTERNAL, \c
|
Type of process. Can be one of \c EXTERNAL, \c
|
||||||
INTERNAL_BUILTIN, \c INTERNAL_FUNCTION, \c INTERNAL_BLOCK,
|
INTERNAL_BUILTIN, \c INTERNAL_FUNCTION, \c INTERNAL_EXEC
|
||||||
INTERNAL_EXEC
|
|
||||||
*/
|
*/
|
||||||
enum process_type_t type;
|
enum process_type_t type;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue