| Index: src/ast/ast.h
|
| diff --git a/src/ast/ast.h b/src/ast/ast.h
|
| index 2b3dbad5d57504c5493a7809e010f86c9fc1c26e..7a0ec8be03d0ce93cf293b889a322933660e0a10 100644
|
| --- a/src/ast/ast.h
|
| +++ b/src/ast/ast.h
|
| @@ -111,6 +111,7 @@ namespace internal {
|
| V(FormalParameter) \
|
| V(TypeReference) \
|
| V(StringLiteralType) \
|
| + V(QueryType) \
|
| V(TypeOrParameters)
|
|
|
| // Forward declarations
|
| @@ -3153,6 +3154,26 @@ class StringLiteralType : public Type {
|
| };
|
|
|
|
|
| +class QueryType : public Type {
|
| + public:
|
| + DECLARE_NODE_TYPE(QueryType)
|
| +
|
| + const AstRawString* name() const { return name_; }
|
| + ZoneList<const AstRawString*>* property_names() const {
|
| + return property_names_;
|
| + }
|
| +
|
| + protected:
|
| + QueryType(Zone* zone, const AstRawString* name,
|
| + ZoneList<const AstRawString*>* property_names, int pos)
|
| + : Type(zone, pos), name_(name), property_names_(property_names) {}
|
| +
|
| + private:
|
| + const AstRawString* name_;
|
| + ZoneList<const AstRawString*>* property_names_;
|
| +};
|
| +
|
| +
|
| class TypeOrParameters : public Type {
|
| public:
|
| DECLARE_NODE_TYPE(TypeOrParameters)
|
| @@ -3798,6 +3819,13 @@ class AstNodeFactory final BASE_EMBEDDED {
|
| typesystem::StringLiteralType(local_zone_, string, pos);
|
| }
|
|
|
| + typesystem::QueryType* NewQueryType(
|
| + const AstRawString* name, ZoneList<const AstRawString*>* property_names,
|
| + int pos) {
|
| + return new (local_zone_)
|
| + typesystem::QueryType(local_zone_, name, property_names, pos);
|
| + }
|
| +
|
| typesystem::FormalParameter* NewFormalParameter(const AstRawString* name,
|
| bool optional, bool spread,
|
| typesystem::Type* type,
|
|
|