diff --git a/lib/rbs.rb b/lib/rbs.rb index b4a8b6aa5..ac5ec76cb 100644 --- a/lib/rbs.rb +++ b/lib/rbs.rb @@ -69,7 +69,12 @@ require "rbs/type_alias_regularity" require "rbs/collection" -require "rbs_extension" +begin + require "rbs_extension" +rescue LoadError + require "rbs/ffi/parser" + require "rbs/ffi/location" +end require "rbs/parser_aux" require "rbs/location_aux" diff --git a/lib/rbs/ffi/location.rb b/lib/rbs/ffi/location.rb new file mode 100644 index 000000000..ca4686553 --- /dev/null +++ b/lib/rbs/ffi/location.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +module RBS + class Location + def initialize(buffer, start_pos, end_pos) + + end + + def initialize_copy(other) + + end + + def buffer + + end + + def _start_pos + + end + + def _end_pos + + end + + def _add_required_child(name, start, end_pos) + + end + + def _add_optional_child(name, start, end_pos) + + end + + def _add_optional_no_child(name) + + end + + def _optional_keys + + end + + def _required_keys + + end + + def [](name) + + end + end +end \ No newline at end of file diff --git a/lib/rbs/ffi/parser.rb b/lib/rbs/ffi/parser.rb new file mode 100644 index 000000000..c143ba855 --- /dev/null +++ b/lib/rbs/ffi/parser.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +module RBS + class Parser + def _parse_type(buffer, start_pos, end_pos, variables, require_eof) + + end + + def _parse_method_type(buffer, start_pos, end_pos, variables, require_eof) + + end + + def _parse_signature(buffer, start_pos, end_pos) + + end + + def _parse_type_params(buffer, start_pos, end_pos, module_type_params) + + end + + def _parse_inline_leading_annotation(buffer, start_pos, end_pos, variables) + + end + + def _parse_inline_trailing_annotation(buffer, start_pos, end_pos, variables) + + end + end +end