mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-24 13:59:28 +08:00

If we ever need any of these... they're in this commit: fish_wcswidth_visible() status_cmd_opts_t::feature_name completion_t::is_naturally_less_than() parser_t::set_empty_var_and_fire() parser_t::get_block_desc() parser_keywords_skip_arguments() parser_keywords_is_block() job_t::has_internal_proc() fish_wcswidth_visible()
24 lines
1.0 KiB
C++
24 lines
1.0 KiB
C++
// Functions having to do with parser keywords, like testing if a function is a block command.
|
|
#ifndef FISH_PARSER_KEYWORD_H
|
|
#define FISH_PARSER_KEYWORD_H
|
|
|
|
#include "common.h"
|
|
|
|
/// Tests if the specified commands parameters should be interpreted as another command, which will
|
|
/// be true if the command is either 'command', 'exec', 'if', 'while', or 'builtin'. This does not
|
|
/// handle "else if" which is more complicated.
|
|
///
|
|
/// \param cmd The command name to test
|
|
/// \return 1 of the command parameter is a command, 0 otherwise
|
|
bool parser_keywords_is_subcommand(const wcstring &cmd);
|
|
|
|
/// Tests if the specified command is a reserved word, i.e. if it is the name of one of the builtin
|
|
/// functions that change the block or command scope, like 'for', 'end' or 'command' or 'exec'.
|
|
/// These functions may not be overloaded, so their names are reserved.
|
|
///
|
|
/// \param word The command name to test
|
|
/// \return 1 of the command parameter is a command, 0 otherwise
|
|
bool parser_keywords_is_reserved(const wcstring &word);
|
|
|
|
#endif
|