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:
Aaron Gyes 2021-12-20 22:43:58 -08:00
parent 5211735965
commit 9abbcc0ba6

View file

@ -1222,26 +1222,26 @@ struct populator_t {
visit_stack_.pop_back();
}
// Flags controlling parsing.
/// Flags controlling parsing.
parse_tree_flags_t flags_{};
// 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};
// Extra stuff like comment ranges.
/// Extra stuff like comment ranges.
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_{};
// If non-null, populate with errors.