mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
LibJS: Parse labelled statements
All statements now have an optional label string that can be null.
This commit is contained in:
parent
5cd01ed79e
commit
10bf4ba3dc
4 changed files with 44 additions and 0 deletions
|
@ -70,6 +70,12 @@ private:
|
|||
};
|
||||
|
||||
class Statement : public ASTNode {
|
||||
public:
|
||||
const FlyString& label() const { return m_label; }
|
||||
void set_label(FlyString string) { m_label = string; }
|
||||
|
||||
protected:
|
||||
FlyString m_label;
|
||||
};
|
||||
|
||||
class EmptyStatement final : public Statement {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue