rbs 3.10.0 → 4.0.0.dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/comments.yml +3 -3
- data/.github/workflows/ruby.yml +24 -35
- data/.github/workflows/typecheck.yml +3 -1
- data/.github/workflows/windows.yml +2 -2
- data/.gitignore +0 -4
- data/CHANGELOG.md +0 -88
- data/README.md +1 -38
- data/Rakefile +20 -142
- data/Steepfile +1 -0
- data/config.yml +43 -1
- data/core/array.rbs +46 -100
- data/core/complex.rbs +21 -32
- data/core/dir.rbs +2 -2
- data/core/encoding.rbs +9 -6
- data/core/enumerable.rbs +3 -90
- data/core/enumerator.rbs +1 -18
- data/core/errno.rbs +0 -8
- data/core/errors.rbs +1 -28
- data/core/exception.rbs +2 -2
- data/core/fiber.rbs +4 -5
- data/core/file.rbs +12 -27
- data/core/file_test.rbs +1 -1
- data/core/float.rbs +22 -209
- data/core/gc.rbs +281 -417
- data/core/hash.rbs +727 -1024
- data/core/integer.rbs +38 -78
- data/core/io/buffer.rbs +7 -18
- data/core/io/wait.rbs +33 -11
- data/core/io.rbs +12 -14
- data/core/kernel.rbs +51 -57
- data/core/marshal.rbs +1 -1
- data/core/match_data.rbs +1 -1
- data/core/math.rbs +3 -42
- data/core/method.rbs +6 -14
- data/core/module.rbs +17 -88
- data/core/nil_class.rbs +3 -3
- data/core/numeric.rbs +16 -16
- data/core/object.rbs +3 -3
- data/core/object_space.rbs +15 -21
- data/core/proc.rbs +8 -15
- data/core/process.rbs +2 -2
- data/core/ractor.rbs +437 -278
- data/core/range.rbs +8 -7
- data/core/rational.rbs +24 -37
- data/core/rbs/unnamed/argf.rbs +2 -2
- data/core/rbs/unnamed/env_class.rbs +1 -1
- data/core/rbs/unnamed/random.rbs +2 -4
- data/core/regexp.rbs +20 -25
- data/core/ruby_vm.rbs +4 -6
- data/core/rubygems/errors.rbs +70 -3
- data/core/rubygems/rubygems.rbs +79 -11
- data/core/rubygems/version.rbs +3 -2
- data/core/set.rbs +359 -488
- data/core/string.rbs +1228 -3153
- data/core/struct.rbs +1 -1
- data/core/symbol.rbs +4 -4
- data/core/thread.rbs +29 -92
- data/core/time.rbs +9 -35
- data/core/trace_point.rbs +4 -7
- data/core/unbound_method.rbs +6 -14
- data/docs/collection.md +2 -2
- data/docs/gem.md +1 -0
- data/docs/sigs.md +3 -3
- data/ext/rbs_extension/ast_translation.c +1077 -944
- data/ext/rbs_extension/ast_translation.h +0 -7
- data/ext/rbs_extension/class_constants.c +83 -71
- data/ext/rbs_extension/class_constants.h +7 -4
- data/ext/rbs_extension/extconf.rb +2 -24
- data/ext/rbs_extension/legacy_location.c +172 -173
- data/ext/rbs_extension/legacy_location.h +3 -8
- data/ext/rbs_extension/main.c +289 -239
- data/ext/rbs_extension/rbs_extension.h +0 -3
- data/ext/rbs_extension/rbs_string_bridging.h +0 -4
- data/include/rbs/ast.h +98 -37
- data/include/rbs/defines.h +12 -38
- data/include/rbs/lexer.h +114 -126
- data/include/rbs/location.h +14 -14
- data/include/rbs/parser.h +37 -21
- data/include/rbs/string.h +5 -3
- data/include/rbs/util/rbs_allocator.h +19 -40
- data/include/rbs/util/rbs_assert.h +1 -12
- data/include/rbs/util/rbs_constant_pool.h +3 -3
- data/include/rbs/util/rbs_encoding.h +1 -3
- data/include/rbs/util/rbs_unescape.h +1 -2
- data/lib/rbs/ast/ruby/annotations.rb +119 -0
- data/lib/rbs/ast/ruby/comment_block.rb +221 -0
- data/lib/rbs/ast/ruby/declarations.rb +86 -0
- data/lib/rbs/ast/ruby/helpers/constant_helper.rb +24 -0
- data/lib/rbs/ast/ruby/helpers/location_helper.rb +15 -0
- data/lib/rbs/ast/ruby/members.rb +213 -0
- data/lib/rbs/buffer.rb +104 -24
- data/lib/rbs/cli/validate.rb +40 -35
- data/lib/rbs/cli.rb +5 -6
- data/lib/rbs/collection/config/lockfile_generator.rb +0 -1
- data/lib/rbs/collection.rb +0 -1
- data/lib/rbs/definition.rb +6 -1
- data/lib/rbs/definition_builder/ancestor_builder.rb +65 -62
- data/lib/rbs/definition_builder/method_builder.rb +45 -30
- data/lib/rbs/definition_builder.rb +44 -9
- data/lib/rbs/environment/class_entry.rb +69 -0
- data/lib/rbs/environment/module_entry.rb +66 -0
- data/lib/rbs/environment.rb +244 -218
- data/lib/rbs/environment_loader.rb +3 -3
- data/lib/rbs/errors.rb +5 -4
- data/lib/rbs/inline_parser/comment_association.rb +117 -0
- data/lib/rbs/inline_parser.rb +206 -0
- data/lib/rbs/location_aux.rb +35 -3
- data/lib/rbs/parser_aux.rb +11 -6
- data/lib/rbs/prototype/runtime.rb +2 -2
- data/lib/rbs/resolver/constant_resolver.rb +2 -2
- data/lib/rbs/resolver/type_name_resolver.rb +38 -124
- data/lib/rbs/source.rb +99 -0
- data/lib/rbs/subtractor.rb +4 -3
- data/lib/rbs/test/type_check.rb +0 -14
- data/lib/rbs/types.rb +1 -3
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs.rb +13 -1
- data/lib/rdoc/discover.rb +1 -1
- data/lib/rdoc_plugin/parser.rb +1 -1
- data/rbs.gemspec +1 -0
- data/sig/ancestor_builder.rbs +1 -1
- data/sig/ast/ruby/annotations.rbs +110 -0
- data/sig/ast/ruby/comment_block.rbs +119 -0
- data/sig/ast/ruby/declarations.rbs +60 -0
- data/sig/ast/ruby/helpers/constant_helper.rbs +11 -0
- data/sig/ast/ruby/helpers/location_helper.rbs +15 -0
- data/sig/ast/ruby/members.rbs +72 -0
- data/sig/buffer.rbs +63 -5
- data/sig/definition.rbs +1 -0
- data/sig/definition_builder.rbs +1 -1
- data/sig/environment/class_entry.rbs +50 -0
- data/sig/environment/module_entry.rbs +50 -0
- data/sig/environment.rbs +28 -133
- data/sig/errors.rbs +13 -6
- data/sig/inline_parser/comment_association.rbs +71 -0
- data/sig/inline_parser.rbs +87 -0
- data/sig/location.rbs +32 -7
- data/sig/manifest.yaml +1 -0
- data/sig/method_builder.rbs +7 -4
- data/sig/parser.rbs +16 -20
- data/sig/resolver/type_name_resolver.rbs +7 -38
- data/sig/source.rbs +48 -0
- data/sig/types.rbs +1 -4
- data/src/ast.c +290 -201
- data/src/lexer.c +2813 -2902
- data/src/lexer.re +4 -0
- data/src/lexstate.c +155 -169
- data/src/location.c +40 -40
- data/src/parser.c +2665 -2433
- data/src/string.c +48 -0
- data/src/util/rbs_allocator.c +77 -80
- data/src/util/rbs_assert.c +10 -10
- data/src/util/rbs_buffer.c +2 -2
- data/src/util/rbs_constant_pool.c +15 -13
- data/src/util/rbs_encoding.c +4062 -20097
- data/src/util/rbs_unescape.c +48 -85
- data/stdlib/bigdecimal/0/big_decimal.rbs +82 -100
- data/stdlib/bigdecimal-math/0/big_math.rbs +8 -169
- data/stdlib/cgi/0/core.rbs +396 -2
- data/stdlib/cgi/0/manifest.yaml +0 -1
- data/stdlib/coverage/0/coverage.rbs +1 -3
- data/stdlib/date/0/date.rbs +59 -67
- data/stdlib/date/0/date_time.rbs +1 -1
- data/stdlib/delegate/0/delegator.rbs +7 -10
- data/stdlib/erb/0/erb.rbs +347 -737
- data/stdlib/fileutils/0/fileutils.rbs +13 -18
- data/stdlib/forwardable/0/forwardable.rbs +0 -3
- data/stdlib/json/0/json.rbs +48 -68
- data/stdlib/net-http/0/net-http.rbs +0 -3
- data/stdlib/objspace/0/objspace.rbs +4 -9
- data/stdlib/open-uri/0/open-uri.rbs +0 -40
- data/stdlib/openssl/0/openssl.rbs +228 -331
- data/stdlib/optparse/0/optparse.rbs +3 -3
- data/{core → stdlib/pathname/0}/pathname.rbs +355 -255
- data/stdlib/psych/0/psych.rbs +3 -3
- data/stdlib/rdoc/0/rdoc.rbs +1 -1
- data/stdlib/resolv/0/resolv.rbs +68 -25
- data/stdlib/ripper/0/ripper.rbs +2 -5
- data/stdlib/singleton/0/singleton.rbs +0 -3
- data/stdlib/socket/0/socket.rbs +1 -13
- data/stdlib/socket/0/tcp_socket.rbs +2 -10
- data/stdlib/stringio/0/stringio.rbs +85 -1176
- data/stdlib/strscan/0/string_scanner.rbs +31 -31
- data/stdlib/tempfile/0/tempfile.rbs +3 -3
- data/stdlib/time/0/time.rbs +1 -1
- data/stdlib/timeout/0/timeout.rbs +7 -63
- data/stdlib/tsort/0/cyclic.rbs +0 -3
- data/stdlib/uri/0/common.rbs +2 -11
- data/stdlib/uri/0/file.rbs +1 -1
- data/stdlib/uri/0/generic.rbs +16 -17
- data/stdlib/uri/0/rfc2396_parser.rbs +7 -6
- data/stdlib/zlib/0/zstream.rbs +0 -1
- metadata +40 -12
- data/.clang-format +0 -74
- data/.clangd +0 -2
- data/.github/workflows/c-check.yml +0 -54
- data/core/ruby.rbs +0 -53
- data/docs/aliases.md +0 -79
- data/docs/encoding.md +0 -56
- data/ext/rbs_extension/compat.h +0 -10
- data/stdlib/cgi-escape/0/escape.rbs +0 -153
data/src/ast.c
CHANGED
|
@@ -11,144 +11,84 @@
|
|
|
11
11
|
#include <stdio.h>
|
|
12
12
|
#include <stdlib.h>
|
|
13
13
|
|
|
14
|
-
const char
|
|
14
|
+
const char* rbs_node_type_name(rbs_node_t *node) {
|
|
15
15
|
switch (node->type) {
|
|
16
|
-
|
|
17
|
-
return "RBS::AST::
|
|
18
|
-
|
|
19
|
-
return "RBS::AST::
|
|
20
|
-
|
|
21
|
-
return "RBS::AST::
|
|
22
|
-
|
|
23
|
-
return "RBS::AST::Declarations::
|
|
24
|
-
|
|
25
|
-
return "RBS::AST::Declarations::
|
|
26
|
-
|
|
27
|
-
return "RBS::AST::Declarations::
|
|
28
|
-
|
|
29
|
-
return "RBS::AST::
|
|
30
|
-
|
|
31
|
-
return "RBS::AST::
|
|
32
|
-
|
|
33
|
-
return "RBS::AST::
|
|
34
|
-
|
|
35
|
-
return "RBS::AST::
|
|
36
|
-
|
|
37
|
-
return "RBS::AST::
|
|
38
|
-
|
|
39
|
-
return "RBS::AST::
|
|
40
|
-
|
|
41
|
-
return "RBS::AST::
|
|
42
|
-
|
|
43
|
-
return "RBS::AST::
|
|
44
|
-
|
|
45
|
-
return "RBS::AST::
|
|
46
|
-
|
|
47
|
-
return "RBS::AST::
|
|
48
|
-
|
|
49
|
-
return "RBS::AST::
|
|
50
|
-
|
|
51
|
-
return "RBS::AST::
|
|
52
|
-
|
|
53
|
-
return "RBS::AST::
|
|
54
|
-
|
|
55
|
-
return "RBS::
|
|
56
|
-
|
|
57
|
-
return "RBS::
|
|
58
|
-
|
|
59
|
-
return "RBS::
|
|
60
|
-
|
|
61
|
-
return "RBS::
|
|
62
|
-
|
|
63
|
-
return "RBS::
|
|
64
|
-
|
|
65
|
-
return "RBS::
|
|
66
|
-
|
|
67
|
-
return "RBS::
|
|
68
|
-
|
|
69
|
-
return "RBS::
|
|
70
|
-
|
|
71
|
-
return "RBS::
|
|
72
|
-
|
|
73
|
-
return "RBS::
|
|
74
|
-
|
|
75
|
-
return "RBS::
|
|
76
|
-
|
|
77
|
-
return "RBS::
|
|
78
|
-
|
|
79
|
-
return "RBS::
|
|
80
|
-
|
|
81
|
-
return "RBS::
|
|
82
|
-
|
|
83
|
-
return "RBS::
|
|
84
|
-
|
|
85
|
-
return "
|
|
86
|
-
case RBS_SIGNATURE:
|
|
87
|
-
return "RBS::Signature";
|
|
88
|
-
case RBS_TYPE_NAME:
|
|
89
|
-
return "RBS::TypeName";
|
|
90
|
-
case RBS_TYPES_ALIAS:
|
|
91
|
-
return "RBS::Types::Alias";
|
|
92
|
-
case RBS_TYPES_BASES_ANY:
|
|
93
|
-
return "RBS::Types::Bases::Any";
|
|
94
|
-
case RBS_TYPES_BASES_BOOL:
|
|
95
|
-
return "RBS::Types::Bases::Bool";
|
|
96
|
-
case RBS_TYPES_BASES_BOTTOM:
|
|
97
|
-
return "RBS::Types::Bases::Bottom";
|
|
98
|
-
case RBS_TYPES_BASES_CLASS:
|
|
99
|
-
return "RBS::Types::Bases::Class";
|
|
100
|
-
case RBS_TYPES_BASES_INSTANCE:
|
|
101
|
-
return "RBS::Types::Bases::Instance";
|
|
102
|
-
case RBS_TYPES_BASES_NIL:
|
|
103
|
-
return "RBS::Types::Bases::Nil";
|
|
104
|
-
case RBS_TYPES_BASES_SELF:
|
|
105
|
-
return "RBS::Types::Bases::Self";
|
|
106
|
-
case RBS_TYPES_BASES_TOP:
|
|
107
|
-
return "RBS::Types::Bases::Top";
|
|
108
|
-
case RBS_TYPES_BASES_VOID:
|
|
109
|
-
return "RBS::Types::Bases::Void";
|
|
110
|
-
case RBS_TYPES_BLOCK:
|
|
111
|
-
return "RBS::Types::Block";
|
|
112
|
-
case RBS_TYPES_CLASS_INSTANCE:
|
|
113
|
-
return "RBS::Types::ClassInstance";
|
|
114
|
-
case RBS_TYPES_CLASS_SINGLETON:
|
|
115
|
-
return "RBS::Types::ClassSingleton";
|
|
116
|
-
case RBS_TYPES_FUNCTION:
|
|
117
|
-
return "RBS::Types::Function";
|
|
118
|
-
case RBS_TYPES_FUNCTION_PARAM:
|
|
119
|
-
return "RBS::Types::Function::Param";
|
|
120
|
-
case RBS_TYPES_INTERFACE:
|
|
121
|
-
return "RBS::Types::Interface";
|
|
122
|
-
case RBS_TYPES_INTERSECTION:
|
|
123
|
-
return "RBS::Types::Intersection";
|
|
124
|
-
case RBS_TYPES_LITERAL:
|
|
125
|
-
return "RBS::Types::Literal";
|
|
126
|
-
case RBS_TYPES_OPTIONAL:
|
|
127
|
-
return "RBS::Types::Optional";
|
|
128
|
-
case RBS_TYPES_PROC:
|
|
129
|
-
return "RBS::Types::Proc";
|
|
130
|
-
case RBS_TYPES_RECORD:
|
|
131
|
-
return "RBS::Types::Record";
|
|
132
|
-
case RBS_TYPES_RECORD_FIELD_TYPE:
|
|
133
|
-
return "RBS::Types::Record::FieldType";
|
|
134
|
-
case RBS_TYPES_TUPLE:
|
|
135
|
-
return "RBS::Types::Tuple";
|
|
136
|
-
case RBS_TYPES_UNION:
|
|
137
|
-
return "RBS::Types::Union";
|
|
138
|
-
case RBS_TYPES_UNTYPED_FUNCTION:
|
|
139
|
-
return "RBS::Types::UntypedFunction";
|
|
140
|
-
case RBS_TYPES_VARIABLE:
|
|
141
|
-
return "RBS::Types::Variable";
|
|
142
|
-
case RBS_AST_SYMBOL:
|
|
143
|
-
return "Symbol";
|
|
144
|
-
default:
|
|
145
|
-
return "Unknown";
|
|
16
|
+
case RBS_AST_ANNOTATION: return "RBS::AST::Annotation";
|
|
17
|
+
case RBS_AST_BOOL: return "RBS::AST::Bool";
|
|
18
|
+
case RBS_AST_COMMENT: return "RBS::AST::Comment";
|
|
19
|
+
case RBS_AST_DECLARATIONS_CLASS: return "RBS::AST::Declarations::Class";
|
|
20
|
+
case RBS_AST_DECLARATIONS_CLASS_SUPER: return "RBS::AST::Declarations::Class::Super";
|
|
21
|
+
case RBS_AST_DECLARATIONS_CLASS_ALIAS: return "RBS::AST::Declarations::ClassAlias";
|
|
22
|
+
case RBS_AST_DECLARATIONS_CONSTANT: return "RBS::AST::Declarations::Constant";
|
|
23
|
+
case RBS_AST_DECLARATIONS_GLOBAL: return "RBS::AST::Declarations::Global";
|
|
24
|
+
case RBS_AST_DECLARATIONS_INTERFACE: return "RBS::AST::Declarations::Interface";
|
|
25
|
+
case RBS_AST_DECLARATIONS_MODULE: return "RBS::AST::Declarations::Module";
|
|
26
|
+
case RBS_AST_DECLARATIONS_MODULE_SELF: return "RBS::AST::Declarations::Module::Self";
|
|
27
|
+
case RBS_AST_DECLARATIONS_MODULE_ALIAS: return "RBS::AST::Declarations::ModuleAlias";
|
|
28
|
+
case RBS_AST_DECLARATIONS_TYPE_ALIAS: return "RBS::AST::Declarations::TypeAlias";
|
|
29
|
+
case RBS_AST_DIRECTIVES_USE: return "RBS::AST::Directives::Use";
|
|
30
|
+
case RBS_AST_DIRECTIVES_USE_SINGLE_CLAUSE: return "RBS::AST::Directives::Use::SingleClause";
|
|
31
|
+
case RBS_AST_DIRECTIVES_USE_WILDCARD_CLAUSE: return "RBS::AST::Directives::Use::WildcardClause";
|
|
32
|
+
case RBS_AST_INTEGER: return "RBS::AST::Integer";
|
|
33
|
+
case RBS_AST_MEMBERS_ALIAS: return "RBS::AST::Members::Alias";
|
|
34
|
+
case RBS_AST_MEMBERS_ATTR_ACCESSOR: return "RBS::AST::Members::AttrAccessor";
|
|
35
|
+
case RBS_AST_MEMBERS_ATTR_READER: return "RBS::AST::Members::AttrReader";
|
|
36
|
+
case RBS_AST_MEMBERS_ATTR_WRITER: return "RBS::AST::Members::AttrWriter";
|
|
37
|
+
case RBS_AST_MEMBERS_CLASS_INSTANCE_VARIABLE: return "RBS::AST::Members::ClassInstanceVariable";
|
|
38
|
+
case RBS_AST_MEMBERS_CLASS_VARIABLE: return "RBS::AST::Members::ClassVariable";
|
|
39
|
+
case RBS_AST_MEMBERS_EXTEND: return "RBS::AST::Members::Extend";
|
|
40
|
+
case RBS_AST_MEMBERS_INCLUDE: return "RBS::AST::Members::Include";
|
|
41
|
+
case RBS_AST_MEMBERS_INSTANCE_VARIABLE: return "RBS::AST::Members::InstanceVariable";
|
|
42
|
+
case RBS_AST_MEMBERS_METHOD_DEFINITION: return "RBS::AST::Members::MethodDefinition";
|
|
43
|
+
case RBS_AST_MEMBERS_METHOD_DEFINITION_OVERLOAD: return "RBS::AST::Members::MethodDefinition::Overload";
|
|
44
|
+
case RBS_AST_MEMBERS_PREPEND: return "RBS::AST::Members::Prepend";
|
|
45
|
+
case RBS_AST_MEMBERS_PRIVATE: return "RBS::AST::Members::Private";
|
|
46
|
+
case RBS_AST_MEMBERS_PUBLIC: return "RBS::AST::Members::Public";
|
|
47
|
+
case RBS_AST_RUBY_ANNOTATIONS_COLON_METHOD_TYPE_ANNOTATION: return "RBS::AST::Ruby::Annotations::ColonMethodTypeAnnotation";
|
|
48
|
+
case RBS_AST_RUBY_ANNOTATIONS_METHOD_TYPES_ANNOTATION: return "RBS::AST::Ruby::Annotations::MethodTypesAnnotation";
|
|
49
|
+
case RBS_AST_RUBY_ANNOTATIONS_NODE_TYPE_ASSERTION: return "RBS::AST::Ruby::Annotations::NodeTypeAssertion";
|
|
50
|
+
case RBS_AST_RUBY_ANNOTATIONS_RETURN_TYPE_ANNOTATION: return "RBS::AST::Ruby::Annotations::ReturnTypeAnnotation";
|
|
51
|
+
case RBS_AST_RUBY_ANNOTATIONS_SKIP_ANNOTATION: return "RBS::AST::Ruby::Annotations::SkipAnnotation";
|
|
52
|
+
case RBS_AST_STRING: return "RBS::AST::String";
|
|
53
|
+
case RBS_AST_TYPE_PARAM: return "RBS::AST::TypeParam";
|
|
54
|
+
case RBS_METHOD_TYPE: return "RBS::MethodType";
|
|
55
|
+
case RBS_NAMESPACE: return "RBS::Namespace";
|
|
56
|
+
case RBS_SIGNATURE: return "RBS::Signature";
|
|
57
|
+
case RBS_TYPE_NAME: return "RBS::TypeName";
|
|
58
|
+
case RBS_TYPES_ALIAS: return "RBS::Types::Alias";
|
|
59
|
+
case RBS_TYPES_BASES_ANY: return "RBS::Types::Bases::Any";
|
|
60
|
+
case RBS_TYPES_BASES_BOOL: return "RBS::Types::Bases::Bool";
|
|
61
|
+
case RBS_TYPES_BASES_BOTTOM: return "RBS::Types::Bases::Bottom";
|
|
62
|
+
case RBS_TYPES_BASES_CLASS: return "RBS::Types::Bases::Class";
|
|
63
|
+
case RBS_TYPES_BASES_INSTANCE: return "RBS::Types::Bases::Instance";
|
|
64
|
+
case RBS_TYPES_BASES_NIL: return "RBS::Types::Bases::Nil";
|
|
65
|
+
case RBS_TYPES_BASES_SELF: return "RBS::Types::Bases::Self";
|
|
66
|
+
case RBS_TYPES_BASES_TOP: return "RBS::Types::Bases::Top";
|
|
67
|
+
case RBS_TYPES_BASES_VOID: return "RBS::Types::Bases::Void";
|
|
68
|
+
case RBS_TYPES_BLOCK: return "RBS::Types::Block";
|
|
69
|
+
case RBS_TYPES_CLASS_INSTANCE: return "RBS::Types::ClassInstance";
|
|
70
|
+
case RBS_TYPES_CLASS_SINGLETON: return "RBS::Types::ClassSingleton";
|
|
71
|
+
case RBS_TYPES_FUNCTION: return "RBS::Types::Function";
|
|
72
|
+
case RBS_TYPES_FUNCTION_PARAM: return "RBS::Types::Function::Param";
|
|
73
|
+
case RBS_TYPES_INTERFACE: return "RBS::Types::Interface";
|
|
74
|
+
case RBS_TYPES_INTERSECTION: return "RBS::Types::Intersection";
|
|
75
|
+
case RBS_TYPES_LITERAL: return "RBS::Types::Literal";
|
|
76
|
+
case RBS_TYPES_OPTIONAL: return "RBS::Types::Optional";
|
|
77
|
+
case RBS_TYPES_PROC: return "RBS::Types::Proc";
|
|
78
|
+
case RBS_TYPES_RECORD: return "RBS::Types::Record";
|
|
79
|
+
case RBS_TYPES_RECORD_FIELD_TYPE: return "RBS::Types::Record::FieldType";
|
|
80
|
+
case RBS_TYPES_TUPLE: return "RBS::Types::Tuple";
|
|
81
|
+
case RBS_TYPES_UNION: return "RBS::Types::Union";
|
|
82
|
+
case RBS_TYPES_UNTYPED_FUNCTION: return "RBS::Types::UntypedFunction";
|
|
83
|
+
case RBS_TYPES_VARIABLE: return "RBS::Types::Variable";
|
|
84
|
+
case RBS_AST_SYMBOL: return "Symbol";
|
|
85
|
+
default: return "Unknown";
|
|
146
86
|
}
|
|
147
87
|
}
|
|
148
88
|
|
|
149
89
|
/* rbs_node_list */
|
|
150
90
|
|
|
151
|
-
rbs_node_list_t
|
|
91
|
+
rbs_node_list_t* rbs_node_list_new(rbs_allocator_t *allocator) {
|
|
152
92
|
rbs_node_list_t *list = rbs_allocator_alloc(allocator, rbs_node_list_t);
|
|
153
93
|
*list = (rbs_node_list_t) {
|
|
154
94
|
.allocator = allocator,
|
|
@@ -180,7 +120,7 @@ void rbs_node_list_append(rbs_node_list_t *list, rbs_node_t *node) {
|
|
|
180
120
|
|
|
181
121
|
/* rbs_hash */
|
|
182
122
|
|
|
183
|
-
rbs_hash_t
|
|
123
|
+
rbs_hash_t* rbs_hash_new(rbs_allocator_t *allocator) {
|
|
184
124
|
rbs_hash_t *hash = rbs_allocator_alloc(allocator, rbs_hash_t);
|
|
185
125
|
*hash = (rbs_hash_t) {
|
|
186
126
|
.allocator = allocator,
|
|
@@ -198,11 +138,11 @@ bool rbs_node_equal(rbs_node_t *lhs, rbs_node_t *rhs) {
|
|
|
198
138
|
|
|
199
139
|
switch (lhs->type) {
|
|
200
140
|
case RBS_AST_SYMBOL:
|
|
201
|
-
return ((rbs_ast_symbol_t *)
|
|
141
|
+
return ((rbs_ast_symbol_t *)lhs)->constant_id == ((rbs_ast_symbol_t *) rhs)->constant_id;
|
|
202
142
|
case RBS_KEYWORD:
|
|
203
|
-
return ((rbs_keyword_t *)
|
|
143
|
+
return ((rbs_keyword_t *)lhs)->constant_id == ((rbs_keyword_t *) rhs)->constant_id;
|
|
204
144
|
case RBS_AST_BOOL:
|
|
205
|
-
return ((rbs_ast_bool_t *)
|
|
145
|
+
return ((rbs_ast_bool_t *)lhs)->value == ((rbs_ast_bool_t *) rhs)->value;
|
|
206
146
|
case RBS_AST_INTEGER:
|
|
207
147
|
return rbs_string_equal(((rbs_ast_integer_t *) lhs)->string_representation, ((rbs_ast_integer_t *) rhs)->string_representation);
|
|
208
148
|
case RBS_AST_STRING:
|
|
@@ -213,7 +153,7 @@ bool rbs_node_equal(rbs_node_t *lhs, rbs_node_t *rhs) {
|
|
|
213
153
|
}
|
|
214
154
|
}
|
|
215
155
|
|
|
216
|
-
rbs_hash_node_t
|
|
156
|
+
rbs_hash_node_t* rbs_hash_find(rbs_hash_t *hash, rbs_node_t *key) {
|
|
217
157
|
rbs_hash_node_t *current = hash->head;
|
|
218
158
|
|
|
219
159
|
while (current != NULL) {
|
|
@@ -247,7 +187,7 @@ void rbs_hash_set(rbs_hash_t *hash, rbs_node_t *key, rbs_node_t *value) {
|
|
|
247
187
|
}
|
|
248
188
|
}
|
|
249
189
|
|
|
250
|
-
rbs_node_t
|
|
190
|
+
rbs_node_t* rbs_hash_get(rbs_hash_t *hash, rbs_node_t *key) {
|
|
251
191
|
rbs_hash_node_t *node = rbs_hash_find(hash, key);
|
|
252
192
|
return node ? node->value : NULL;
|
|
253
193
|
}
|
|
@@ -280,10 +220,11 @@ rbs_ast_symbol_t *rbs_ast_symbol_new(rbs_allocator_t *allocator, rbs_location_t
|
|
|
280
220
|
return instance;
|
|
281
221
|
}
|
|
282
222
|
|
|
283
|
-
#line
|
|
223
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
284
224
|
rbs_ast_annotation_t *rbs_ast_annotation_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_string_t string) {
|
|
285
225
|
rbs_ast_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_annotation_t);
|
|
286
226
|
|
|
227
|
+
|
|
287
228
|
*instance = (rbs_ast_annotation_t) {
|
|
288
229
|
.base = (rbs_node_t) {
|
|
289
230
|
.type = RBS_AST_ANNOTATION,
|
|
@@ -294,10 +235,11 @@ rbs_ast_annotation_t *rbs_ast_annotation_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
294
235
|
|
|
295
236
|
return instance;
|
|
296
237
|
}
|
|
297
|
-
#line
|
|
238
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
298
239
|
rbs_ast_bool_t *rbs_ast_bool_new(rbs_allocator_t *allocator, rbs_location_t *location, bool value) {
|
|
299
240
|
rbs_ast_bool_t *instance = rbs_allocator_alloc(allocator, rbs_ast_bool_t);
|
|
300
241
|
|
|
242
|
+
|
|
301
243
|
*instance = (rbs_ast_bool_t) {
|
|
302
244
|
.base = (rbs_node_t) {
|
|
303
245
|
.type = RBS_AST_BOOL,
|
|
@@ -308,10 +250,11 @@ rbs_ast_bool_t *rbs_ast_bool_new(rbs_allocator_t *allocator, rbs_location_t *loc
|
|
|
308
250
|
|
|
309
251
|
return instance;
|
|
310
252
|
}
|
|
311
|
-
#line
|
|
253
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
312
254
|
rbs_ast_comment_t *rbs_ast_comment_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_string_t string) {
|
|
313
255
|
rbs_ast_comment_t *instance = rbs_allocator_alloc(allocator, rbs_ast_comment_t);
|
|
314
256
|
|
|
257
|
+
|
|
315
258
|
*instance = (rbs_ast_comment_t) {
|
|
316
259
|
.base = (rbs_node_t) {
|
|
317
260
|
.type = RBS_AST_COMMENT,
|
|
@@ -322,10 +265,11 @@ rbs_ast_comment_t *rbs_ast_comment_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
322
265
|
|
|
323
266
|
return instance;
|
|
324
267
|
}
|
|
325
|
-
#line
|
|
268
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
326
269
|
rbs_ast_declarations_class_t *rbs_ast_declarations_class_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *type_params, rbs_ast_declarations_class_super_t *super_class, rbs_node_list_t *members, rbs_node_list_t *annotations, rbs_ast_comment_t *comment) {
|
|
327
270
|
rbs_ast_declarations_class_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_t);
|
|
328
271
|
|
|
272
|
+
|
|
329
273
|
*instance = (rbs_ast_declarations_class_t) {
|
|
330
274
|
.base = (rbs_node_t) {
|
|
331
275
|
.type = RBS_AST_DECLARATIONS_CLASS,
|
|
@@ -341,10 +285,11 @@ rbs_ast_declarations_class_t *rbs_ast_declarations_class_new(rbs_allocator_t *al
|
|
|
341
285
|
|
|
342
286
|
return instance;
|
|
343
287
|
}
|
|
344
|
-
#line
|
|
288
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
345
289
|
rbs_ast_declarations_class_super_t *rbs_ast_declarations_class_super_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *args) {
|
|
346
290
|
rbs_ast_declarations_class_super_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_super_t);
|
|
347
291
|
|
|
292
|
+
|
|
348
293
|
*instance = (rbs_ast_declarations_class_super_t) {
|
|
349
294
|
.base = (rbs_node_t) {
|
|
350
295
|
.type = RBS_AST_DECLARATIONS_CLASS_SUPER,
|
|
@@ -356,10 +301,11 @@ rbs_ast_declarations_class_super_t *rbs_ast_declarations_class_super_new(rbs_all
|
|
|
356
301
|
|
|
357
302
|
return instance;
|
|
358
303
|
}
|
|
359
|
-
#line
|
|
304
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
360
305
|
rbs_ast_declarations_class_alias_t *rbs_ast_declarations_class_alias_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *new_name, rbs_type_name_t *old_name, rbs_ast_comment_t *comment, rbs_node_list_t *annotations) {
|
|
361
306
|
rbs_ast_declarations_class_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_class_alias_t);
|
|
362
307
|
|
|
308
|
+
|
|
363
309
|
*instance = (rbs_ast_declarations_class_alias_t) {
|
|
364
310
|
.base = (rbs_node_t) {
|
|
365
311
|
.type = RBS_AST_DECLARATIONS_CLASS_ALIAS,
|
|
@@ -373,10 +319,11 @@ rbs_ast_declarations_class_alias_t *rbs_ast_declarations_class_alias_new(rbs_all
|
|
|
373
319
|
|
|
374
320
|
return instance;
|
|
375
321
|
}
|
|
376
|
-
#line
|
|
322
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
377
323
|
rbs_ast_declarations_constant_t *rbs_ast_declarations_constant_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_t *type, rbs_ast_comment_t *comment, rbs_node_list_t *annotations) {
|
|
378
324
|
rbs_ast_declarations_constant_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_constant_t);
|
|
379
325
|
|
|
326
|
+
|
|
380
327
|
*instance = (rbs_ast_declarations_constant_t) {
|
|
381
328
|
.base = (rbs_node_t) {
|
|
382
329
|
.type = RBS_AST_DECLARATIONS_CONSTANT,
|
|
@@ -390,10 +337,11 @@ rbs_ast_declarations_constant_t *rbs_ast_declarations_constant_new(rbs_allocator
|
|
|
390
337
|
|
|
391
338
|
return instance;
|
|
392
339
|
}
|
|
393
|
-
#line
|
|
340
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
394
341
|
rbs_ast_declarations_global_t *rbs_ast_declarations_global_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_ast_comment_t *comment, rbs_node_list_t *annotations) {
|
|
395
342
|
rbs_ast_declarations_global_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_global_t);
|
|
396
343
|
|
|
344
|
+
|
|
397
345
|
*instance = (rbs_ast_declarations_global_t) {
|
|
398
346
|
.base = (rbs_node_t) {
|
|
399
347
|
.type = RBS_AST_DECLARATIONS_GLOBAL,
|
|
@@ -407,10 +355,11 @@ rbs_ast_declarations_global_t *rbs_ast_declarations_global_new(rbs_allocator_t *
|
|
|
407
355
|
|
|
408
356
|
return instance;
|
|
409
357
|
}
|
|
410
|
-
#line
|
|
358
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
411
359
|
rbs_ast_declarations_interface_t *rbs_ast_declarations_interface_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *type_params, rbs_node_list_t *members, rbs_node_list_t *annotations, rbs_ast_comment_t *comment) {
|
|
412
360
|
rbs_ast_declarations_interface_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_interface_t);
|
|
413
361
|
|
|
362
|
+
|
|
414
363
|
*instance = (rbs_ast_declarations_interface_t) {
|
|
415
364
|
.base = (rbs_node_t) {
|
|
416
365
|
.type = RBS_AST_DECLARATIONS_INTERFACE,
|
|
@@ -425,10 +374,11 @@ rbs_ast_declarations_interface_t *rbs_ast_declarations_interface_new(rbs_allocat
|
|
|
425
374
|
|
|
426
375
|
return instance;
|
|
427
376
|
}
|
|
428
|
-
#line
|
|
377
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
429
378
|
rbs_ast_declarations_module_t *rbs_ast_declarations_module_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *type_params, rbs_node_list_t *self_types, rbs_node_list_t *members, rbs_node_list_t *annotations, rbs_ast_comment_t *comment) {
|
|
430
379
|
rbs_ast_declarations_module_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_t);
|
|
431
380
|
|
|
381
|
+
|
|
432
382
|
*instance = (rbs_ast_declarations_module_t) {
|
|
433
383
|
.base = (rbs_node_t) {
|
|
434
384
|
.type = RBS_AST_DECLARATIONS_MODULE,
|
|
@@ -444,10 +394,11 @@ rbs_ast_declarations_module_t *rbs_ast_declarations_module_new(rbs_allocator_t *
|
|
|
444
394
|
|
|
445
395
|
return instance;
|
|
446
396
|
}
|
|
447
|
-
#line
|
|
397
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
448
398
|
rbs_ast_declarations_module_self_t *rbs_ast_declarations_module_self_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *args) {
|
|
449
399
|
rbs_ast_declarations_module_self_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_self_t);
|
|
450
400
|
|
|
401
|
+
|
|
451
402
|
*instance = (rbs_ast_declarations_module_self_t) {
|
|
452
403
|
.base = (rbs_node_t) {
|
|
453
404
|
.type = RBS_AST_DECLARATIONS_MODULE_SELF,
|
|
@@ -459,10 +410,11 @@ rbs_ast_declarations_module_self_t *rbs_ast_declarations_module_self_new(rbs_all
|
|
|
459
410
|
|
|
460
411
|
return instance;
|
|
461
412
|
}
|
|
462
|
-
#line
|
|
413
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
463
414
|
rbs_ast_declarations_module_alias_t *rbs_ast_declarations_module_alias_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *new_name, rbs_type_name_t *old_name, rbs_ast_comment_t *comment, rbs_node_list_t *annotations) {
|
|
464
415
|
rbs_ast_declarations_module_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_module_alias_t);
|
|
465
416
|
|
|
417
|
+
|
|
466
418
|
*instance = (rbs_ast_declarations_module_alias_t) {
|
|
467
419
|
.base = (rbs_node_t) {
|
|
468
420
|
.type = RBS_AST_DECLARATIONS_MODULE_ALIAS,
|
|
@@ -476,10 +428,11 @@ rbs_ast_declarations_module_alias_t *rbs_ast_declarations_module_alias_new(rbs_a
|
|
|
476
428
|
|
|
477
429
|
return instance;
|
|
478
430
|
}
|
|
479
|
-
#line
|
|
431
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
480
432
|
rbs_ast_declarations_type_alias_t *rbs_ast_declarations_type_alias_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *type_params, rbs_node_t *type, rbs_node_list_t *annotations, rbs_ast_comment_t *comment) {
|
|
481
433
|
rbs_ast_declarations_type_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_declarations_type_alias_t);
|
|
482
434
|
|
|
435
|
+
|
|
483
436
|
*instance = (rbs_ast_declarations_type_alias_t) {
|
|
484
437
|
.base = (rbs_node_t) {
|
|
485
438
|
.type = RBS_AST_DECLARATIONS_TYPE_ALIAS,
|
|
@@ -494,10 +447,11 @@ rbs_ast_declarations_type_alias_t *rbs_ast_declarations_type_alias_new(rbs_alloc
|
|
|
494
447
|
|
|
495
448
|
return instance;
|
|
496
449
|
}
|
|
497
|
-
#line
|
|
450
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
498
451
|
rbs_ast_directives_use_t *rbs_ast_directives_use_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *clauses) {
|
|
499
452
|
rbs_ast_directives_use_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_t);
|
|
500
453
|
|
|
454
|
+
|
|
501
455
|
*instance = (rbs_ast_directives_use_t) {
|
|
502
456
|
.base = (rbs_node_t) {
|
|
503
457
|
.type = RBS_AST_DIRECTIVES_USE,
|
|
@@ -508,10 +462,11 @@ rbs_ast_directives_use_t *rbs_ast_directives_use_new(rbs_allocator_t *allocator,
|
|
|
508
462
|
|
|
509
463
|
return instance;
|
|
510
464
|
}
|
|
511
|
-
#line
|
|
465
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
512
466
|
rbs_ast_directives_use_single_clause_t *rbs_ast_directives_use_single_clause_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *type_name, rbs_ast_symbol_t *new_name) {
|
|
513
467
|
rbs_ast_directives_use_single_clause_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_single_clause_t);
|
|
514
468
|
|
|
469
|
+
|
|
515
470
|
*instance = (rbs_ast_directives_use_single_clause_t) {
|
|
516
471
|
.base = (rbs_node_t) {
|
|
517
472
|
.type = RBS_AST_DIRECTIVES_USE_SINGLE_CLAUSE,
|
|
@@ -523,10 +478,11 @@ rbs_ast_directives_use_single_clause_t *rbs_ast_directives_use_single_clause_new
|
|
|
523
478
|
|
|
524
479
|
return instance;
|
|
525
480
|
}
|
|
526
|
-
#line
|
|
481
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
527
482
|
rbs_ast_directives_use_wildcard_clause_t *rbs_ast_directives_use_wildcard_clause_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_namespace_t *rbs_namespace) {
|
|
528
483
|
rbs_ast_directives_use_wildcard_clause_t *instance = rbs_allocator_alloc(allocator, rbs_ast_directives_use_wildcard_clause_t);
|
|
529
484
|
|
|
485
|
+
|
|
530
486
|
*instance = (rbs_ast_directives_use_wildcard_clause_t) {
|
|
531
487
|
.base = (rbs_node_t) {
|
|
532
488
|
.type = RBS_AST_DIRECTIVES_USE_WILDCARD_CLAUSE,
|
|
@@ -537,10 +493,11 @@ rbs_ast_directives_use_wildcard_clause_t *rbs_ast_directives_use_wildcard_clause
|
|
|
537
493
|
|
|
538
494
|
return instance;
|
|
539
495
|
}
|
|
540
|
-
#line
|
|
496
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
541
497
|
rbs_ast_integer_t *rbs_ast_integer_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_string_t string_representation) {
|
|
542
498
|
rbs_ast_integer_t *instance = rbs_allocator_alloc(allocator, rbs_ast_integer_t);
|
|
543
499
|
|
|
500
|
+
|
|
544
501
|
*instance = (rbs_ast_integer_t) {
|
|
545
502
|
.base = (rbs_node_t) {
|
|
546
503
|
.type = RBS_AST_INTEGER,
|
|
@@ -551,10 +508,11 @@ rbs_ast_integer_t *rbs_ast_integer_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
551
508
|
|
|
552
509
|
return instance;
|
|
553
510
|
}
|
|
554
|
-
#line
|
|
511
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
555
512
|
rbs_ast_members_alias_t *rbs_ast_members_alias_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *new_name, rbs_ast_symbol_t *old_name, rbs_keyword_t *kind, rbs_node_list_t *annotations, rbs_ast_comment_t *comment) {
|
|
556
513
|
rbs_ast_members_alias_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_alias_t);
|
|
557
514
|
|
|
515
|
+
|
|
558
516
|
*instance = (rbs_ast_members_alias_t) {
|
|
559
517
|
.base = (rbs_node_t) {
|
|
560
518
|
.type = RBS_AST_MEMBERS_ALIAS,
|
|
@@ -569,10 +527,11 @@ rbs_ast_members_alias_t *rbs_ast_members_alias_new(rbs_allocator_t *allocator, r
|
|
|
569
527
|
|
|
570
528
|
return instance;
|
|
571
529
|
}
|
|
572
|
-
#line
|
|
530
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
573
531
|
rbs_ast_members_attr_accessor_t *rbs_ast_members_attr_accessor_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_node_t *ivar_name, rbs_keyword_t *kind, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_keyword_t *visibility) {
|
|
574
532
|
rbs_ast_members_attr_accessor_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_accessor_t);
|
|
575
533
|
|
|
534
|
+
|
|
576
535
|
*instance = (rbs_ast_members_attr_accessor_t) {
|
|
577
536
|
.base = (rbs_node_t) {
|
|
578
537
|
.type = RBS_AST_MEMBERS_ATTR_ACCESSOR,
|
|
@@ -589,10 +548,11 @@ rbs_ast_members_attr_accessor_t *rbs_ast_members_attr_accessor_new(rbs_allocator
|
|
|
589
548
|
|
|
590
549
|
return instance;
|
|
591
550
|
}
|
|
592
|
-
#line
|
|
551
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
593
552
|
rbs_ast_members_attr_reader_t *rbs_ast_members_attr_reader_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_node_t *ivar_name, rbs_keyword_t *kind, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_keyword_t *visibility) {
|
|
594
553
|
rbs_ast_members_attr_reader_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_reader_t);
|
|
595
554
|
|
|
555
|
+
|
|
596
556
|
*instance = (rbs_ast_members_attr_reader_t) {
|
|
597
557
|
.base = (rbs_node_t) {
|
|
598
558
|
.type = RBS_AST_MEMBERS_ATTR_READER,
|
|
@@ -609,10 +569,11 @@ rbs_ast_members_attr_reader_t *rbs_ast_members_attr_reader_new(rbs_allocator_t *
|
|
|
609
569
|
|
|
610
570
|
return instance;
|
|
611
571
|
}
|
|
612
|
-
#line
|
|
572
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
613
573
|
rbs_ast_members_attr_writer_t *rbs_ast_members_attr_writer_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_node_t *ivar_name, rbs_keyword_t *kind, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, rbs_keyword_t *visibility) {
|
|
614
574
|
rbs_ast_members_attr_writer_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_attr_writer_t);
|
|
615
575
|
|
|
576
|
+
|
|
616
577
|
*instance = (rbs_ast_members_attr_writer_t) {
|
|
617
578
|
.base = (rbs_node_t) {
|
|
618
579
|
.type = RBS_AST_MEMBERS_ATTR_WRITER,
|
|
@@ -629,10 +590,11 @@ rbs_ast_members_attr_writer_t *rbs_ast_members_attr_writer_new(rbs_allocator_t *
|
|
|
629
590
|
|
|
630
591
|
return instance;
|
|
631
592
|
}
|
|
632
|
-
#line
|
|
593
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
633
594
|
rbs_ast_members_class_instance_variable_t *rbs_ast_members_class_instance_variable_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_ast_comment_t *comment) {
|
|
634
595
|
rbs_ast_members_class_instance_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_class_instance_variable_t);
|
|
635
596
|
|
|
597
|
+
|
|
636
598
|
*instance = (rbs_ast_members_class_instance_variable_t) {
|
|
637
599
|
.base = (rbs_node_t) {
|
|
638
600
|
.type = RBS_AST_MEMBERS_CLASS_INSTANCE_VARIABLE,
|
|
@@ -645,10 +607,11 @@ rbs_ast_members_class_instance_variable_t *rbs_ast_members_class_instance_variab
|
|
|
645
607
|
|
|
646
608
|
return instance;
|
|
647
609
|
}
|
|
648
|
-
#line
|
|
610
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
649
611
|
rbs_ast_members_class_variable_t *rbs_ast_members_class_variable_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_ast_comment_t *comment) {
|
|
650
612
|
rbs_ast_members_class_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_class_variable_t);
|
|
651
613
|
|
|
614
|
+
|
|
652
615
|
*instance = (rbs_ast_members_class_variable_t) {
|
|
653
616
|
.base = (rbs_node_t) {
|
|
654
617
|
.type = RBS_AST_MEMBERS_CLASS_VARIABLE,
|
|
@@ -661,10 +624,11 @@ rbs_ast_members_class_variable_t *rbs_ast_members_class_variable_new(rbs_allocat
|
|
|
661
624
|
|
|
662
625
|
return instance;
|
|
663
626
|
}
|
|
664
|
-
#line
|
|
627
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
665
628
|
rbs_ast_members_extend_t *rbs_ast_members_extend_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_node_list_t *annotations, rbs_ast_comment_t *comment) {
|
|
666
629
|
rbs_ast_members_extend_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_extend_t);
|
|
667
630
|
|
|
631
|
+
|
|
668
632
|
*instance = (rbs_ast_members_extend_t) {
|
|
669
633
|
.base = (rbs_node_t) {
|
|
670
634
|
.type = RBS_AST_MEMBERS_EXTEND,
|
|
@@ -678,10 +642,11 @@ rbs_ast_members_extend_t *rbs_ast_members_extend_new(rbs_allocator_t *allocator,
|
|
|
678
642
|
|
|
679
643
|
return instance;
|
|
680
644
|
}
|
|
681
|
-
#line
|
|
645
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
682
646
|
rbs_ast_members_include_t *rbs_ast_members_include_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_node_list_t *annotations, rbs_ast_comment_t *comment) {
|
|
683
647
|
rbs_ast_members_include_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_include_t);
|
|
684
648
|
|
|
649
|
+
|
|
685
650
|
*instance = (rbs_ast_members_include_t) {
|
|
686
651
|
.base = (rbs_node_t) {
|
|
687
652
|
.type = RBS_AST_MEMBERS_INCLUDE,
|
|
@@ -695,10 +660,11 @@ rbs_ast_members_include_t *rbs_ast_members_include_new(rbs_allocator_t *allocato
|
|
|
695
660
|
|
|
696
661
|
return instance;
|
|
697
662
|
}
|
|
698
|
-
#line
|
|
663
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
699
664
|
rbs_ast_members_instance_variable_t *rbs_ast_members_instance_variable_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_node_t *type, rbs_ast_comment_t *comment) {
|
|
700
665
|
rbs_ast_members_instance_variable_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_instance_variable_t);
|
|
701
666
|
|
|
667
|
+
|
|
702
668
|
*instance = (rbs_ast_members_instance_variable_t) {
|
|
703
669
|
.base = (rbs_node_t) {
|
|
704
670
|
.type = RBS_AST_MEMBERS_INSTANCE_VARIABLE,
|
|
@@ -711,10 +677,11 @@ rbs_ast_members_instance_variable_t *rbs_ast_members_instance_variable_new(rbs_a
|
|
|
711
677
|
|
|
712
678
|
return instance;
|
|
713
679
|
}
|
|
714
|
-
#line
|
|
680
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
715
681
|
rbs_ast_members_method_definition_t *rbs_ast_members_method_definition_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_keyword_t *kind, rbs_node_list_t *overloads, rbs_node_list_t *annotations, rbs_ast_comment_t *comment, bool overloading, rbs_keyword_t *visibility) {
|
|
716
682
|
rbs_ast_members_method_definition_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_method_definition_t);
|
|
717
683
|
|
|
684
|
+
|
|
718
685
|
*instance = (rbs_ast_members_method_definition_t) {
|
|
719
686
|
.base = (rbs_node_t) {
|
|
720
687
|
.type = RBS_AST_MEMBERS_METHOD_DEFINITION,
|
|
@@ -731,10 +698,11 @@ rbs_ast_members_method_definition_t *rbs_ast_members_method_definition_new(rbs_a
|
|
|
731
698
|
|
|
732
699
|
return instance;
|
|
733
700
|
}
|
|
734
|
-
#line
|
|
701
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
735
702
|
rbs_ast_members_method_definition_overload_t *rbs_ast_members_method_definition_overload_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *annotations, rbs_node_t *method_type) {
|
|
736
703
|
rbs_ast_members_method_definition_overload_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_method_definition_overload_t);
|
|
737
704
|
|
|
705
|
+
|
|
738
706
|
*instance = (rbs_ast_members_method_definition_overload_t) {
|
|
739
707
|
.base = (rbs_node_t) {
|
|
740
708
|
.type = RBS_AST_MEMBERS_METHOD_DEFINITION_OVERLOAD,
|
|
@@ -746,10 +714,11 @@ rbs_ast_members_method_definition_overload_t *rbs_ast_members_method_definition_
|
|
|
746
714
|
|
|
747
715
|
return instance;
|
|
748
716
|
}
|
|
749
|
-
#line
|
|
717
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
750
718
|
rbs_ast_members_prepend_t *rbs_ast_members_prepend_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *args, rbs_node_list_t *annotations, rbs_ast_comment_t *comment) {
|
|
751
719
|
rbs_ast_members_prepend_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_prepend_t);
|
|
752
720
|
|
|
721
|
+
|
|
753
722
|
*instance = (rbs_ast_members_prepend_t) {
|
|
754
723
|
.base = (rbs_node_t) {
|
|
755
724
|
.type = RBS_AST_MEMBERS_PREPEND,
|
|
@@ -763,10 +732,11 @@ rbs_ast_members_prepend_t *rbs_ast_members_prepend_new(rbs_allocator_t *allocato
|
|
|
763
732
|
|
|
764
733
|
return instance;
|
|
765
734
|
}
|
|
766
|
-
#line
|
|
735
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
767
736
|
rbs_ast_members_private_t *rbs_ast_members_private_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
|
768
737
|
rbs_ast_members_private_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_private_t);
|
|
769
738
|
|
|
739
|
+
|
|
770
740
|
*instance = (rbs_ast_members_private_t) {
|
|
771
741
|
.base = (rbs_node_t) {
|
|
772
742
|
.type = RBS_AST_MEMBERS_PRIVATE,
|
|
@@ -776,10 +746,11 @@ rbs_ast_members_private_t *rbs_ast_members_private_new(rbs_allocator_t *allocato
|
|
|
776
746
|
|
|
777
747
|
return instance;
|
|
778
748
|
}
|
|
779
|
-
#line
|
|
749
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
780
750
|
rbs_ast_members_public_t *rbs_ast_members_public_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
|
781
751
|
rbs_ast_members_public_t *instance = rbs_allocator_alloc(allocator, rbs_ast_members_public_t);
|
|
782
752
|
|
|
753
|
+
|
|
783
754
|
*instance = (rbs_ast_members_public_t) {
|
|
784
755
|
.base = (rbs_node_t) {
|
|
785
756
|
.type = RBS_AST_MEMBERS_PUBLIC,
|
|
@@ -789,10 +760,97 @@ rbs_ast_members_public_t *rbs_ast_members_public_new(rbs_allocator_t *allocator,
|
|
|
789
760
|
|
|
790
761
|
return instance;
|
|
791
762
|
}
|
|
792
|
-
#line
|
|
763
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
764
|
+
rbs_ast_ruby_annotations_colon_method_type_annotation_t *rbs_ast_ruby_annotations_colon_method_type_annotation_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_location_t *prefix_location, rbs_node_list_t *annotations, rbs_node_t *method_type) {
|
|
765
|
+
rbs_ast_ruby_annotations_colon_method_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_colon_method_type_annotation_t);
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
*instance = (rbs_ast_ruby_annotations_colon_method_type_annotation_t) {
|
|
769
|
+
.base = (rbs_node_t) {
|
|
770
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_COLON_METHOD_TYPE_ANNOTATION,
|
|
771
|
+
.location = location,
|
|
772
|
+
},
|
|
773
|
+
.prefix_location = prefix_location,
|
|
774
|
+
.annotations = annotations,
|
|
775
|
+
.method_type = method_type,
|
|
776
|
+
};
|
|
777
|
+
|
|
778
|
+
return instance;
|
|
779
|
+
}
|
|
780
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
781
|
+
rbs_ast_ruby_annotations_method_types_annotation_t *rbs_ast_ruby_annotations_method_types_annotation_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_location_t *prefix_location, rbs_node_list_t *overloads, rbs_location_list_t *vertical_bar_locations) {
|
|
782
|
+
rbs_ast_ruby_annotations_method_types_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_method_types_annotation_t);
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
*instance = (rbs_ast_ruby_annotations_method_types_annotation_t) {
|
|
786
|
+
.base = (rbs_node_t) {
|
|
787
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_METHOD_TYPES_ANNOTATION,
|
|
788
|
+
.location = location,
|
|
789
|
+
},
|
|
790
|
+
.prefix_location = prefix_location,
|
|
791
|
+
.overloads = overloads,
|
|
792
|
+
.vertical_bar_locations = vertical_bar_locations,
|
|
793
|
+
};
|
|
794
|
+
|
|
795
|
+
return instance;
|
|
796
|
+
}
|
|
797
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
798
|
+
rbs_ast_ruby_annotations_node_type_assertion_t *rbs_ast_ruby_annotations_node_type_assertion_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_location_t *prefix_location, rbs_node_t *type) {
|
|
799
|
+
rbs_ast_ruby_annotations_node_type_assertion_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_node_type_assertion_t);
|
|
800
|
+
|
|
801
|
+
|
|
802
|
+
*instance = (rbs_ast_ruby_annotations_node_type_assertion_t) {
|
|
803
|
+
.base = (rbs_node_t) {
|
|
804
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_NODE_TYPE_ASSERTION,
|
|
805
|
+
.location = location,
|
|
806
|
+
},
|
|
807
|
+
.prefix_location = prefix_location,
|
|
808
|
+
.type = type,
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
return instance;
|
|
812
|
+
}
|
|
813
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
814
|
+
rbs_ast_ruby_annotations_return_type_annotation_t *rbs_ast_ruby_annotations_return_type_annotation_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_location_t *prefix_location, rbs_location_t *return_location, rbs_location_t *colon_location, rbs_node_t *return_type, rbs_location_t *comment_location) {
|
|
815
|
+
rbs_ast_ruby_annotations_return_type_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_return_type_annotation_t);
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
*instance = (rbs_ast_ruby_annotations_return_type_annotation_t) {
|
|
819
|
+
.base = (rbs_node_t) {
|
|
820
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_RETURN_TYPE_ANNOTATION,
|
|
821
|
+
.location = location,
|
|
822
|
+
},
|
|
823
|
+
.prefix_location = prefix_location,
|
|
824
|
+
.return_location = return_location,
|
|
825
|
+
.colon_location = colon_location,
|
|
826
|
+
.return_type = return_type,
|
|
827
|
+
.comment_location = comment_location,
|
|
828
|
+
};
|
|
829
|
+
|
|
830
|
+
return instance;
|
|
831
|
+
}
|
|
832
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
833
|
+
rbs_ast_ruby_annotations_skip_annotation_t *rbs_ast_ruby_annotations_skip_annotation_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_location_t *prefix_location, rbs_location_t *skip_location, rbs_location_t *comment_location) {
|
|
834
|
+
rbs_ast_ruby_annotations_skip_annotation_t *instance = rbs_allocator_alloc(allocator, rbs_ast_ruby_annotations_skip_annotation_t);
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
*instance = (rbs_ast_ruby_annotations_skip_annotation_t) {
|
|
838
|
+
.base = (rbs_node_t) {
|
|
839
|
+
.type = RBS_AST_RUBY_ANNOTATIONS_SKIP_ANNOTATION,
|
|
840
|
+
.location = location,
|
|
841
|
+
},
|
|
842
|
+
.prefix_location = prefix_location,
|
|
843
|
+
.skip_location = skip_location,
|
|
844
|
+
.comment_location = comment_location,
|
|
845
|
+
};
|
|
846
|
+
|
|
847
|
+
return instance;
|
|
848
|
+
}
|
|
849
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
793
850
|
rbs_ast_string_t *rbs_ast_string_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_string_t string) {
|
|
794
851
|
rbs_ast_string_t *instance = rbs_allocator_alloc(allocator, rbs_ast_string_t);
|
|
795
852
|
|
|
853
|
+
|
|
796
854
|
*instance = (rbs_ast_string_t) {
|
|
797
855
|
.base = (rbs_node_t) {
|
|
798
856
|
.type = RBS_AST_STRING,
|
|
@@ -803,10 +861,11 @@ rbs_ast_string_t *rbs_ast_string_new(rbs_allocator_t *allocator, rbs_location_t
|
|
|
803
861
|
|
|
804
862
|
return instance;
|
|
805
863
|
}
|
|
806
|
-
#line
|
|
864
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
807
865
|
rbs_ast_type_param_t *rbs_ast_type_param_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name, rbs_keyword_t *variance, rbs_node_t *upper_bound, rbs_node_t *default_type, bool unchecked) {
|
|
808
866
|
rbs_ast_type_param_t *instance = rbs_allocator_alloc(allocator, rbs_ast_type_param_t);
|
|
809
867
|
|
|
868
|
+
|
|
810
869
|
*instance = (rbs_ast_type_param_t) {
|
|
811
870
|
.base = (rbs_node_t) {
|
|
812
871
|
.type = RBS_AST_TYPE_PARAM,
|
|
@@ -821,10 +880,11 @@ rbs_ast_type_param_t *rbs_ast_type_param_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
821
880
|
|
|
822
881
|
return instance;
|
|
823
882
|
}
|
|
824
|
-
#line
|
|
883
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
825
884
|
rbs_method_type_t *rbs_method_type_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *type_params, rbs_node_t *type, rbs_types_block_t *block) {
|
|
826
885
|
rbs_method_type_t *instance = rbs_allocator_alloc(allocator, rbs_method_type_t);
|
|
827
886
|
|
|
887
|
+
|
|
828
888
|
*instance = (rbs_method_type_t) {
|
|
829
889
|
.base = (rbs_node_t) {
|
|
830
890
|
.type = RBS_METHOD_TYPE,
|
|
@@ -837,10 +897,11 @@ rbs_method_type_t *rbs_method_type_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
837
897
|
|
|
838
898
|
return instance;
|
|
839
899
|
}
|
|
840
|
-
#line
|
|
900
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
841
901
|
rbs_namespace_t *rbs_namespace_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *path, bool absolute) {
|
|
842
902
|
rbs_namespace_t *instance = rbs_allocator_alloc(allocator, rbs_namespace_t);
|
|
843
903
|
|
|
904
|
+
|
|
844
905
|
*instance = (rbs_namespace_t) {
|
|
845
906
|
.base = (rbs_node_t) {
|
|
846
907
|
.type = RBS_NAMESPACE,
|
|
@@ -852,10 +913,11 @@ rbs_namespace_t *rbs_namespace_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
|
852
913
|
|
|
853
914
|
return instance;
|
|
854
915
|
}
|
|
855
|
-
#line
|
|
916
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
856
917
|
rbs_signature_t *rbs_signature_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *directives, rbs_node_list_t *declarations) {
|
|
857
918
|
rbs_signature_t *instance = rbs_allocator_alloc(allocator, rbs_signature_t);
|
|
858
919
|
|
|
920
|
+
|
|
859
921
|
*instance = (rbs_signature_t) {
|
|
860
922
|
.base = (rbs_node_t) {
|
|
861
923
|
.type = RBS_SIGNATURE,
|
|
@@ -867,10 +929,11 @@ rbs_signature_t *rbs_signature_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
|
867
929
|
|
|
868
930
|
return instance;
|
|
869
931
|
}
|
|
870
|
-
#line
|
|
932
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
871
933
|
rbs_type_name_t *rbs_type_name_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_namespace_t *rbs_namespace, rbs_ast_symbol_t *name) {
|
|
872
934
|
rbs_type_name_t *instance = rbs_allocator_alloc(allocator, rbs_type_name_t);
|
|
873
935
|
|
|
936
|
+
|
|
874
937
|
*instance = (rbs_type_name_t) {
|
|
875
938
|
.base = (rbs_node_t) {
|
|
876
939
|
.type = RBS_TYPE_NAME,
|
|
@@ -882,10 +945,11 @@ rbs_type_name_t *rbs_type_name_new(rbs_allocator_t *allocator, rbs_location_t *l
|
|
|
882
945
|
|
|
883
946
|
return instance;
|
|
884
947
|
}
|
|
885
|
-
#line
|
|
948
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
886
949
|
rbs_types_alias_t *rbs_types_alias_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *args) {
|
|
887
950
|
rbs_types_alias_t *instance = rbs_allocator_alloc(allocator, rbs_types_alias_t);
|
|
888
951
|
|
|
952
|
+
|
|
889
953
|
*instance = (rbs_types_alias_t) {
|
|
890
954
|
.base = (rbs_node_t) {
|
|
891
955
|
.type = RBS_TYPES_ALIAS,
|
|
@@ -897,10 +961,11 @@ rbs_types_alias_t *rbs_types_alias_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
897
961
|
|
|
898
962
|
return instance;
|
|
899
963
|
}
|
|
900
|
-
#line
|
|
964
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
901
965
|
rbs_types_bases_any_t *rbs_types_bases_any_new(rbs_allocator_t *allocator, rbs_location_t *location, bool todo) {
|
|
902
966
|
rbs_types_bases_any_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_any_t);
|
|
903
967
|
|
|
968
|
+
|
|
904
969
|
*instance = (rbs_types_bases_any_t) {
|
|
905
970
|
.base = (rbs_node_t) {
|
|
906
971
|
.type = RBS_TYPES_BASES_ANY,
|
|
@@ -911,10 +976,11 @@ rbs_types_bases_any_t *rbs_types_bases_any_new(rbs_allocator_t *allocator, rbs_l
|
|
|
911
976
|
|
|
912
977
|
return instance;
|
|
913
978
|
}
|
|
914
|
-
#line
|
|
979
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
915
980
|
rbs_types_bases_bool_t *rbs_types_bases_bool_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
|
916
981
|
rbs_types_bases_bool_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_bool_t);
|
|
917
982
|
|
|
983
|
+
|
|
918
984
|
*instance = (rbs_types_bases_bool_t) {
|
|
919
985
|
.base = (rbs_node_t) {
|
|
920
986
|
.type = RBS_TYPES_BASES_BOOL,
|
|
@@ -924,10 +990,11 @@ rbs_types_bases_bool_t *rbs_types_bases_bool_new(rbs_allocator_t *allocator, rbs
|
|
|
924
990
|
|
|
925
991
|
return instance;
|
|
926
992
|
}
|
|
927
|
-
#line
|
|
993
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
928
994
|
rbs_types_bases_bottom_t *rbs_types_bases_bottom_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
|
929
995
|
rbs_types_bases_bottom_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_bottom_t);
|
|
930
996
|
|
|
997
|
+
|
|
931
998
|
*instance = (rbs_types_bases_bottom_t) {
|
|
932
999
|
.base = (rbs_node_t) {
|
|
933
1000
|
.type = RBS_TYPES_BASES_BOTTOM,
|
|
@@ -937,10 +1004,11 @@ rbs_types_bases_bottom_t *rbs_types_bases_bottom_new(rbs_allocator_t *allocator,
|
|
|
937
1004
|
|
|
938
1005
|
return instance;
|
|
939
1006
|
}
|
|
940
|
-
#line
|
|
1007
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
941
1008
|
rbs_types_bases_class_t *rbs_types_bases_class_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
|
942
1009
|
rbs_types_bases_class_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_class_t);
|
|
943
1010
|
|
|
1011
|
+
|
|
944
1012
|
*instance = (rbs_types_bases_class_t) {
|
|
945
1013
|
.base = (rbs_node_t) {
|
|
946
1014
|
.type = RBS_TYPES_BASES_CLASS,
|
|
@@ -950,10 +1018,11 @@ rbs_types_bases_class_t *rbs_types_bases_class_new(rbs_allocator_t *allocator, r
|
|
|
950
1018
|
|
|
951
1019
|
return instance;
|
|
952
1020
|
}
|
|
953
|
-
#line
|
|
1021
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
954
1022
|
rbs_types_bases_instance_t *rbs_types_bases_instance_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
|
955
1023
|
rbs_types_bases_instance_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_instance_t);
|
|
956
1024
|
|
|
1025
|
+
|
|
957
1026
|
*instance = (rbs_types_bases_instance_t) {
|
|
958
1027
|
.base = (rbs_node_t) {
|
|
959
1028
|
.type = RBS_TYPES_BASES_INSTANCE,
|
|
@@ -963,10 +1032,11 @@ rbs_types_bases_instance_t *rbs_types_bases_instance_new(rbs_allocator_t *alloca
|
|
|
963
1032
|
|
|
964
1033
|
return instance;
|
|
965
1034
|
}
|
|
966
|
-
#line
|
|
1035
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
967
1036
|
rbs_types_bases_nil_t *rbs_types_bases_nil_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
|
968
1037
|
rbs_types_bases_nil_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_nil_t);
|
|
969
1038
|
|
|
1039
|
+
|
|
970
1040
|
*instance = (rbs_types_bases_nil_t) {
|
|
971
1041
|
.base = (rbs_node_t) {
|
|
972
1042
|
.type = RBS_TYPES_BASES_NIL,
|
|
@@ -976,10 +1046,11 @@ rbs_types_bases_nil_t *rbs_types_bases_nil_new(rbs_allocator_t *allocator, rbs_l
|
|
|
976
1046
|
|
|
977
1047
|
return instance;
|
|
978
1048
|
}
|
|
979
|
-
#line
|
|
1049
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
980
1050
|
rbs_types_bases_self_t *rbs_types_bases_self_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
|
981
1051
|
rbs_types_bases_self_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_self_t);
|
|
982
1052
|
|
|
1053
|
+
|
|
983
1054
|
*instance = (rbs_types_bases_self_t) {
|
|
984
1055
|
.base = (rbs_node_t) {
|
|
985
1056
|
.type = RBS_TYPES_BASES_SELF,
|
|
@@ -989,10 +1060,11 @@ rbs_types_bases_self_t *rbs_types_bases_self_new(rbs_allocator_t *allocator, rbs
|
|
|
989
1060
|
|
|
990
1061
|
return instance;
|
|
991
1062
|
}
|
|
992
|
-
#line
|
|
1063
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
993
1064
|
rbs_types_bases_top_t *rbs_types_bases_top_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
|
994
1065
|
rbs_types_bases_top_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_top_t);
|
|
995
1066
|
|
|
1067
|
+
|
|
996
1068
|
*instance = (rbs_types_bases_top_t) {
|
|
997
1069
|
.base = (rbs_node_t) {
|
|
998
1070
|
.type = RBS_TYPES_BASES_TOP,
|
|
@@ -1002,10 +1074,11 @@ rbs_types_bases_top_t *rbs_types_bases_top_new(rbs_allocator_t *allocator, rbs_l
|
|
|
1002
1074
|
|
|
1003
1075
|
return instance;
|
|
1004
1076
|
}
|
|
1005
|
-
#line
|
|
1077
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
1006
1078
|
rbs_types_bases_void_t *rbs_types_bases_void_new(rbs_allocator_t *allocator, rbs_location_t *location) {
|
|
1007
1079
|
rbs_types_bases_void_t *instance = rbs_allocator_alloc(allocator, rbs_types_bases_void_t);
|
|
1008
1080
|
|
|
1081
|
+
|
|
1009
1082
|
*instance = (rbs_types_bases_void_t) {
|
|
1010
1083
|
.base = (rbs_node_t) {
|
|
1011
1084
|
.type = RBS_TYPES_BASES_VOID,
|
|
@@ -1015,10 +1088,11 @@ rbs_types_bases_void_t *rbs_types_bases_void_new(rbs_allocator_t *allocator, rbs
|
|
|
1015
1088
|
|
|
1016
1089
|
return instance;
|
|
1017
1090
|
}
|
|
1018
|
-
#line
|
|
1091
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
1019
1092
|
rbs_types_block_t *rbs_types_block_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_t *type, bool required, rbs_node_t *self_type) {
|
|
1020
1093
|
rbs_types_block_t *instance = rbs_allocator_alloc(allocator, rbs_types_block_t);
|
|
1021
1094
|
|
|
1095
|
+
|
|
1022
1096
|
*instance = (rbs_types_block_t) {
|
|
1023
1097
|
.base = (rbs_node_t) {
|
|
1024
1098
|
.type = RBS_TYPES_BLOCK,
|
|
@@ -1031,10 +1105,11 @@ rbs_types_block_t *rbs_types_block_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
1031
1105
|
|
|
1032
1106
|
return instance;
|
|
1033
1107
|
}
|
|
1034
|
-
#line
|
|
1108
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
1035
1109
|
rbs_types_class_instance_t *rbs_types_class_instance_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *args) {
|
|
1036
1110
|
rbs_types_class_instance_t *instance = rbs_allocator_alloc(allocator, rbs_types_class_instance_t);
|
|
1037
1111
|
|
|
1112
|
+
|
|
1038
1113
|
*instance = (rbs_types_class_instance_t) {
|
|
1039
1114
|
.base = (rbs_node_t) {
|
|
1040
1115
|
.type = RBS_TYPES_CLASS_INSTANCE,
|
|
@@ -1046,10 +1121,11 @@ rbs_types_class_instance_t *rbs_types_class_instance_new(rbs_allocator_t *alloca
|
|
|
1046
1121
|
|
|
1047
1122
|
return instance;
|
|
1048
1123
|
}
|
|
1049
|
-
#line
|
|
1124
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
1050
1125
|
rbs_types_class_singleton_t *rbs_types_class_singleton_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name) {
|
|
1051
1126
|
rbs_types_class_singleton_t *instance = rbs_allocator_alloc(allocator, rbs_types_class_singleton_t);
|
|
1052
1127
|
|
|
1128
|
+
|
|
1053
1129
|
*instance = (rbs_types_class_singleton_t) {
|
|
1054
1130
|
.base = (rbs_node_t) {
|
|
1055
1131
|
.type = RBS_TYPES_CLASS_SINGLETON,
|
|
@@ -1060,10 +1136,11 @@ rbs_types_class_singleton_t *rbs_types_class_singleton_new(rbs_allocator_t *allo
|
|
|
1060
1136
|
|
|
1061
1137
|
return instance;
|
|
1062
1138
|
}
|
|
1063
|
-
#line
|
|
1139
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
1064
1140
|
rbs_types_function_t *rbs_types_function_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *required_positionals, rbs_node_list_t *optional_positionals, rbs_node_t *rest_positionals, rbs_node_list_t *trailing_positionals, rbs_hash_t *required_keywords, rbs_hash_t *optional_keywords, rbs_node_t *rest_keywords, rbs_node_t *return_type) {
|
|
1065
1141
|
rbs_types_function_t *instance = rbs_allocator_alloc(allocator, rbs_types_function_t);
|
|
1066
1142
|
|
|
1143
|
+
|
|
1067
1144
|
*instance = (rbs_types_function_t) {
|
|
1068
1145
|
.base = (rbs_node_t) {
|
|
1069
1146
|
.type = RBS_TYPES_FUNCTION,
|
|
@@ -1081,10 +1158,11 @@ rbs_types_function_t *rbs_types_function_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
1081
1158
|
|
|
1082
1159
|
return instance;
|
|
1083
1160
|
}
|
|
1084
|
-
#line
|
|
1161
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
1085
1162
|
rbs_types_function_param_t *rbs_types_function_param_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_t *type, rbs_ast_symbol_t *name) {
|
|
1086
1163
|
rbs_types_function_param_t *instance = rbs_allocator_alloc(allocator, rbs_types_function_param_t);
|
|
1087
1164
|
|
|
1165
|
+
|
|
1088
1166
|
*instance = (rbs_types_function_param_t) {
|
|
1089
1167
|
.base = (rbs_node_t) {
|
|
1090
1168
|
.type = RBS_TYPES_FUNCTION_PARAM,
|
|
@@ -1096,10 +1174,11 @@ rbs_types_function_param_t *rbs_types_function_param_new(rbs_allocator_t *alloca
|
|
|
1096
1174
|
|
|
1097
1175
|
return instance;
|
|
1098
1176
|
}
|
|
1099
|
-
#line
|
|
1177
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
1100
1178
|
rbs_types_interface_t *rbs_types_interface_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_type_name_t *name, rbs_node_list_t *args) {
|
|
1101
1179
|
rbs_types_interface_t *instance = rbs_allocator_alloc(allocator, rbs_types_interface_t);
|
|
1102
1180
|
|
|
1181
|
+
|
|
1103
1182
|
*instance = (rbs_types_interface_t) {
|
|
1104
1183
|
.base = (rbs_node_t) {
|
|
1105
1184
|
.type = RBS_TYPES_INTERFACE,
|
|
@@ -1111,10 +1190,11 @@ rbs_types_interface_t *rbs_types_interface_new(rbs_allocator_t *allocator, rbs_l
|
|
|
1111
1190
|
|
|
1112
1191
|
return instance;
|
|
1113
1192
|
}
|
|
1114
|
-
#line
|
|
1193
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
1115
1194
|
rbs_types_intersection_t *rbs_types_intersection_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *types) {
|
|
1116
1195
|
rbs_types_intersection_t *instance = rbs_allocator_alloc(allocator, rbs_types_intersection_t);
|
|
1117
1196
|
|
|
1197
|
+
|
|
1118
1198
|
*instance = (rbs_types_intersection_t) {
|
|
1119
1199
|
.base = (rbs_node_t) {
|
|
1120
1200
|
.type = RBS_TYPES_INTERSECTION,
|
|
@@ -1125,10 +1205,11 @@ rbs_types_intersection_t *rbs_types_intersection_new(rbs_allocator_t *allocator,
|
|
|
1125
1205
|
|
|
1126
1206
|
return instance;
|
|
1127
1207
|
}
|
|
1128
|
-
#line
|
|
1208
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
1129
1209
|
rbs_types_literal_t *rbs_types_literal_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_t *literal) {
|
|
1130
1210
|
rbs_types_literal_t *instance = rbs_allocator_alloc(allocator, rbs_types_literal_t);
|
|
1131
1211
|
|
|
1212
|
+
|
|
1132
1213
|
*instance = (rbs_types_literal_t) {
|
|
1133
1214
|
.base = (rbs_node_t) {
|
|
1134
1215
|
.type = RBS_TYPES_LITERAL,
|
|
@@ -1139,10 +1220,11 @@ rbs_types_literal_t *rbs_types_literal_new(rbs_allocator_t *allocator, rbs_locat
|
|
|
1139
1220
|
|
|
1140
1221
|
return instance;
|
|
1141
1222
|
}
|
|
1142
|
-
#line
|
|
1223
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
1143
1224
|
rbs_types_optional_t *rbs_types_optional_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_t *type) {
|
|
1144
1225
|
rbs_types_optional_t *instance = rbs_allocator_alloc(allocator, rbs_types_optional_t);
|
|
1145
1226
|
|
|
1227
|
+
|
|
1146
1228
|
*instance = (rbs_types_optional_t) {
|
|
1147
1229
|
.base = (rbs_node_t) {
|
|
1148
1230
|
.type = RBS_TYPES_OPTIONAL,
|
|
@@ -1153,10 +1235,11 @@ rbs_types_optional_t *rbs_types_optional_new(rbs_allocator_t *allocator, rbs_loc
|
|
|
1153
1235
|
|
|
1154
1236
|
return instance;
|
|
1155
1237
|
}
|
|
1156
|
-
#line
|
|
1238
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
1157
1239
|
rbs_types_proc_t *rbs_types_proc_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_t *type, rbs_types_block_t *block, rbs_node_t *self_type) {
|
|
1158
1240
|
rbs_types_proc_t *instance = rbs_allocator_alloc(allocator, rbs_types_proc_t);
|
|
1159
1241
|
|
|
1242
|
+
|
|
1160
1243
|
*instance = (rbs_types_proc_t) {
|
|
1161
1244
|
.base = (rbs_node_t) {
|
|
1162
1245
|
.type = RBS_TYPES_PROC,
|
|
@@ -1169,10 +1252,11 @@ rbs_types_proc_t *rbs_types_proc_new(rbs_allocator_t *allocator, rbs_location_t
|
|
|
1169
1252
|
|
|
1170
1253
|
return instance;
|
|
1171
1254
|
}
|
|
1172
|
-
#line
|
|
1255
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
1173
1256
|
rbs_types_record_t *rbs_types_record_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_hash_t *all_fields) {
|
|
1174
1257
|
rbs_types_record_t *instance = rbs_allocator_alloc(allocator, rbs_types_record_t);
|
|
1175
1258
|
|
|
1259
|
+
|
|
1176
1260
|
*instance = (rbs_types_record_t) {
|
|
1177
1261
|
.base = (rbs_node_t) {
|
|
1178
1262
|
.type = RBS_TYPES_RECORD,
|
|
@@ -1183,10 +1267,11 @@ rbs_types_record_t *rbs_types_record_new(rbs_allocator_t *allocator, rbs_locatio
|
|
|
1183
1267
|
|
|
1184
1268
|
return instance;
|
|
1185
1269
|
}
|
|
1186
|
-
#line
|
|
1270
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
1187
1271
|
rbs_types_record_field_type_t *rbs_types_record_field_type_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_t *type, bool required) {
|
|
1188
1272
|
rbs_types_record_field_type_t *instance = rbs_allocator_alloc(allocator, rbs_types_record_field_type_t);
|
|
1189
1273
|
|
|
1274
|
+
|
|
1190
1275
|
*instance = (rbs_types_record_field_type_t) {
|
|
1191
1276
|
.base = (rbs_node_t) {
|
|
1192
1277
|
.type = RBS_TYPES_RECORD_FIELD_TYPE,
|
|
@@ -1198,10 +1283,11 @@ rbs_types_record_field_type_t *rbs_types_record_field_type_new(rbs_allocator_t *
|
|
|
1198
1283
|
|
|
1199
1284
|
return instance;
|
|
1200
1285
|
}
|
|
1201
|
-
#line
|
|
1286
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
1202
1287
|
rbs_types_tuple_t *rbs_types_tuple_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *types) {
|
|
1203
1288
|
rbs_types_tuple_t *instance = rbs_allocator_alloc(allocator, rbs_types_tuple_t);
|
|
1204
1289
|
|
|
1290
|
+
|
|
1205
1291
|
*instance = (rbs_types_tuple_t) {
|
|
1206
1292
|
.base = (rbs_node_t) {
|
|
1207
1293
|
.type = RBS_TYPES_TUPLE,
|
|
@@ -1212,10 +1298,11 @@ rbs_types_tuple_t *rbs_types_tuple_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
1212
1298
|
|
|
1213
1299
|
return instance;
|
|
1214
1300
|
}
|
|
1215
|
-
#line
|
|
1301
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
1216
1302
|
rbs_types_union_t *rbs_types_union_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_list_t *types) {
|
|
1217
1303
|
rbs_types_union_t *instance = rbs_allocator_alloc(allocator, rbs_types_union_t);
|
|
1218
1304
|
|
|
1305
|
+
|
|
1219
1306
|
*instance = (rbs_types_union_t) {
|
|
1220
1307
|
.base = (rbs_node_t) {
|
|
1221
1308
|
.type = RBS_TYPES_UNION,
|
|
@@ -1226,10 +1313,11 @@ rbs_types_union_t *rbs_types_union_new(rbs_allocator_t *allocator, rbs_location_
|
|
|
1226
1313
|
|
|
1227
1314
|
return instance;
|
|
1228
1315
|
}
|
|
1229
|
-
#line
|
|
1316
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
1230
1317
|
rbs_types_untyped_function_t *rbs_types_untyped_function_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_node_t *return_type) {
|
|
1231
1318
|
rbs_types_untyped_function_t *instance = rbs_allocator_alloc(allocator, rbs_types_untyped_function_t);
|
|
1232
1319
|
|
|
1320
|
+
|
|
1233
1321
|
*instance = (rbs_types_untyped_function_t) {
|
|
1234
1322
|
.base = (rbs_node_t) {
|
|
1235
1323
|
.type = RBS_TYPES_UNTYPED_FUNCTION,
|
|
@@ -1240,10 +1328,11 @@ rbs_types_untyped_function_t *rbs_types_untyped_function_new(rbs_allocator_t *al
|
|
|
1240
1328
|
|
|
1241
1329
|
return instance;
|
|
1242
1330
|
}
|
|
1243
|
-
#line
|
|
1331
|
+
#line 153 "prism/templates/src/ast.c.erb"
|
|
1244
1332
|
rbs_types_variable_t *rbs_types_variable_new(rbs_allocator_t *allocator, rbs_location_t *location, rbs_ast_symbol_t *name) {
|
|
1245
1333
|
rbs_types_variable_t *instance = rbs_allocator_alloc(allocator, rbs_types_variable_t);
|
|
1246
1334
|
|
|
1335
|
+
|
|
1247
1336
|
*instance = (rbs_types_variable_t) {
|
|
1248
1337
|
.base = (rbs_node_t) {
|
|
1249
1338
|
.type = RBS_TYPES_VARIABLE,
|