@@ -86,82 +86,86 @@ VALUE RBS_Types_Variable;
8686
8787VALUE RBS_ParsingError ;
8888
89- #define IMPORT_CONSTANT (var , parent , name ) { var = rb_const_get(parent, rb_intern(name)); rb_gc_register_mark_object(var); }
89+ #define IMPORT_CONSTANT (var , parent , name ) \
90+ { \
91+ var = rb_const_get(parent, rb_intern(name)); \
92+ rb_gc_register_mark_object(var); \
93+ }
9094
9195void rbs__init_constants (void ) {
92- IMPORT_CONSTANT (RBS , rb_cObject , "RBS" );
93- IMPORT_CONSTANT (RBS_ParsingError , RBS , "ParsingError" );
96+ IMPORT_CONSTANT (RBS , rb_cObject , "RBS" );
97+ IMPORT_CONSTANT (RBS_ParsingError , RBS , "ParsingError" );
9498
95- IMPORT_CONSTANT (RBS_AST , RBS , "AST" );
96- IMPORT_CONSTANT (RBS_AST_Declarations , RBS_AST , "Declarations" );
97- IMPORT_CONSTANT (RBS_AST_Directives , RBS_AST , "Directives" );
98- IMPORT_CONSTANT (RBS_AST_Members , RBS_AST , "Members" );
99- IMPORT_CONSTANT (RBS_AST_Ruby , RBS_AST , "Ruby" );
100- IMPORT_CONSTANT (RBS_AST_Ruby_Annotations , RBS_AST_Ruby , "Annotations" );
101- IMPORT_CONSTANT (RBS_Types , RBS , "Types" );
102- IMPORT_CONSTANT (RBS_Types_Bases , RBS_Types , "Bases" );
99+ IMPORT_CONSTANT (RBS_AST , RBS , "AST" );
100+ IMPORT_CONSTANT (RBS_AST_Declarations , RBS_AST , "Declarations" );
101+ IMPORT_CONSTANT (RBS_AST_Directives , RBS_AST , "Directives" );
102+ IMPORT_CONSTANT (RBS_AST_Members , RBS_AST , "Members" );
103+ IMPORT_CONSTANT (RBS_AST_Ruby , RBS_AST , "Ruby" );
104+ IMPORT_CONSTANT (RBS_AST_Ruby_Annotations , RBS_AST_Ruby , "Annotations" );
105+ IMPORT_CONSTANT (RBS_Types , RBS , "Types" );
106+ IMPORT_CONSTANT (RBS_Types_Bases , RBS_Types , "Bases" );
103107
104- IMPORT_CONSTANT (RBS_AST_Annotation , RBS_AST , "Annotation" );
105- IMPORT_CONSTANT (RBS_AST_Comment , RBS_AST , "Comment" );
106- IMPORT_CONSTANT (RBS_AST_Declarations_Class , RBS_AST_Declarations , "Class" );
107- IMPORT_CONSTANT (RBS_AST_Declarations_Class_Super , RBS_AST_Declarations_Class , "Super" );
108- IMPORT_CONSTANT (RBS_AST_Declarations_ClassAlias , RBS_AST_Declarations , "ClassAlias" );
109- IMPORT_CONSTANT (RBS_AST_Declarations_Constant , RBS_AST_Declarations , "Constant" );
110- IMPORT_CONSTANT (RBS_AST_Declarations_Global , RBS_AST_Declarations , "Global" );
111- IMPORT_CONSTANT (RBS_AST_Declarations_Interface , RBS_AST_Declarations , "Interface" );
112- IMPORT_CONSTANT (RBS_AST_Declarations_Module , RBS_AST_Declarations , "Module" );
113- IMPORT_CONSTANT (RBS_AST_Declarations_Module_Self , RBS_AST_Declarations_Module , "Self" );
114- IMPORT_CONSTANT (RBS_AST_Declarations_ModuleAlias , RBS_AST_Declarations , "ModuleAlias" );
115- IMPORT_CONSTANT (RBS_AST_Declarations_TypeAlias , RBS_AST_Declarations , "TypeAlias" );
116- IMPORT_CONSTANT (RBS_AST_Directives_Use , RBS_AST_Directives , "Use" );
117- IMPORT_CONSTANT (RBS_AST_Directives_Use_SingleClause , RBS_AST_Directives_Use , "SingleClause" );
118- IMPORT_CONSTANT (RBS_AST_Directives_Use_WildcardClause , RBS_AST_Directives_Use , "WildcardClause" );
119- IMPORT_CONSTANT (RBS_AST_Members_Alias , RBS_AST_Members , "Alias" );
120- IMPORT_CONSTANT (RBS_AST_Members_AttrAccessor , RBS_AST_Members , "AttrAccessor" );
121- IMPORT_CONSTANT (RBS_AST_Members_AttrReader , RBS_AST_Members , "AttrReader" );
122- IMPORT_CONSTANT (RBS_AST_Members_AttrWriter , RBS_AST_Members , "AttrWriter" );
123- IMPORT_CONSTANT (RBS_AST_Members_ClassInstanceVariable , RBS_AST_Members , "ClassInstanceVariable" );
124- IMPORT_CONSTANT (RBS_AST_Members_ClassVariable , RBS_AST_Members , "ClassVariable" );
125- IMPORT_CONSTANT (RBS_AST_Members_Extend , RBS_AST_Members , "Extend" );
126- IMPORT_CONSTANT (RBS_AST_Members_Include , RBS_AST_Members , "Include" );
127- IMPORT_CONSTANT (RBS_AST_Members_InstanceVariable , RBS_AST_Members , "InstanceVariable" );
128- IMPORT_CONSTANT (RBS_AST_Members_MethodDefinition , RBS_AST_Members , "MethodDefinition" );
129- IMPORT_CONSTANT (RBS_AST_Members_MethodDefinition_Overload , RBS_AST_Members_MethodDefinition , "Overload" );
130- IMPORT_CONSTANT (RBS_AST_Members_Prepend , RBS_AST_Members , "Prepend" );
131- IMPORT_CONSTANT (RBS_AST_Members_Private , RBS_AST_Members , "Private" );
132- IMPORT_CONSTANT (RBS_AST_Members_Public , RBS_AST_Members , "Public" );
133- IMPORT_CONSTANT (RBS_AST_Ruby_Annotations_ColonMethodTypeAnnotation , RBS_AST_Ruby_Annotations , "ColonMethodTypeAnnotation" );
134- IMPORT_CONSTANT (RBS_AST_Ruby_Annotations_MethodTypesAnnotation , RBS_AST_Ruby_Annotations , "MethodTypesAnnotation" );
135- IMPORT_CONSTANT (RBS_AST_Ruby_Annotations_NodeTypeAssertion , RBS_AST_Ruby_Annotations , "NodeTypeAssertion" );
136- IMPORT_CONSTANT (RBS_AST_Ruby_Annotations_ReturnTypeAnnotation , RBS_AST_Ruby_Annotations , "ReturnTypeAnnotation" );
137- IMPORT_CONSTANT (RBS_AST_Ruby_Annotations_SkipAnnotation , RBS_AST_Ruby_Annotations , "SkipAnnotation" );
138- IMPORT_CONSTANT (RBS_AST_TypeParam , RBS_AST , "TypeParam" );
139- IMPORT_CONSTANT (RBS_MethodType , RBS , "MethodType" );
140- IMPORT_CONSTANT (RBS_Namespace , RBS , "Namespace" );
141- IMPORT_CONSTANT (RBS_TypeName , RBS , "TypeName" );
142- IMPORT_CONSTANT (RBS_Types_Alias , RBS_Types , "Alias" );
143- IMPORT_CONSTANT (RBS_Types_Bases_Any , RBS_Types_Bases , "Any" );
144- IMPORT_CONSTANT (RBS_Types_Bases_Bool , RBS_Types_Bases , "Bool" );
145- IMPORT_CONSTANT (RBS_Types_Bases_Bottom , RBS_Types_Bases , "Bottom" );
146- IMPORT_CONSTANT (RBS_Types_Bases_Class , RBS_Types_Bases , "Class" );
147- IMPORT_CONSTANT (RBS_Types_Bases_Instance , RBS_Types_Bases , "Instance" );
148- IMPORT_CONSTANT (RBS_Types_Bases_Nil , RBS_Types_Bases , "Nil" );
149- IMPORT_CONSTANT (RBS_Types_Bases_Self , RBS_Types_Bases , "Self" );
150- IMPORT_CONSTANT (RBS_Types_Bases_Top , RBS_Types_Bases , "Top" );
151- IMPORT_CONSTANT (RBS_Types_Bases_Void , RBS_Types_Bases , "Void" );
152- IMPORT_CONSTANT (RBS_Types_Block , RBS_Types , "Block" );
153- IMPORT_CONSTANT (RBS_Types_ClassInstance , RBS_Types , "ClassInstance" );
154- IMPORT_CONSTANT (RBS_Types_ClassSingleton , RBS_Types , "ClassSingleton" );
155- IMPORT_CONSTANT (RBS_Types_Function , RBS_Types , "Function" );
156- IMPORT_CONSTANT (RBS_Types_Function_Param , RBS_Types_Function , "Param" );
157- IMPORT_CONSTANT (RBS_Types_Interface , RBS_Types , "Interface" );
158- IMPORT_CONSTANT (RBS_Types_Intersection , RBS_Types , "Intersection" );
159- IMPORT_CONSTANT (RBS_Types_Literal , RBS_Types , "Literal" );
160- IMPORT_CONSTANT (RBS_Types_Optional , RBS_Types , "Optional" );
161- IMPORT_CONSTANT (RBS_Types_Proc , RBS_Types , "Proc" );
162- IMPORT_CONSTANT (RBS_Types_Record , RBS_Types , "Record" );
163- IMPORT_CONSTANT (RBS_Types_Tuple , RBS_Types , "Tuple" );
164- IMPORT_CONSTANT (RBS_Types_Union , RBS_Types , "Union" );
165- IMPORT_CONSTANT (RBS_Types_UntypedFunction , RBS_Types , "UntypedFunction" );
166- IMPORT_CONSTANT (RBS_Types_Variable , RBS_Types , "Variable" );
108+ IMPORT_CONSTANT (RBS_AST_Annotation , RBS_AST , "Annotation" );
109+ IMPORT_CONSTANT (RBS_AST_Comment , RBS_AST , "Comment" );
110+ IMPORT_CONSTANT (RBS_AST_Declarations_Class , RBS_AST_Declarations , "Class" );
111+ IMPORT_CONSTANT (RBS_AST_Declarations_Class_Super , RBS_AST_Declarations_Class , "Super" );
112+ IMPORT_CONSTANT (RBS_AST_Declarations_ClassAlias , RBS_AST_Declarations , "ClassAlias" );
113+ IMPORT_CONSTANT (RBS_AST_Declarations_Constant , RBS_AST_Declarations , "Constant" );
114+ IMPORT_CONSTANT (RBS_AST_Declarations_Global , RBS_AST_Declarations , "Global" );
115+ IMPORT_CONSTANT (RBS_AST_Declarations_Interface , RBS_AST_Declarations , "Interface" );
116+ IMPORT_CONSTANT (RBS_AST_Declarations_Module , RBS_AST_Declarations , "Module" );
117+ IMPORT_CONSTANT (RBS_AST_Declarations_Module_Self , RBS_AST_Declarations_Module , "Self" );
118+ IMPORT_CONSTANT (RBS_AST_Declarations_ModuleAlias , RBS_AST_Declarations , "ModuleAlias" );
119+ IMPORT_CONSTANT (RBS_AST_Declarations_TypeAlias , RBS_AST_Declarations , "TypeAlias" );
120+ IMPORT_CONSTANT (RBS_AST_Directives_Use , RBS_AST_Directives , "Use" );
121+ IMPORT_CONSTANT (RBS_AST_Directives_Use_SingleClause , RBS_AST_Directives_Use , "SingleClause" );
122+ IMPORT_CONSTANT (RBS_AST_Directives_Use_WildcardClause , RBS_AST_Directives_Use , "WildcardClause" );
123+ IMPORT_CONSTANT (RBS_AST_Members_Alias , RBS_AST_Members , "Alias" );
124+ IMPORT_CONSTANT (RBS_AST_Members_AttrAccessor , RBS_AST_Members , "AttrAccessor" );
125+ IMPORT_CONSTANT (RBS_AST_Members_AttrReader , RBS_AST_Members , "AttrReader" );
126+ IMPORT_CONSTANT (RBS_AST_Members_AttrWriter , RBS_AST_Members , "AttrWriter" );
127+ IMPORT_CONSTANT (RBS_AST_Members_ClassInstanceVariable , RBS_AST_Members , "ClassInstanceVariable" );
128+ IMPORT_CONSTANT (RBS_AST_Members_ClassVariable , RBS_AST_Members , "ClassVariable" );
129+ IMPORT_CONSTANT (RBS_AST_Members_Extend , RBS_AST_Members , "Extend" );
130+ IMPORT_CONSTANT (RBS_AST_Members_Include , RBS_AST_Members , "Include" );
131+ IMPORT_CONSTANT (RBS_AST_Members_InstanceVariable , RBS_AST_Members , "InstanceVariable" );
132+ IMPORT_CONSTANT (RBS_AST_Members_MethodDefinition , RBS_AST_Members , "MethodDefinition" );
133+ IMPORT_CONSTANT (RBS_AST_Members_MethodDefinition_Overload , RBS_AST_Members_MethodDefinition , "Overload" );
134+ IMPORT_CONSTANT (RBS_AST_Members_Prepend , RBS_AST_Members , "Prepend" );
135+ IMPORT_CONSTANT (RBS_AST_Members_Private , RBS_AST_Members , "Private" );
136+ IMPORT_CONSTANT (RBS_AST_Members_Public , RBS_AST_Members , "Public" );
137+ IMPORT_CONSTANT (RBS_AST_Ruby_Annotations_ColonMethodTypeAnnotation , RBS_AST_Ruby_Annotations , "ColonMethodTypeAnnotation" );
138+ IMPORT_CONSTANT (RBS_AST_Ruby_Annotations_MethodTypesAnnotation , RBS_AST_Ruby_Annotations , "MethodTypesAnnotation" );
139+ IMPORT_CONSTANT (RBS_AST_Ruby_Annotations_NodeTypeAssertion , RBS_AST_Ruby_Annotations , "NodeTypeAssertion" );
140+ IMPORT_CONSTANT (RBS_AST_Ruby_Annotations_ReturnTypeAnnotation , RBS_AST_Ruby_Annotations , "ReturnTypeAnnotation" );
141+ IMPORT_CONSTANT (RBS_AST_Ruby_Annotations_SkipAnnotation , RBS_AST_Ruby_Annotations , "SkipAnnotation" );
142+ IMPORT_CONSTANT (RBS_AST_TypeParam , RBS_AST , "TypeParam" );
143+ IMPORT_CONSTANT (RBS_MethodType , RBS , "MethodType" );
144+ IMPORT_CONSTANT (RBS_Namespace , RBS , "Namespace" );
145+ IMPORT_CONSTANT (RBS_TypeName , RBS , "TypeName" );
146+ IMPORT_CONSTANT (RBS_Types_Alias , RBS_Types , "Alias" );
147+ IMPORT_CONSTANT (RBS_Types_Bases_Any , RBS_Types_Bases , "Any" );
148+ IMPORT_CONSTANT (RBS_Types_Bases_Bool , RBS_Types_Bases , "Bool" );
149+ IMPORT_CONSTANT (RBS_Types_Bases_Bottom , RBS_Types_Bases , "Bottom" );
150+ IMPORT_CONSTANT (RBS_Types_Bases_Class , RBS_Types_Bases , "Class" );
151+ IMPORT_CONSTANT (RBS_Types_Bases_Instance , RBS_Types_Bases , "Instance" );
152+ IMPORT_CONSTANT (RBS_Types_Bases_Nil , RBS_Types_Bases , "Nil" );
153+ IMPORT_CONSTANT (RBS_Types_Bases_Self , RBS_Types_Bases , "Self" );
154+ IMPORT_CONSTANT (RBS_Types_Bases_Top , RBS_Types_Bases , "Top" );
155+ IMPORT_CONSTANT (RBS_Types_Bases_Void , RBS_Types_Bases , "Void" );
156+ IMPORT_CONSTANT (RBS_Types_Block , RBS_Types , "Block" );
157+ IMPORT_CONSTANT (RBS_Types_ClassInstance , RBS_Types , "ClassInstance" );
158+ IMPORT_CONSTANT (RBS_Types_ClassSingleton , RBS_Types , "ClassSingleton" );
159+ IMPORT_CONSTANT (RBS_Types_Function , RBS_Types , "Function" );
160+ IMPORT_CONSTANT (RBS_Types_Function_Param , RBS_Types_Function , "Param" );
161+ IMPORT_CONSTANT (RBS_Types_Interface , RBS_Types , "Interface" );
162+ IMPORT_CONSTANT (RBS_Types_Intersection , RBS_Types , "Intersection" );
163+ IMPORT_CONSTANT (RBS_Types_Literal , RBS_Types , "Literal" );
164+ IMPORT_CONSTANT (RBS_Types_Optional , RBS_Types , "Optional" );
165+ IMPORT_CONSTANT (RBS_Types_Proc , RBS_Types , "Proc" );
166+ IMPORT_CONSTANT (RBS_Types_Record , RBS_Types , "Record" );
167+ IMPORT_CONSTANT (RBS_Types_Tuple , RBS_Types , "Tuple" );
168+ IMPORT_CONSTANT (RBS_Types_Union , RBS_Types , "Union" );
169+ IMPORT_CONSTANT (RBS_Types_UntypedFunction , RBS_Types , "UntypedFunction" );
170+ IMPORT_CONSTANT (RBS_Types_Variable , RBS_Types , "Variable" );
167171}
0 commit comments