/*----------------------------------------------------------------------------*/
/* This file is generated by the templates/template.rb script and should not  */
/* be modified manually.                                                      */
/* To change the template see                                                 */
/* templates/include/rbs/ast.h.erb                                            */
/*----------------------------------------------------------------------------*/

#ifndef RBS__AST_H
#define RBS__AST_H

#include "rbs/defines.h"
#include "rbs/util/rbs_allocator.h"
#include "rbs/util/rbs_constant_pool.h"
#include "string.h"
#include "location.h"

enum rbs_attribute_visibility {
    RBS_ATTRIBUTE_VISIBILITY_UNSPECIFIED, /* unspecified (nil) */
    RBS_ATTRIBUTE_VISIBILITY_PUBLIC,      /* public (:public) */
    RBS_ATTRIBUTE_VISIBILITY_PRIVATE,     /* private (:private) */
};

enum rbs_attribute_kind {
    RBS_ATTRIBUTE_KIND_INSTANCE,  /* instance (:instance) */
    RBS_ATTRIBUTE_KIND_SINGLETON, /* singleton (:singleton) */
};

enum rbs_alias_kind {
    RBS_ALIAS_KIND_INSTANCE,  /* instance (:instance) */
    RBS_ALIAS_KIND_SINGLETON, /* singleton (:singleton) */
};

enum rbs_method_definition_kind {
    RBS_METHOD_DEFINITION_KIND_INSTANCE,           /* instance (:instance) */
    RBS_METHOD_DEFINITION_KIND_SINGLETON,          /* singleton (:singleton) */
    RBS_METHOD_DEFINITION_KIND_SINGLETON_INSTANCE, /* singleton_instance (:singleton_instance) */
};

enum rbs_method_definition_visibility {
    RBS_METHOD_DEFINITION_VISIBILITY_UNSPECIFIED, /* unspecified (nil) */
    RBS_METHOD_DEFINITION_VISIBILITY_PUBLIC,      /* public (:public) */
    RBS_METHOD_DEFINITION_VISIBILITY_PRIVATE,     /* private (:private) */
};

enum rbs_type_param_variance {
    RBS_TYPE_PARAM_VARIANCE_INVARIANT,     /* invariant (:invariant) */
    RBS_TYPE_PARAM_VARIANCE_COVARIANT,     /* covariant (:covariant) */
    RBS_TYPE_PARAM_VARIANCE_CONTRAVARIANT, /* contravariant (:contravariant) */
};

enum rbs_attr_ivar_name_tag {
    RBS_ATTR_IVAR_NAME_TAG_UNSPECIFIED, /* The attribute has inferred instance variable (nil) */
    RBS_ATTR_IVAR_NAME_TAG_EMPTY,       /* The attribute has no instance variable (false) */
    RBS_ATTR_IVAR_NAME_TAG_NAME,        /* The attribute has instance variable with the given name */
};

typedef struct rbs_attr_ivar_name {
    enum rbs_attr_ivar_name_tag tag;
    rbs_constant_id_t name; /* valid when tag == RBS_ATTR_IVAR_NAME_TAG_NAME */
} rbs_attr_ivar_name_t;

enum rbs_node_type {
    RBS_AST_ANNOTATION = 1,
    RBS_AST_BOOL = 2,
    RBS_AST_COMMENT = 3,
    RBS_AST_DECLARATIONS_CLASS = 4,
    RBS_AST_DECLARATIONS_CLASS_SUPER = 5,
    RBS_AST_DECLARATIONS_CLASS_ALIAS = 6,
    RBS_AST_DECLARATIONS_CONSTANT = 7,
    RBS_AST_DECLARATIONS_GLOBAL = 8,
    RBS_AST_DECLARATIONS_INTERFACE = 9,
    RBS_AST_DECLARATIONS_MODULE = 10,
    RBS_AST_DECLARATIONS_MODULE_SELF = 11,
    RBS_AST_DECLARATIONS_MODULE_ALIAS = 12,
    RBS_AST_DECLARATIONS_TYPE_ALIAS = 13,
    RBS_AST_DIRECTIVES_USE = 14,
    RBS_AST_DIRECTIVES_USE_SINGLE_CLAUSE = 15,
    RBS_AST_DIRECTIVES_USE_WILDCARD_CLAUSE = 16,
    RBS_AST_INTEGER = 17,
    RBS_AST_MEMBERS_ALIAS = 18,
    RBS_AST_MEMBERS_ATTR_ACCESSOR = 19,
    RBS_AST_MEMBERS_ATTR_READER = 20,
    RBS_AST_MEMBERS_ATTR_WRITER = 21,
    RBS_AST_MEMBERS_CLASS_INSTANCE_VARIABLE = 22,
    RBS_AST_MEMBERS_CLASS_VARIABLE = 23,
    RBS_AST_MEMBERS_EXTEND = 24,
    RBS_AST_MEMBERS_INCLUDE = 25,
    RBS_AST_MEMBERS_INSTANCE_VARIABLE = 26,
    RBS_AST_MEMBERS_METHOD_DEFINITION = 27,
    RBS_AST_MEMBERS_METHOD_DEFINITION_OVERLOAD = 28,
    RBS_AST_MEMBERS_PREPEND = 29,
    RBS_AST_MEMBERS_PRIVATE = 30,
    RBS_AST_MEMBERS_PUBLIC = 31,
    RBS_AST_RUBY_ANNOTATIONS_BLOCK_PARAM_TYPE_ANNOTATION = 32,
    RBS_AST_RUBY_ANNOTATIONS_CLASS_ALIAS_ANNOTATION = 33,
    RBS_AST_RUBY_ANNOTATIONS_COLON_METHOD_TYPE_ANNOTATION = 34,
    RBS_AST_RUBY_ANNOTATIONS_DOUBLE_SPLAT_PARAM_TYPE_ANNOTATION = 35,
    RBS_AST_RUBY_ANNOTATIONS_INSTANCE_VARIABLE_ANNOTATION = 36,
    RBS_AST_RUBY_ANNOTATIONS_METHOD_TYPES_ANNOTATION = 37,
    RBS_AST_RUBY_ANNOTATIONS_MODULE_ALIAS_ANNOTATION = 38,
    RBS_AST_RUBY_ANNOTATIONS_MODULE_SELF_ANNOTATION = 39,
    RBS_AST_RUBY_ANNOTATIONS_NODE_TYPE_ASSERTION = 40,
    RBS_AST_RUBY_ANNOTATIONS_PARAM_TYPE_ANNOTATION = 41,
    RBS_AST_RUBY_ANNOTATIONS_RETURN_TYPE_ANNOTATION = 42,
    RBS_AST_RUBY_ANNOTATIONS_SKIP_ANNOTATION = 43,
    RBS_AST_RUBY_ANNOTATIONS_SPLAT_PARAM_TYPE_ANNOTATION = 44,
    RBS_AST_RUBY_ANNOTATIONS_TYPE_APPLICATION_ANNOTATION = 45,
    RBS_AST_STRING = 46,
    RBS_AST_TYPE_PARAM = 47,
    RBS_METHOD_TYPE = 48,
    RBS_NAMESPACE = 49,
    RBS_SIGNATURE = 50,
    RBS_TYPE_NAME = 51,
    RBS_TYPES_ALIAS = 52,
    RBS_TYPES_BASES_ANY = 53,
    RBS_TYPES_BASES_BOOL = 54,
    RBS_TYPES_BASES_BOTTOM = 55,
    RBS_TYPES_BASES_CLASS = 56,
    RBS_TYPES_BASES_INSTANCE = 57,
    RBS_TYPES_BASES_NIL = 58,
    RBS_TYPES_BASES_SELF = 59,
    RBS_TYPES_BASES_TOP = 60,
    RBS_TYPES_BASES_VOID = 61,
    RBS_TYPES_BLOCK = 62,
    RBS_TYPES_CLASS_INSTANCE = 63,
    RBS_TYPES_CLASS_SINGLETON = 64,
    RBS_TYPES_FUNCTION = 65,
    RBS_TYPES_FUNCTION_FORWARDING_PARAM = 66,
    RBS_TYPES_FUNCTION_PARAM = 67,
    RBS_TYPES_INTERFACE = 68,
    RBS_TYPES_INTERSECTION = 69,
    RBS_TYPES_LITERAL = 70,
    RBS_TYPES_OPTIONAL = 71,
    RBS_TYPES_PROC = 72,
    RBS_TYPES_RECORD = 73,
    RBS_TYPES_RECORD_FIELD_TYPE = 74,
    RBS_TYPES_TUPLE = 75,
    RBS_TYPES_UNION = 76,
    RBS_TYPES_UNTYPED_FUNCTION = 77,
    RBS_TYPES_VARIABLE = 78,
    RBS_AST_SYMBOL,
};

typedef struct rbs_node {
    enum rbs_node_type type;
    rbs_location_range location;
} rbs_node_t;

const char *RBS_NONNULL rbs_node_type_name(rbs_node_t *RBS_NONNULL node);

/* rbs_node_list_node */

typedef struct rbs_node_list_node {
    rbs_node_t *RBS_NONNULL node;
    struct rbs_node_list_node *RBS_NULLABLE next;
} rbs_node_list_node_t;

typedef struct rbs_node_list {
    rbs_allocator_t *RBS_NONNULL allocator;
    rbs_node_list_node_t *RBS_NULLABLE head;
    rbs_node_list_node_t *RBS_NULLABLE tail;
    size_t length;
} rbs_node_list_t;

rbs_node_list_t *RBS_NONNULL rbs_node_list_new(rbs_allocator_t *RBS_NONNULL);

void rbs_node_list_append(rbs_node_list_t *RBS_NONNULL list, rbs_node_t *RBS_NONNULL node);

/* rbs_hash */

typedef struct rbs_hash_node {
    rbs_node_t *RBS_NONNULL key;
    rbs_node_t *RBS_NONNULL value;
    struct rbs_hash_node *RBS_NULLABLE next;
} rbs_hash_node_t;

typedef struct rbs_hash {
    rbs_allocator_t *RBS_NONNULL allocator;
    rbs_hash_node_t *RBS_NULLABLE head;
    rbs_hash_node_t *RBS_NULLABLE tail;
    size_t length;
} rbs_hash_t;

rbs_hash_t *RBS_NONNULL rbs_hash_new(rbs_allocator_t *RBS_NONNULL);

void rbs_hash_set(rbs_hash_t *RBS_NONNULL hash, rbs_node_t *RBS_NONNULL key, rbs_node_t *RBS_NONNULL value);

rbs_hash_node_t *RBS_NULLABLE rbs_hash_find(rbs_hash_t *RBS_NONNULL hash, rbs_node_t *RBS_NONNULL key);

rbs_node_t *RBS_NULLABLE rbs_hash_get(rbs_hash_t *RBS_NONNULL hash, rbs_node_t *RBS_NONNULL key);

/* rbs_ast_node */

typedef struct rbs_ast_annotation {
    rbs_node_t base;

    rbs_string_t string;
} rbs_ast_annotation_t;

typedef struct rbs_ast_bool {
    rbs_node_t base;

    bool value;
} rbs_ast_bool_t;

typedef struct rbs_ast_comment {
    rbs_node_t base;

    rbs_string_t string;
} rbs_ast_comment_t;

typedef struct rbs_ast_declarations_class {
    rbs_node_t base;

    struct rbs_type_name *RBS_NONNULL name;
    struct rbs_node_list *RBS_NONNULL type_params;
    struct rbs_ast_declarations_class_super *RBS_NULLABLE super_class;
    struct rbs_node_list *RBS_NONNULL members;
    struct rbs_node_list *RBS_NONNULL annotations;
    struct rbs_ast_comment *RBS_NULLABLE comment;

    rbs_location_range keyword_range;     /* Required */
    rbs_location_range name_range;        /* Required */
    rbs_location_range end_range;         /* Required */
    rbs_location_range type_params_range; /* Optional */
    rbs_location_range lt_range;          /* Optional */
} rbs_ast_declarations_class_t;

typedef struct rbs_ast_declarations_class_super {
    rbs_node_t base;

    struct rbs_type_name *RBS_NONNULL name;
    struct rbs_node_list *RBS_NONNULL args;

    rbs_location_range name_range; /* Required */
    rbs_location_range args_range; /* Optional */
} rbs_ast_declarations_class_super_t;

typedef struct rbs_ast_declarations_class_alias {
    rbs_node_t base;

    struct rbs_type_name *RBS_NONNULL new_name;
    struct rbs_type_name *RBS_NONNULL old_name;
    struct rbs_ast_comment *RBS_NULLABLE comment;
    struct rbs_node_list *RBS_NONNULL annotations;

    rbs_location_range keyword_range;  /* Required */
    rbs_location_range new_name_range; /* Required */
    rbs_location_range eq_range;       /* Required */
    rbs_location_range old_name_range; /* Required */
} rbs_ast_declarations_class_alias_t;

typedef struct rbs_ast_declarations_constant {
    rbs_node_t base;

    struct rbs_type_name *RBS_NONNULL name;
    struct rbs_node *RBS_NONNULL type;
    struct rbs_ast_comment *RBS_NULLABLE comment;
    struct rbs_node_list *RBS_NONNULL annotations;

    rbs_location_range name_range;  /* Required */
    rbs_location_range colon_range; /* Required */
} rbs_ast_declarations_constant_t;

typedef struct rbs_ast_declarations_global {
    rbs_node_t base;

    struct rbs_ast_symbol *RBS_NONNULL name;
    struct rbs_node *RBS_NONNULL type;
    struct rbs_ast_comment *RBS_NULLABLE comment;
    struct rbs_node_list *RBS_NONNULL annotations;

    rbs_location_range name_range;  /* Required */
    rbs_location_range colon_range; /* Required */
} rbs_ast_declarations_global_t;

typedef struct rbs_ast_declarations_interface {
    rbs_node_t base;

    struct rbs_type_name *RBS_NONNULL name;
    struct rbs_node_list *RBS_NONNULL type_params;
    struct rbs_node_list *RBS_NONNULL members;
    struct rbs_node_list *RBS_NONNULL annotations;
    struct rbs_ast_comment *RBS_NULLABLE comment;

    rbs_location_range keyword_range;     /* Required */
    rbs_location_range name_range;        /* Required */
    rbs_location_range end_range;         /* Required */
    rbs_location_range type_params_range; /* Optional */
} rbs_ast_declarations_interface_t;

typedef struct rbs_ast_declarations_module {
    rbs_node_t base;

    struct rbs_type_name *RBS_NONNULL name;
    struct rbs_node_list *RBS_NONNULL type_params;
    struct rbs_node_list *RBS_NONNULL self_types;
    struct rbs_node_list *RBS_NONNULL members;
    struct rbs_node_list *RBS_NONNULL annotations;
    struct rbs_ast_comment *RBS_NULLABLE comment;

    rbs_location_range keyword_range;     /* Required */
    rbs_location_range name_range;        /* Required */
    rbs_location_range end_range;         /* Required */
    rbs_location_range type_params_range; /* Optional */
    rbs_location_range colon_range;       /* Optional */
    rbs_location_range self_types_range;  /* Optional */
} rbs_ast_declarations_module_t;

typedef struct rbs_ast_declarations_module_self {
    rbs_node_t base;

    struct rbs_type_name *RBS_NONNULL name;
    struct rbs_node_list *RBS_NONNULL args;

    rbs_location_range name_range; /* Required */
    rbs_location_range args_range; /* Optional */
} rbs_ast_declarations_module_self_t;

typedef struct rbs_ast_declarations_module_alias {
    rbs_node_t base;

    struct rbs_type_name *RBS_NONNULL new_name;
    struct rbs_type_name *RBS_NONNULL old_name;
    struct rbs_ast_comment *RBS_NULLABLE comment;
    struct rbs_node_list *RBS_NONNULL annotations;

    rbs_location_range keyword_range;  /* Required */
    rbs_location_range new_name_range; /* Required */
    rbs_location_range eq_range;       /* Required */
    rbs_location_range old_name_range; /* Required */
} rbs_ast_declarations_module_alias_t;

typedef struct rbs_ast_declarations_type_alias {
    rbs_node_t base;

    struct rbs_type_name *RBS_NONNULL name;
    struct rbs_node_list *RBS_NONNULL type_params;
    struct rbs_node *RBS_NONNULL type;
    struct rbs_node_list *RBS_NONNULL annotations;
    struct rbs_ast_comment *RBS_NULLABLE comment;

    rbs_location_range keyword_range;     /* Required */
    rbs_location_range name_range;        /* Required */
    rbs_location_range eq_range;          /* Required */
    rbs_location_range type_params_range; /* Optional */
} rbs_ast_declarations_type_alias_t;

typedef struct rbs_ast_directives_use {
    rbs_node_t base;

    struct rbs_node_list *RBS_NONNULL clauses;

    rbs_location_range keyword_range; /* Required */
} rbs_ast_directives_use_t;

typedef struct rbs_ast_directives_use_single_clause {
    rbs_node_t base;

    struct rbs_type_name *RBS_NONNULL type_name;
    struct rbs_ast_symbol *RBS_NULLABLE new_name;

    rbs_location_range type_name_range; /* Required */
    rbs_location_range keyword_range;   /* Optional */
    rbs_location_range new_name_range;  /* Optional */
} rbs_ast_directives_use_single_clause_t;

typedef struct rbs_ast_directives_use_wildcard_clause {
    rbs_node_t base;

    struct rbs_namespace *RBS_NONNULL rbs_namespace;

    rbs_location_range namespace_range; /* Required */
    rbs_location_range star_range;      /* Required */
} rbs_ast_directives_use_wildcard_clause_t;

typedef struct rbs_ast_integer {
    rbs_node_t base;

    rbs_string_t string_representation;
} rbs_ast_integer_t;

typedef struct rbs_ast_members_alias {
    rbs_node_t base;

    struct rbs_ast_symbol *RBS_NONNULL new_name;
    struct rbs_ast_symbol *RBS_NONNULL old_name;
    enum rbs_alias_kind kind;
    struct rbs_node_list *RBS_NONNULL annotations;
    struct rbs_ast_comment *RBS_NULLABLE comment;

    rbs_location_range keyword_range;  /* Required */
    rbs_location_range new_name_range; /* Required */
    rbs_location_range old_name_range; /* Required */
    rbs_location_range new_kind_range; /* Optional */
    rbs_location_range old_kind_range; /* Optional */
} rbs_ast_members_alias_t;

typedef struct rbs_ast_members_attr_accessor {
    rbs_node_t base;

    struct rbs_ast_symbol *RBS_NONNULL name;
    struct rbs_node *RBS_NONNULL type;
    rbs_attr_ivar_name_t ivar_name;
    enum rbs_attribute_kind kind;
    struct rbs_node_list *RBS_NONNULL annotations;
    struct rbs_ast_comment *RBS_NULLABLE comment;
    enum rbs_attribute_visibility visibility;

    rbs_location_range keyword_range;    /* Required */
    rbs_location_range name_range;       /* Required */
    rbs_location_range colon_range;      /* Required */
    rbs_location_range kind_range;       /* Optional */
    rbs_location_range ivar_range;       /* Optional */
    rbs_location_range ivar_name_range;  /* Optional */
    rbs_location_range visibility_range; /* Optional */
} rbs_ast_members_attr_accessor_t;

typedef struct rbs_ast_members_attr_reader {
    rbs_node_t base;

    struct rbs_ast_symbol *RBS_NONNULL name;
    struct rbs_node *RBS_NONNULL type;
    rbs_attr_ivar_name_t ivar_name;
    enum rbs_attribute_kind kind;
    struct rbs_node_list *RBS_NONNULL annotations;
    struct rbs_ast_comment *RBS_NULLABLE comment;
    enum rbs_attribute_visibility visibility;

    rbs_location_range keyword_range;    /* Required */
    rbs_location_range name_range;       /* Required */
    rbs_location_range colon_range;      /* Required */
    rbs_location_range kind_range;       /* Optional */
    rbs_location_range ivar_range;       /* Optional */
    rbs_location_range ivar_name_range;  /* Optional */
    rbs_location_range visibility_range; /* Optional */
} rbs_ast_members_attr_reader_t;

typedef struct rbs_ast_members_attr_writer {
    rbs_node_t base;

    struct rbs_ast_symbol *RBS_NONNULL name;
    struct rbs_node *RBS_NONNULL type;
    rbs_attr_ivar_name_t ivar_name;
    enum rbs_attribute_kind kind;
    struct rbs_node_list *RBS_NONNULL annotations;
    struct rbs_ast_comment *RBS_NULLABLE comment;
    enum rbs_attribute_visibility visibility;

    rbs_location_range keyword_range;    /* Required */
    rbs_location_range name_range;       /* Required */
    rbs_location_range colon_range;      /* Required */
    rbs_location_range kind_range;       /* Optional */
    rbs_location_range ivar_range;       /* Optional */
    rbs_location_range ivar_name_range;  /* Optional */
    rbs_location_range visibility_range; /* Optional */
} rbs_ast_members_attr_writer_t;

typedef struct rbs_ast_members_class_instance_variable {
    rbs_node_t base;

    struct rbs_ast_symbol *RBS_NONNULL name;
    struct rbs_node *RBS_NONNULL type;
    struct rbs_ast_comment *RBS_NULLABLE comment;

    rbs_location_range name_range;  /* Required */
    rbs_location_range colon_range; /* Required */
    rbs_location_range kind_range;  /* Optional */
} rbs_ast_members_class_instance_variable_t;

typedef struct rbs_ast_members_class_variable {
    rbs_node_t base;

    struct rbs_ast_symbol *RBS_NONNULL name;
    struct rbs_node *RBS_NONNULL type;
    struct rbs_ast_comment *RBS_NULLABLE comment;

    rbs_location_range name_range;  /* Required */
    rbs_location_range colon_range; /* Required */
    rbs_location_range kind_range;  /* Optional */
} rbs_ast_members_class_variable_t;

typedef struct rbs_ast_members_extend {
    rbs_node_t base;

    struct rbs_type_name *RBS_NONNULL name;
    struct rbs_node_list *RBS_NONNULL args;
    struct rbs_node_list *RBS_NONNULL annotations;
    struct rbs_ast_comment *RBS_NULLABLE comment;

    rbs_location_range name_range;    /* Required */
    rbs_location_range keyword_range; /* Required */
    rbs_location_range args_range;    /* Optional */
} rbs_ast_members_extend_t;

typedef struct rbs_ast_members_include {
    rbs_node_t base;

    struct rbs_type_name *RBS_NONNULL name;
    struct rbs_node_list *RBS_NONNULL args;
    struct rbs_node_list *RBS_NONNULL annotations;
    struct rbs_ast_comment *RBS_NULLABLE comment;

    rbs_location_range name_range;    /* Required */
    rbs_location_range keyword_range; /* Required */
    rbs_location_range args_range;    /* Optional */
} rbs_ast_members_include_t;

typedef struct rbs_ast_members_instance_variable {
    rbs_node_t base;

    struct rbs_ast_symbol *RBS_NONNULL name;
    struct rbs_node *RBS_NONNULL type;
    struct rbs_ast_comment *RBS_NULLABLE comment;

    rbs_location_range name_range;  /* Required */
    rbs_location_range colon_range; /* Required */
    rbs_location_range kind_range;  /* Optional */
} rbs_ast_members_instance_variable_t;

typedef struct rbs_ast_members_method_definition {
    rbs_node_t base;

    struct rbs_ast_symbol *RBS_NONNULL name;
    enum rbs_method_definition_kind kind;
    struct rbs_node_list *RBS_NONNULL overloads;
    struct rbs_node_list *RBS_NONNULL annotations;
    struct rbs_ast_comment *RBS_NULLABLE comment;
    bool overloading;
    enum rbs_method_definition_visibility visibility;

    rbs_location_range keyword_range;     /* Required */
    rbs_location_range name_range;        /* Required */
    rbs_location_range kind_range;        /* Optional */
    rbs_location_range overloading_range; /* Optional */
    rbs_location_range visibility_range;  /* Optional */
} rbs_ast_members_method_definition_t;

typedef struct rbs_ast_members_method_definition_overload {
    rbs_node_t base;

    struct rbs_node_list *RBS_NONNULL annotations;
    struct rbs_node *RBS_NONNULL method_type;
} rbs_ast_members_method_definition_overload_t;

typedef struct rbs_ast_members_prepend {
    rbs_node_t base;

    struct rbs_type_name *RBS_NONNULL name;
    struct rbs_node_list *RBS_NONNULL args;
    struct rbs_node_list *RBS_NONNULL annotations;
    struct rbs_ast_comment *RBS_NULLABLE comment;

    rbs_location_range name_range;    /* Required */
    rbs_location_range keyword_range; /* Required */
    rbs_location_range args_range;    /* Optional */
} rbs_ast_members_prepend_t;

typedef struct rbs_ast_members_private {
    rbs_node_t base;

} rbs_ast_members_private_t;

typedef struct rbs_ast_members_public {
    rbs_node_t base;

} rbs_ast_members_public_t;

typedef struct rbs_ast_ruby_annotations_block_param_type_annotation {
    rbs_node_t base;

    rbs_location_range prefix_location;
    rbs_location_range ampersand_location;
    rbs_location_range name_location;
    rbs_location_range colon_location;
    rbs_location_range question_location;
    rbs_location_range type_location;
    struct rbs_node *RBS_NONNULL type_;
    rbs_location_range comment_location;
} rbs_ast_ruby_annotations_block_param_type_annotation_t;

typedef struct rbs_ast_ruby_annotations_class_alias_annotation {
    rbs_node_t base;

    rbs_location_range prefix_location;
    rbs_location_range keyword_location;
    struct rbs_type_name *RBS_NULLABLE type_name;
    rbs_location_range type_name_location;
} rbs_ast_ruby_annotations_class_alias_annotation_t;

typedef struct rbs_ast_ruby_annotations_colon_method_type_annotation {
    rbs_node_t base;

    rbs_location_range prefix_location;
    struct rbs_node_list *RBS_NONNULL annotations;
    struct rbs_node *RBS_NONNULL method_type;
} rbs_ast_ruby_annotations_colon_method_type_annotation_t;

typedef struct rbs_ast_ruby_annotations_double_splat_param_type_annotation {
    rbs_node_t base;

    rbs_location_range prefix_location;
    rbs_location_range star2_location;
    rbs_location_range name_location;
    rbs_location_range colon_location;
    struct rbs_node *RBS_NONNULL param_type;
    rbs_location_range comment_location;
} rbs_ast_ruby_annotations_double_splat_param_type_annotation_t;

typedef struct rbs_ast_ruby_annotations_instance_variable_annotation {
    rbs_node_t base;

    rbs_location_range prefix_location;
    struct rbs_ast_symbol *RBS_NONNULL ivar_name;
    rbs_location_range ivar_name_location;
    rbs_location_range colon_location;
    struct rbs_node *RBS_NONNULL type;
    rbs_location_range comment_location;
} rbs_ast_ruby_annotations_instance_variable_annotation_t;

typedef struct rbs_ast_ruby_annotations_method_types_annotation {
    rbs_node_t base;

    rbs_location_range prefix_location;
    struct rbs_node_list *RBS_NONNULL overloads;
    rbs_location_range_list_t *RBS_NONNULL vertical_bar_locations;
    rbs_location_range dot3_location;
} rbs_ast_ruby_annotations_method_types_annotation_t;

typedef struct rbs_ast_ruby_annotations_module_alias_annotation {
    rbs_node_t base;

    rbs_location_range prefix_location;
    rbs_location_range keyword_location;
    struct rbs_type_name *RBS_NULLABLE type_name;
    rbs_location_range type_name_location;
} rbs_ast_ruby_annotations_module_alias_annotation_t;

typedef struct rbs_ast_ruby_annotations_module_self_annotation {
    rbs_node_t base;

    rbs_location_range prefix_location;
    rbs_location_range keyword_location;
    rbs_location_range colon_location;
    struct rbs_type_name *RBS_NONNULL name;
    struct rbs_node_list *RBS_NONNULL args;
    rbs_location_range open_bracket_location;
    rbs_location_range close_bracket_location;
    rbs_location_range_list_t *RBS_NONNULL args_comma_locations;
    rbs_location_range comment_location;
} rbs_ast_ruby_annotations_module_self_annotation_t;

typedef struct rbs_ast_ruby_annotations_node_type_assertion {
    rbs_node_t base;

    rbs_location_range prefix_location;
    struct rbs_node *RBS_NONNULL type;
} rbs_ast_ruby_annotations_node_type_assertion_t;

typedef struct rbs_ast_ruby_annotations_param_type_annotation {
    rbs_node_t base;

    rbs_location_range prefix_location;
    rbs_location_range name_location;
    rbs_location_range colon_location;
    struct rbs_node *RBS_NONNULL param_type;
    rbs_location_range comment_location;
} rbs_ast_ruby_annotations_param_type_annotation_t;

typedef struct rbs_ast_ruby_annotations_return_type_annotation {
    rbs_node_t base;

    rbs_location_range prefix_location;
    rbs_location_range return_location;
    rbs_location_range colon_location;
    struct rbs_node *RBS_NONNULL return_type;
    rbs_location_range comment_location;
} rbs_ast_ruby_annotations_return_type_annotation_t;

typedef struct rbs_ast_ruby_annotations_skip_annotation {
    rbs_node_t base;

    rbs_location_range prefix_location;
    rbs_location_range skip_location;
    rbs_location_range comment_location;
} rbs_ast_ruby_annotations_skip_annotation_t;

typedef struct rbs_ast_ruby_annotations_splat_param_type_annotation {
    rbs_node_t base;

    rbs_location_range prefix_location;
    rbs_location_range star_location;
    rbs_location_range name_location;
    rbs_location_range colon_location;
    struct rbs_node *RBS_NONNULL param_type;
    rbs_location_range comment_location;
} rbs_ast_ruby_annotations_splat_param_type_annotation_t;

typedef struct rbs_ast_ruby_annotations_type_application_annotation {
    rbs_node_t base;

    rbs_location_range prefix_location;
    struct rbs_node_list *RBS_NONNULL type_args;
    rbs_location_range close_bracket_location;
    rbs_location_range_list_t *RBS_NONNULL comma_locations;
} rbs_ast_ruby_annotations_type_application_annotation_t;

typedef struct rbs_ast_string {
    rbs_node_t base;

    rbs_string_t string;
} rbs_ast_string_t;

typedef struct rbs_ast_type_param {
    rbs_node_t base;

    struct rbs_ast_symbol *RBS_NONNULL name;
    enum rbs_type_param_variance variance;
    struct rbs_node *RBS_NULLABLE upper_bound;
    struct rbs_node *RBS_NULLABLE lower_bound;
    struct rbs_node *RBS_NULLABLE default_type;
    bool unchecked;

    rbs_location_range name_range;        /* Required */
    rbs_location_range variance_range;    /* Optional */
    rbs_location_range unchecked_range;   /* Optional */
    rbs_location_range upper_bound_range; /* Optional */
    rbs_location_range lower_bound_range; /* Optional */
    rbs_location_range default_range;     /* Optional */
} rbs_ast_type_param_t;

typedef struct rbs_method_type {
    rbs_node_t base;

    struct rbs_node_list *RBS_NONNULL type_params;
    struct rbs_node *RBS_NONNULL type;
    struct rbs_types_block *RBS_NULLABLE block;

    rbs_location_range type_range;        /* Required */
    rbs_location_range type_params_range; /* Optional */
} rbs_method_type_t;

typedef struct rbs_namespace {
    rbs_node_t base;

    struct rbs_node_list *RBS_NONNULL path;
    bool absolute;
} rbs_namespace_t;

typedef struct rbs_signature {
    rbs_node_t base;

    struct rbs_node_list *RBS_NONNULL directives;
    struct rbs_node_list *RBS_NONNULL declarations;
} rbs_signature_t;

typedef struct rbs_type_name {
    rbs_node_t base;

    struct rbs_namespace *RBS_NONNULL rbs_namespace;
    struct rbs_ast_symbol *RBS_NONNULL name;
} rbs_type_name_t;

typedef struct rbs_types_alias {
    rbs_node_t base;

    struct rbs_type_name *RBS_NONNULL name;
    struct rbs_node_list *RBS_NONNULL args;

    rbs_location_range name_range; /* Required */
    rbs_location_range args_range; /* Optional */
} rbs_types_alias_t;

typedef struct rbs_types_bases_any {
    rbs_node_t base;

    bool todo;
} rbs_types_bases_any_t;

typedef struct rbs_types_bases_bool {
    rbs_node_t base;

} rbs_types_bases_bool_t;

typedef struct rbs_types_bases_bottom {
    rbs_node_t base;

} rbs_types_bases_bottom_t;

typedef struct rbs_types_bases_class {
    rbs_node_t base;

} rbs_types_bases_class_t;

typedef struct rbs_types_bases_instance {
    rbs_node_t base;

} rbs_types_bases_instance_t;

typedef struct rbs_types_bases_nil {
    rbs_node_t base;

} rbs_types_bases_nil_t;

typedef struct rbs_types_bases_self {
    rbs_node_t base;

} rbs_types_bases_self_t;

typedef struct rbs_types_bases_top {
    rbs_node_t base;

} rbs_types_bases_top_t;

typedef struct rbs_types_bases_void {
    rbs_node_t base;

} rbs_types_bases_void_t;

typedef struct rbs_types_block {
    rbs_node_t base;

    struct rbs_node *RBS_NONNULL type;
    bool required;
    struct rbs_node *RBS_NULLABLE self_type;
} rbs_types_block_t;

typedef struct rbs_types_class_instance {
    rbs_node_t base;

    struct rbs_type_name *RBS_NONNULL name;
    struct rbs_node_list *RBS_NONNULL args;

    rbs_location_range name_range; /* Required */
    rbs_location_range args_range; /* Optional */
} rbs_types_class_instance_t;

typedef struct rbs_types_class_singleton {
    rbs_node_t base;

    struct rbs_type_name *RBS_NONNULL name;
    struct rbs_node_list *RBS_NONNULL args;

    rbs_location_range name_range; /* Required */
    rbs_location_range args_range; /* Optional */
} rbs_types_class_singleton_t;

typedef struct rbs_types_function {
    rbs_node_t base;

    struct rbs_node_list *RBS_NONNULL required_positionals;
    struct rbs_node_list *RBS_NONNULL optional_positionals;
    struct rbs_node *RBS_NULLABLE rest_positionals;
    struct rbs_node_list *RBS_NONNULL trailing_positionals;
    struct rbs_hash *RBS_NONNULL required_keywords;
    struct rbs_hash *RBS_NONNULL optional_keywords;
    struct rbs_node *RBS_NULLABLE rest_keywords;
    struct rbs_node *RBS_NULLABLE forwarding;
    struct rbs_node *RBS_NONNULL return_type;
} rbs_types_function_t;

typedef struct rbs_types_function_forwarding_param {
    rbs_node_t base;

} rbs_types_function_forwarding_param_t;

typedef struct rbs_types_function_param {
    rbs_node_t base;

    struct rbs_node *RBS_NONNULL type;
    struct rbs_ast_symbol *RBS_NULLABLE name;

    rbs_location_range name_range; /* Optional */
} rbs_types_function_param_t;

typedef struct rbs_types_interface {
    rbs_node_t base;

    struct rbs_type_name *RBS_NONNULL name;
    struct rbs_node_list *RBS_NONNULL args;

    rbs_location_range name_range; /* Required */
    rbs_location_range args_range; /* Optional */
} rbs_types_interface_t;

typedef struct rbs_types_intersection {
    rbs_node_t base;

    struct rbs_node_list *RBS_NONNULL types;
} rbs_types_intersection_t;

typedef struct rbs_types_literal {
    rbs_node_t base;

    struct rbs_node *RBS_NONNULL literal;
} rbs_types_literal_t;

typedef struct rbs_types_optional {
    rbs_node_t base;

    struct rbs_node *RBS_NONNULL type;
} rbs_types_optional_t;

typedef struct rbs_types_proc {
    rbs_node_t base;

    struct rbs_node *RBS_NONNULL type;
    struct rbs_types_block *RBS_NULLABLE block;
    struct rbs_node *RBS_NULLABLE self_type;
} rbs_types_proc_t;

typedef struct rbs_types_record {
    rbs_node_t base;

    struct rbs_hash *RBS_NONNULL all_fields;
} rbs_types_record_t;

typedef struct rbs_types_record_field_type {
    rbs_node_t base;

    struct rbs_node *RBS_NONNULL type;
    bool required;
} rbs_types_record_field_type_t;

typedef struct rbs_types_tuple {
    rbs_node_t base;

    struct rbs_node_list *RBS_NONNULL types;
} rbs_types_tuple_t;

typedef struct rbs_types_union {
    rbs_node_t base;

    struct rbs_node_list *RBS_NONNULL types;
} rbs_types_union_t;

typedef struct rbs_types_untyped_function {
    rbs_node_t base;

    struct rbs_node *RBS_NONNULL return_type;
} rbs_types_untyped_function_t;

typedef struct rbs_types_variable {
    rbs_node_t base;

    struct rbs_ast_symbol *RBS_NONNULL name;
} rbs_types_variable_t;

typedef union rbs_ast_ruby_annotations {
    rbs_node_t base;
    rbs_ast_ruby_annotations_block_param_type_annotation_t block_param_type_annotation;
    rbs_ast_ruby_annotations_class_alias_annotation_t class_alias_annotation;
    rbs_ast_ruby_annotations_colon_method_type_annotation_t colon_method_type_annotation;
    rbs_ast_ruby_annotations_double_splat_param_type_annotation_t double_splat_param_type_annotation;
    rbs_ast_ruby_annotations_instance_variable_annotation_t instance_variable_annotation;
    rbs_ast_ruby_annotations_method_types_annotation_t method_types_annotation;
    rbs_ast_ruby_annotations_module_alias_annotation_t module_alias_annotation;
    rbs_ast_ruby_annotations_module_self_annotation_t module_self_annotation;
    rbs_ast_ruby_annotations_node_type_assertion_t node_type_assertion;
    rbs_ast_ruby_annotations_param_type_annotation_t param_type_annotation;
    rbs_ast_ruby_annotations_return_type_annotation_t return_type_annotation;
    rbs_ast_ruby_annotations_skip_annotation_t skip_annotation;
    rbs_ast_ruby_annotations_splat_param_type_annotation_t splat_param_type_annotation;
    rbs_ast_ruby_annotations_type_application_annotation_t type_application_annotation;
} rbs_ast_ruby_annotations_t;

/// `rbs_ast_symbol_t` models user-defined identifiers like class names, method names, etc.
/// These get stored in the parser's own constant pool, and get surfaced to Ruby as `Symbol`s.
typedef struct rbs_ast_symbol {
    rbs_node_t base;
    rbs_constant_id_t constant_id;
} rbs_ast_symbol_t;

rbs_ast_symbol_t *RBS_NONNULL rbs_ast_symbol_new(rbs_allocator_t *RBS_NONNULL, rbs_location_range, rbs_constant_pool_t *RBS_NONNULL, rbs_constant_id_t);

rbs_ast_annotation_t *RBS_NONNULL rbs_ast_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_string_t string);
rbs_ast_bool_t *RBS_NONNULL rbs_ast_bool_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, bool value);
rbs_ast_comment_t *RBS_NONNULL rbs_ast_comment_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_string_t string);
rbs_ast_declarations_class_t *RBS_NONNULL rbs_ast_declarations_class_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL type_params, rbs_ast_declarations_class_super_t *RBS_NULLABLE super_class, rbs_node_list_t *RBS_NONNULL members, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range end_range);
rbs_ast_declarations_class_super_t *RBS_NONNULL rbs_ast_declarations_class_super_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_location_range name_range);
rbs_ast_declarations_class_alias_t *RBS_NONNULL rbs_ast_declarations_class_alias_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL new_name, rbs_type_name_t *RBS_NONNULL old_name, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_node_list_t *RBS_NONNULL annotations, rbs_location_range keyword_range, rbs_location_range new_name_range, rbs_location_range eq_range, rbs_location_range old_name_range);
rbs_ast_declarations_constant_t *RBS_NONNULL rbs_ast_declarations_constant_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_t *RBS_NONNULL type, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_node_list_t *RBS_NONNULL annotations, rbs_location_range name_range, rbs_location_range colon_range);
rbs_ast_declarations_global_t *RBS_NONNULL rbs_ast_declarations_global_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, rbs_node_t *RBS_NONNULL type, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_node_list_t *RBS_NONNULL annotations, rbs_location_range name_range, rbs_location_range colon_range);
rbs_ast_declarations_interface_t *RBS_NONNULL rbs_ast_declarations_interface_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL type_params, rbs_node_list_t *RBS_NONNULL members, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range end_range);
rbs_ast_declarations_module_t *RBS_NONNULL rbs_ast_declarations_module_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL type_params, rbs_node_list_t *RBS_NONNULL self_types, rbs_node_list_t *RBS_NONNULL members, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range end_range);
rbs_ast_declarations_module_self_t *RBS_NONNULL rbs_ast_declarations_module_self_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_location_range name_range);
rbs_ast_declarations_module_alias_t *RBS_NONNULL rbs_ast_declarations_module_alias_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL new_name, rbs_type_name_t *RBS_NONNULL old_name, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_node_list_t *RBS_NONNULL annotations, rbs_location_range keyword_range, rbs_location_range new_name_range, rbs_location_range eq_range, rbs_location_range old_name_range);
rbs_ast_declarations_type_alias_t *RBS_NONNULL rbs_ast_declarations_type_alias_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL type_params, rbs_node_t *RBS_NONNULL type, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range eq_range);
rbs_ast_directives_use_t *RBS_NONNULL rbs_ast_directives_use_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL clauses, rbs_location_range keyword_range);
rbs_ast_directives_use_single_clause_t *RBS_NONNULL rbs_ast_directives_use_single_clause_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL type_name, rbs_ast_symbol_t *RBS_NULLABLE new_name, rbs_location_range type_name_range);
rbs_ast_directives_use_wildcard_clause_t *RBS_NONNULL rbs_ast_directives_use_wildcard_clause_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_namespace_t *RBS_NONNULL rbs_namespace, rbs_location_range namespace_range, rbs_location_range star_range);
rbs_ast_integer_t *RBS_NONNULL rbs_ast_integer_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_string_t string_representation);
rbs_ast_members_alias_t *RBS_NONNULL rbs_ast_members_alias_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL new_name, rbs_ast_symbol_t *RBS_NONNULL old_name, enum rbs_alias_kind kind, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range keyword_range, rbs_location_range new_name_range, rbs_location_range old_name_range);
rbs_ast_members_attr_accessor_t *RBS_NONNULL rbs_ast_members_attr_accessor_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, rbs_node_t *RBS_NONNULL type, rbs_attr_ivar_name_t ivar_name, enum rbs_attribute_kind kind, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, enum rbs_attribute_visibility visibility, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range colon_range);
rbs_ast_members_attr_reader_t *RBS_NONNULL rbs_ast_members_attr_reader_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, rbs_node_t *RBS_NONNULL type, rbs_attr_ivar_name_t ivar_name, enum rbs_attribute_kind kind, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, enum rbs_attribute_visibility visibility, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range colon_range);
rbs_ast_members_attr_writer_t *RBS_NONNULL rbs_ast_members_attr_writer_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, rbs_node_t *RBS_NONNULL type, rbs_attr_ivar_name_t ivar_name, enum rbs_attribute_kind kind, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, enum rbs_attribute_visibility visibility, rbs_location_range keyword_range, rbs_location_range name_range, rbs_location_range colon_range);
rbs_ast_members_class_instance_variable_t *RBS_NONNULL rbs_ast_members_class_instance_variable_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, rbs_node_t *RBS_NONNULL type, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range name_range, rbs_location_range colon_range);
rbs_ast_members_class_variable_t *RBS_NONNULL rbs_ast_members_class_variable_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, rbs_node_t *RBS_NONNULL type, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range name_range, rbs_location_range colon_range);
rbs_ast_members_extend_t *RBS_NONNULL rbs_ast_members_extend_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range name_range, rbs_location_range keyword_range);
rbs_ast_members_include_t *RBS_NONNULL rbs_ast_members_include_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range name_range, rbs_location_range keyword_range);
rbs_ast_members_instance_variable_t *RBS_NONNULL rbs_ast_members_instance_variable_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, rbs_node_t *RBS_NONNULL type, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range name_range, rbs_location_range colon_range);
rbs_ast_members_method_definition_t *RBS_NONNULL rbs_ast_members_method_definition_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, enum rbs_method_definition_kind kind, rbs_node_list_t *RBS_NONNULL overloads, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, bool overloading, enum rbs_method_definition_visibility visibility, rbs_location_range keyword_range, rbs_location_range name_range);
rbs_ast_members_method_definition_overload_t *RBS_NONNULL rbs_ast_members_method_definition_overload_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL annotations, rbs_node_t *RBS_NONNULL method_type);
rbs_ast_members_prepend_t *RBS_NONNULL rbs_ast_members_prepend_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_node_list_t *RBS_NONNULL annotations, rbs_ast_comment_t *RBS_NULLABLE comment, rbs_location_range name_range, rbs_location_range keyword_range);
rbs_ast_members_private_t *RBS_NONNULL rbs_ast_members_private_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
rbs_ast_members_public_t *RBS_NONNULL rbs_ast_members_public_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
rbs_ast_ruby_annotations_block_param_type_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_block_param_type_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range ampersand_location, rbs_location_range name_location, rbs_location_range colon_location, rbs_location_range question_location, rbs_location_range type_location, rbs_node_t *RBS_NONNULL type_, rbs_location_range comment_location);
rbs_ast_ruby_annotations_class_alias_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_class_alias_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range keyword_location, rbs_type_name_t *RBS_NULLABLE type_name, rbs_location_range type_name_location);
rbs_ast_ruby_annotations_colon_method_type_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_colon_method_type_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_list_t *RBS_NONNULL annotations, rbs_node_t *RBS_NONNULL method_type);
rbs_ast_ruby_annotations_double_splat_param_type_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_double_splat_param_type_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range star2_location, rbs_location_range name_location, rbs_location_range colon_location, rbs_node_t *RBS_NONNULL param_type, rbs_location_range comment_location);
rbs_ast_ruby_annotations_instance_variable_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_instance_variable_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_ast_symbol_t *RBS_NONNULL ivar_name, rbs_location_range ivar_name_location, rbs_location_range colon_location, rbs_node_t *RBS_NONNULL type, rbs_location_range comment_location);
rbs_ast_ruby_annotations_method_types_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_method_types_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_list_t *RBS_NONNULL overloads, rbs_location_range_list_t *RBS_NONNULL vertical_bar_locations, rbs_location_range dot3_location);
rbs_ast_ruby_annotations_module_alias_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_module_alias_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range keyword_location, rbs_type_name_t *RBS_NULLABLE type_name, rbs_location_range type_name_location);
rbs_ast_ruby_annotations_module_self_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_module_self_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range keyword_location, rbs_location_range colon_location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_location_range open_bracket_location, rbs_location_range close_bracket_location, rbs_location_range_list_t *RBS_NONNULL args_comma_locations, rbs_location_range comment_location);
rbs_ast_ruby_annotations_node_type_assertion_t *RBS_NONNULL rbs_ast_ruby_annotations_node_type_assertion_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_t *RBS_NONNULL type);
rbs_ast_ruby_annotations_param_type_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_param_type_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range name_location, rbs_location_range colon_location, rbs_node_t *RBS_NONNULL param_type, rbs_location_range comment_location);
rbs_ast_ruby_annotations_return_type_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_return_type_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range return_location, rbs_location_range colon_location, rbs_node_t *RBS_NONNULL return_type, rbs_location_range comment_location);
rbs_ast_ruby_annotations_skip_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_skip_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range skip_location, rbs_location_range comment_location);
rbs_ast_ruby_annotations_splat_param_type_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_splat_param_type_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range star_location, rbs_location_range name_location, rbs_location_range colon_location, rbs_node_t *RBS_NONNULL param_type, rbs_location_range comment_location);
rbs_ast_ruby_annotations_type_application_annotation_t *RBS_NONNULL rbs_ast_ruby_annotations_type_application_annotation_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_list_t *RBS_NONNULL type_args, rbs_location_range close_bracket_location, rbs_location_range_list_t *RBS_NONNULL comma_locations);
rbs_ast_string_t *RBS_NONNULL rbs_ast_string_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_string_t string);
rbs_ast_type_param_t *RBS_NONNULL rbs_ast_type_param_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name, enum rbs_type_param_variance variance, rbs_node_t *RBS_NULLABLE upper_bound, rbs_node_t *RBS_NULLABLE lower_bound, rbs_node_t *RBS_NULLABLE default_type, bool unchecked, rbs_location_range name_range);
rbs_method_type_t *RBS_NONNULL rbs_method_type_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL type_params, rbs_node_t *RBS_NONNULL type, rbs_types_block_t *RBS_NULLABLE block, rbs_location_range type_range);
rbs_namespace_t *RBS_NONNULL rbs_namespace_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL path, bool absolute);
rbs_signature_t *RBS_NONNULL rbs_signature_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL directives, rbs_node_list_t *RBS_NONNULL declarations);
rbs_type_name_t *RBS_NONNULL rbs_type_name_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_namespace_t *RBS_NONNULL rbs_namespace, rbs_ast_symbol_t *RBS_NONNULL name);
rbs_types_alias_t *RBS_NONNULL rbs_types_alias_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_location_range name_range);
rbs_types_bases_any_t *RBS_NONNULL rbs_types_bases_any_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, bool todo);
rbs_types_bases_bool_t *RBS_NONNULL rbs_types_bases_bool_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
rbs_types_bases_bottom_t *RBS_NONNULL rbs_types_bases_bottom_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
rbs_types_bases_class_t *RBS_NONNULL rbs_types_bases_class_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
rbs_types_bases_instance_t *RBS_NONNULL rbs_types_bases_instance_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
rbs_types_bases_nil_t *RBS_NONNULL rbs_types_bases_nil_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
rbs_types_bases_self_t *RBS_NONNULL rbs_types_bases_self_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
rbs_types_bases_top_t *RBS_NONNULL rbs_types_bases_top_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
rbs_types_bases_void_t *RBS_NONNULL rbs_types_bases_void_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
rbs_types_block_t *RBS_NONNULL rbs_types_block_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_t *RBS_NONNULL type, bool required, rbs_node_t *RBS_NULLABLE self_type);
rbs_types_class_instance_t *RBS_NONNULL rbs_types_class_instance_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_location_range name_range);
rbs_types_class_singleton_t *RBS_NONNULL rbs_types_class_singleton_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_location_range name_range);
rbs_types_function_t *RBS_NONNULL rbs_types_function_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL required_positionals, rbs_node_list_t *RBS_NONNULL optional_positionals, rbs_node_t *RBS_NULLABLE rest_positionals, rbs_node_list_t *RBS_NONNULL trailing_positionals, rbs_hash_t *RBS_NONNULL required_keywords, rbs_hash_t *RBS_NONNULL optional_keywords, rbs_node_t *RBS_NULLABLE rest_keywords, rbs_node_t *RBS_NULLABLE forwarding, rbs_node_t *RBS_NONNULL return_type);
rbs_types_function_forwarding_param_t *RBS_NONNULL rbs_types_function_forwarding_param_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location);
rbs_types_function_param_t *RBS_NONNULL rbs_types_function_param_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_t *RBS_NONNULL type, rbs_ast_symbol_t *RBS_NULLABLE name);
rbs_types_interface_t *RBS_NONNULL rbs_types_interface_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_type_name_t *RBS_NONNULL name, rbs_node_list_t *RBS_NONNULL args, rbs_location_range name_range);
rbs_types_intersection_t *RBS_NONNULL rbs_types_intersection_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL types);
rbs_types_literal_t *RBS_NONNULL rbs_types_literal_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_t *RBS_NONNULL literal);
rbs_types_optional_t *RBS_NONNULL rbs_types_optional_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_t *RBS_NONNULL type);
rbs_types_proc_t *RBS_NONNULL rbs_types_proc_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_t *RBS_NONNULL type, rbs_types_block_t *RBS_NULLABLE block, rbs_node_t *RBS_NULLABLE self_type);
rbs_types_record_t *RBS_NONNULL rbs_types_record_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_hash_t *RBS_NONNULL all_fields);
rbs_types_record_field_type_t *RBS_NONNULL rbs_types_record_field_type_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_t *RBS_NONNULL type, bool required);
rbs_types_tuple_t *RBS_NONNULL rbs_types_tuple_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL types);
rbs_types_union_t *RBS_NONNULL rbs_types_union_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_list_t *RBS_NONNULL types);
rbs_types_untyped_function_t *RBS_NONNULL rbs_types_untyped_function_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_node_t *RBS_NONNULL return_type);
rbs_types_variable_t *RBS_NONNULL rbs_types_variable_new(rbs_allocator_t *RBS_NONNULL allocator, rbs_location_range location, rbs_ast_symbol_t *RBS_NONNULL name);

#endif
