1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 12:27:34 +00:00

LibCpp: Add Parser::tokens_in_range(start, end)

This function returns the tokens that exist in the specified range.
This commit is contained in:
Itamar 2021-07-03 11:47:41 +03:00 committed by Andreas Kling
parent 9a31fb6673
commit 232013c05b
3 changed files with 15 additions and 5 deletions

View file

@ -182,6 +182,7 @@ public:
virtual ~Parameter() override = default;
virtual const char* class_name() const override { return "Parameter"; }
virtual void dump(FILE* = stdout, size_t indent = 0) const override;
virtual bool is_parameter() const override { return true; }
Parameter(ASTNode* parent, Optional<Position> start, Optional<Position> end, const String& filename, StringView name)
: VariableOrParameterDeclaration(parent, start, end, filename)
@ -189,8 +190,6 @@ public:
m_name = name;
}
virtual bool is_parameter() const override { return true; }
bool m_is_ellipsis { false };
};