mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Improve error message on missing 'end'
darcs-hash:20051008002349-ac50b-35f09b736a06ec3955d2ee121dd9ec3855f59f6c.gz
This commit is contained in:
parent
47b174fa68
commit
29d43269ee
1 changed files with 5 additions and 4 deletions
9
parser.c
9
parser.c
|
@ -72,6 +72,8 @@ The fish parser. Contains functions for parsing code.
|
|||
*/
|
||||
#define RECURSION_ERR_MSG L"Maximum recursion depth reached. Accidental infinite loop?"
|
||||
|
||||
#define BLOCK_END_ERR_MSG L"Could not locate end of block. The 'end' command may be missing or misspelled."
|
||||
|
||||
/**
|
||||
Error message on reaching maximum number of block calls
|
||||
*/
|
||||
|
@ -1507,10 +1509,9 @@ static int parse_job( process_t *p,
|
|||
|
||||
default:
|
||||
{
|
||||
error_arg( SYNTAX_ERROR,
|
||||
L"Expected end of command, got token of type ",
|
||||
tok_get_desc( tok_last_type(tok)),
|
||||
tok_get_pos( tok ) );
|
||||
error( SYNTAX_ERROR,
|
||||
BLOCK_END_ERR_MSG,
|
||||
current_tokenizer_pos );
|
||||
}
|
||||
}
|
||||
tok_destroy( &subtok );
|
||||
|
|
Loading…
Reference in a new issue