mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 06:41:14 -03:00
Merge branch 'master' into ast_no_templates
Conflicts: configure.ac exec.cpp
This commit is contained in:
@@ -76,7 +76,7 @@ struct tokenizer_t
|
||||
wcstring last_token;
|
||||
|
||||
/** Type of last token*/
|
||||
int last_type;
|
||||
enum token_type last_type;
|
||||
|
||||
/** Offset of last token*/
|
||||
size_t last_pos;
|
||||
@@ -122,7 +122,7 @@ void tok_next(tokenizer_t *tok);
|
||||
/**
|
||||
Returns the type of the last token. Must be one of the values in the token_type enum.
|
||||
*/
|
||||
int tok_last_type(tokenizer_t *tok);
|
||||
enum token_type tok_last_type(tokenizer_t *tok);
|
||||
|
||||
/**
|
||||
Returns the last token string. The string should not be freed by the caller.
|
||||
@@ -147,12 +147,14 @@ int tok_get_pos(const tokenizer_t *tok);
|
||||
/** Returns the extent of the current token */
|
||||
size_t tok_get_extent(const tokenizer_t *tok);
|
||||
|
||||
/** Returns the token type after the current one, without adjusting the position. Optionally returns the next string by reference. */
|
||||
enum token_type tok_peek_next(tokenizer_t *tok, wcstring *out_next_string);
|
||||
|
||||
/**
|
||||
Returns the original string to tokenizer
|
||||
*/
|
||||
const wchar_t *tok_string(tokenizer_t *tok);
|
||||
|
||||
|
||||
/**
|
||||
Returns only the first token from the specified string. This is a
|
||||
convenience function, used to retrieve the first token of a
|
||||
|
||||
Reference in New Issue
Block a user