File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Userland/Libraries/LibCpp Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -343,7 +343,7 @@ class FunctionDefinition : public ASTNode {
343
343
}
344
344
345
345
virtual Vector<NonnullRefPtr<Declaration const >> declarations () const override ;
346
- Vector<NonnullRefPtr<Statement const >> const & statements () { return m_statements; }
346
+ Vector<NonnullRefPtr<Statement const >> const & statements () const { return m_statements; }
347
347
void add_statement (NonnullRefPtr<Statement const >&& statement) { m_statements.append (move (statement)); }
348
348
349
349
private:
@@ -504,6 +504,8 @@ class NumericLiteral : public Expression {
504
504
{
505
505
}
506
506
507
+ StringView value () const { return m_value; }
508
+
507
509
private:
508
510
StringView m_value;
509
511
};
@@ -825,6 +827,8 @@ class BlockStatement final : public Statement {
825
827
826
828
void add_statement (NonnullRefPtr<Statement const >&& statement) { m_statements.append (move (statement)); }
827
829
830
+ Vector<NonnullRefPtr<Statement const >> const & statements () const { return m_statements; }
831
+
828
832
private:
829
833
Vector<NonnullRefPtr<Statement const >> m_statements;
830
834
};
@@ -856,6 +860,7 @@ class IfStatement : public Statement {
856
860
void set_then_statement (RefPtr<Statement const >&& then) { m_then = move (then); }
857
861
void set_else_statement (RefPtr<Statement const >&& _else) { m_else = move (_else); }
858
862
863
+ Expression const * predicate () const { return m_predicate.ptr (); }
859
864
Statement const * then_statement () const { return m_then.ptr (); }
860
865
Statement const * else_statement () const { return m_else.ptr (); }
861
866
You can’t perform that action at this time.
0 commit comments