mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +00:00
Shell: Make VariableDeclarations::Variable store NonnullRefPtrs
This commit is contained in:
parent
e9c602bc83
commit
c29681cb03
Notes:
sideshowbarker
2024-07-19 04:10:24 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c29681cb030
2 changed files with 3 additions and 3 deletions
|
@ -861,8 +861,8 @@ private:
|
|||
class VariableDeclarations final : public Node {
|
||||
public:
|
||||
struct Variable {
|
||||
RefPtr<Node> name;
|
||||
RefPtr<Node> value;
|
||||
NonnullRefPtr<Node> name;
|
||||
NonnullRefPtr<Node> value;
|
||||
};
|
||||
VariableDeclarations(Position, Vector<Variable> variables);
|
||||
virtual ~VariableDeclarations();
|
||||
|
|
|
@ -247,7 +247,7 @@ RefPtr<AST::Node> Parser::parse_variable_decls()
|
|||
}
|
||||
|
||||
Vector<AST::VariableDeclarations::Variable> variables;
|
||||
variables.append({ move(name_expr), move(expression) });
|
||||
variables.append({ move(name_expr), expression.release_nonnull() });
|
||||
|
||||
if (consume_while(is_whitespace).is_empty())
|
||||
return create<AST::VariableDeclarations>(move(variables));
|
||||
|
|
Loading…
Add table
Reference in a new issue