Skip to content

Commit d959812

Browse files
committed
Store todo state as Any struct field
Signed-off-by: Alexandre Terrasa <[email protected]>
1 parent 00d9e1f commit d959812

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ nodes:
213213
- name: location
214214
- name: RBS::Types::Bases::Any
215215
fields:
216+
- name: todo
216217
- name: location
217218
- name: RBS::Types::Bases::Bool
218219
fields:

ext/rbs_extension/parser.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -993,12 +993,10 @@ static VALUE parse_simple(parserstate *state) {
993993
return rbs_bases_void(rbs_location_current_token(state));
994994
}
995995
case kUNTYPED: {
996-
return rbs_bases_any(rbs_location_current_token(state));
996+
return rbs_bases_any(false, rbs_location_current_token(state));
997997
}
998998
case k__TODO__: {
999-
VALUE type = rbs_bases_any(rbs_location_current_token(state));
1000-
rb_funcall(type, rb_intern("todo!"), 0);
1001-
return type;
999+
return rbs_bases_any(true, rbs_location_current_token(state));
10021000
}
10031001
case tINTEGER: {
10041002
VALUE literal = rb_funcall(

include/rbs/ruby_objs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ VALUE rbs_method_type(VALUE type_params, VALUE type, VALUE block, VALUE location
4444
VALUE rbs_namespace(VALUE path, VALUE absolute);
4545
VALUE rbs_type_name(VALUE namespace, VALUE name);
4646
VALUE rbs_alias(VALUE name, VALUE args, VALUE location);
47-
VALUE rbs_bases_any(VALUE location);
47+
VALUE rbs_bases_any(VALUE todo, VALUE location);
4848
VALUE rbs_bases_bool(VALUE location);
4949
VALUE rbs_bases_bottom(VALUE location);
5050
VALUE rbs_bases_class(VALUE location);

0 commit comments

Comments
 (0)