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

Shell: Allow completing StringLiterals as paths

This auto-escapes the token as well :^)
This commit is contained in:
Ali Mohammad Pur 2022-03-06 11:58:49 +03:30 committed by Andreas Kling
parent 118590325a
commit 0ea775f257
6 changed files with 135 additions and 48 deletions

View file

@ -1344,11 +1344,18 @@ private:
class StringLiteral final : public Node {
public:
StringLiteral(Position, String);
enum class EnclosureType {
None,
SingleQuotes,
DoubleQuotes,
};
StringLiteral(Position, String, EnclosureType);
virtual ~StringLiteral();
virtual void visit(NodeVisitor& visitor) override { visitor.visit(this); }
const String& text() const { return m_text; }
EnclosureType enclosure_type() const { return m_enclosure_type; }
private:
NODE(StringLiteral);
@ -1358,6 +1365,7 @@ private:
virtual RefPtr<Node> leftmost_trivial_literal() const override { return this; };
String m_text;
EnclosureType m_enclosure_type;
};
class StringPartCompose final : public Node {