mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:17:45 +00:00
LibCpp: Support parsing templatized function calls
This commit is contained in:
parent
fe4122bbae
commit
646aaa111b
4 changed files with 84 additions and 19 deletions
|
@ -460,22 +460,38 @@ public:
|
|||
RefPtr<Expression> m_rhs;
|
||||
};
|
||||
|
||||
class FunctionCall final : public Expression {
|
||||
class FunctionCall : public Expression {
|
||||
public:
|
||||
FunctionCall(ASTNode* parent, Optional<Position> start, Optional<Position> end, const String& filename)
|
||||
: Expression(parent, start, end, filename)
|
||||
{
|
||||
}
|
||||
|
||||
~FunctionCall() override = default;
|
||||
virtual ~FunctionCall() override = default;
|
||||
virtual const char* class_name() const override { return "FunctionCall"; }
|
||||
virtual void dump(size_t indent) const override;
|
||||
virtual bool is_function_call() const override { return true; }
|
||||
virtual bool is_templatized() const { return false; }
|
||||
|
||||
RefPtr<Name> m_name;
|
||||
NonnullRefPtrVector<Expression> m_arguments;
|
||||
};
|
||||
|
||||
class TemplatizedFunctionCall final : public FunctionCall {
|
||||
public:
|
||||
TemplatizedFunctionCall(ASTNode* parent, Optional<Position> start, Optional<Position> end, const String& filename)
|
||||
: FunctionCall(parent, start, end, filename)
|
||||
{
|
||||
}
|
||||
|
||||
~TemplatizedFunctionCall() override = default;
|
||||
virtual const char* class_name() const override { return "TemplatizedFunctionCall"; }
|
||||
virtual void dump(size_t indent) const override;
|
||||
virtual bool is_templatized() const override { return true; }
|
||||
|
||||
NonnullRefPtrVector<Type> m_template_arguments;
|
||||
};
|
||||
|
||||
class StringLiteral final : public Expression {
|
||||
public:
|
||||
StringLiteral(ASTNode* parent, Optional<Position> start, Optional<Position> end, const String& filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue