mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-16 23:14:04 +00:00
ast.cpp: initialization order
member 'extras_' is used to initialize 'tokens_'. members are initialized in the order they are declared in a class
This commit is contained in:
parent
5211735965
commit
9abbcc0ba6
1 changed files with 16 additions and 16 deletions
32
src/ast.cpp
32
src/ast.cpp
|
@ -1222,26 +1222,26 @@ struct populator_t {
|
||||||
visit_stack_.pop_back();
|
visit_stack_.pop_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flags controlling parsing.
|
/// Flags controlling parsing.
|
||||||
parse_tree_flags_t flags_{};
|
parse_tree_flags_t flags_{};
|
||||||
|
|
||||||
// Stream of tokens which we consume.
|
/// Extra stuff like comment ranges.
|
||||||
token_stream_t tokens_;
|
|
||||||
|
|
||||||
// The type which we are attempting to parse, typically job_list but may be
|
|
||||||
// freestanding_argument_list.
|
|
||||||
const type_t top_type_;
|
|
||||||
|
|
||||||
// If set, we are unwinding due to error recovery.
|
|
||||||
bool unwinding_{false};
|
|
||||||
|
|
||||||
// If set, we have encountered an error.
|
|
||||||
bool any_error_{false};
|
|
||||||
|
|
||||||
// Extra stuff like comment ranges.
|
|
||||||
ast_t::extras_t extras_{};
|
ast_t::extras_t extras_{};
|
||||||
|
|
||||||
// A stack containing the nodes whose fields we are visiting.
|
/// Stream of tokens which we consume.
|
||||||
|
token_stream_t tokens_;
|
||||||
|
|
||||||
|
/** The type which we are attempting to parse, typically job_list but may be
|
||||||
|
freestanding_argument_list. */
|
||||||
|
const type_t top_type_;
|
||||||
|
|
||||||
|
/// If set, we are unwinding due to error recovery.
|
||||||
|
bool unwinding_{false};
|
||||||
|
|
||||||
|
/// If set, we have encountered an error.
|
||||||
|
bool any_error_{false};
|
||||||
|
|
||||||
|
/// A stack containing the nodes whose fields we are visiting.
|
||||||
std::vector<const node_t *> visit_stack_{};
|
std::vector<const node_t *> visit_stack_{};
|
||||||
|
|
||||||
// If non-null, populate with errors.
|
// If non-null, populate with errors.
|
||||||
|
|
Loading…
Reference in a new issue