steep 1.1.1 → 1.2.0.pre.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/CHANGELOG.md +20 -0
- data/Gemfile +0 -1
- data/Gemfile.lock +12 -11
- data/Gemfile.steep +1 -1
- data/Gemfile.steep.lock +9 -9
- data/README.md +3 -3
- data/Steepfile +23 -0
- data/bin/steep-prof +2 -1
- data/lib/steep/annotation_parser.rb +1 -1
- data/lib/steep/ast/types/class.rb +4 -0
- data/lib/steep/ast/types/factory.rb +86 -602
- data/lib/steep/ast/types/instance.rb +4 -0
- data/lib/steep/ast/types/literal.rb +1 -1
- data/lib/steep/ast/types/proc.rb +22 -8
- data/lib/steep/ast/types/self.rb +4 -0
- data/lib/steep/ast/types/union.rb +1 -1
- data/lib/steep/cli.rb +24 -1
- data/lib/steep/diagnostic/ruby.rb +17 -22
- data/lib/steep/drivers/checkfile.rb +205 -0
- data/lib/steep/drivers/validate.rb +3 -1
- data/lib/steep/equatable.rb +2 -0
- data/lib/steep/interface/block.rb +21 -11
- data/lib/steep/interface/builder.rb +756 -0
- data/lib/steep/interface/function.rb +32 -24
- data/lib/steep/interface/method_type.rb +191 -78
- data/lib/steep/interface/shape.rb +132 -0
- data/lib/steep/interface/substitution.rb +23 -12
- data/lib/steep/interface/type_param.rb +1 -2
- data/lib/steep/path_helper.rb +1 -1
- data/lib/steep/project.rb +5 -7
- data/lib/steep/server/base_worker.rb +2 -2
- data/lib/steep/server/change_buffer.rb +4 -3
- data/lib/steep/server/interaction_worker.rb +1 -1
- data/lib/steep/server/master.rb +69 -9
- data/lib/steep/server/type_check_worker.rb +13 -11
- data/lib/steep/server/worker_process.rb +9 -7
- data/lib/steep/services/completion_provider.rb +15 -3
- data/lib/steep/services/hover_provider/singleton_methods.rb +5 -6
- data/lib/steep/services/signature_service.rb +13 -8
- data/lib/steep/services/type_check_service.rb +2 -0
- data/lib/steep/signature/validator.rb +1 -1
- data/lib/steep/subtyping/check.rb +154 -103
- data/lib/steep/subtyping/relation.rb +3 -3
- data/lib/steep/subtyping/result.rb +20 -2
- data/lib/steep/subtyping/variable_variance.rb +9 -0
- data/lib/steep/type_construction.rb +558 -299
- data/lib/steep/type_inference/block_params.rb +169 -86
- data/lib/steep/type_inference/logic_type_interpreter.rb +9 -14
- data/lib/steep/type_inference/method_params.rb +12 -7
- data/lib/steep/type_inference/send_args.rb +41 -35
- data/lib/steep/type_inference/type_env_builder.rb +1 -1
- data/lib/steep/version.rb +1 -1
- data/lib/steep.rb +71 -2
- data/rbs_collection.steep.lock.yaml +18 -30
- data/rbs_collection.steep.yaml +1 -0
- data/sig/shims/language-server_protocol.rbs +20 -0
- data/sig/shims/tagged_logging.rbs +6 -0
- data/sig/steep/ast/annotation/collection.rbs +6 -6
- data/sig/steep/ast/types/class.rbs +3 -0
- data/sig/steep/ast/types/factory.rbs +38 -32
- data/sig/steep/ast/types/instance.rbs +3 -0
- data/sig/steep/ast/types/intersection.rbs +1 -1
- data/sig/steep/ast/types/literal.rbs +7 -7
- data/sig/steep/ast/types/name.rbs +14 -13
- data/sig/steep/ast/types/proc.rbs +3 -1
- data/sig/steep/ast/types/self.rbs +3 -0
- data/sig/steep/ast/types/var.rbs +1 -1
- data/sig/steep/diagnostic/ruby.rbs +30 -34
- data/sig/steep/drivers/annotations.rbs +17 -0
- data/sig/steep/drivers/check.rbs +33 -0
- data/sig/steep/drivers/checkfile.rbs +26 -0
- data/sig/steep/drivers/diagnostic_printer.rbs +25 -0
- data/sig/steep/drivers/init.rbs +19 -0
- data/sig/steep/drivers/langserver.rbs +35 -0
- data/sig/steep/drivers/print_project.rbs +15 -0
- data/sig/steep/drivers/stats.rbs +37 -0
- data/sig/steep/drivers/utils/driver_helper.rbs +23 -0
- data/sig/steep/drivers/utils/jobs_count.rbs +11 -0
- data/sig/steep/drivers/validate.rbs +15 -0
- data/sig/steep/drivers/vendor.rbs +19 -0
- data/sig/steep/drivers/watch.rbs +27 -0
- data/sig/steep/drivers/worker.rbs +31 -0
- data/sig/steep/equatable.rbs +11 -0
- data/sig/steep/index/rbs_index.rbs +91 -0
- data/sig/steep/index/signature_symbol_provider.rbs +29 -0
- data/sig/steep/index/source_index.rbs +63 -0
- data/sig/steep/interface/block.rbs +3 -1
- data/sig/steep/interface/builder.rbs +152 -0
- data/sig/steep/interface/function.rbs +67 -55
- data/sig/steep/interface/method_type.rbs +60 -12
- data/sig/steep/interface/shape.rbs +61 -0
- data/sig/steep/interface/substitution.rbs +18 -22
- data/sig/steep/interface/type_param.rbs +9 -1
- data/sig/steep/path_helper.rbs +7 -0
- data/sig/steep/project/pattern.rbs +10 -10
- data/sig/steep/project/target.rbs +2 -2
- data/sig/steep/project.rbs +15 -8
- data/sig/steep/server/base_worker.rbs +49 -0
- data/sig/steep/server/change_buffer.rbs +32 -0
- data/sig/steep/server/interaction_worker.rbs +41 -0
- data/sig/steep/server/lsp_formatter.rbs +29 -0
- data/sig/steep/server/master.rbs +260 -0
- data/sig/steep/server/type_check_worker.rbs +135 -0
- data/sig/steep/server/worker_process.rbs +29 -0
- data/sig/steep/services/completion_provider.rbs +5 -5
- data/sig/steep/services/content_change.rbs +14 -12
- data/sig/steep/services/file_loader.rbs +12 -4
- data/sig/steep/services/hover_provider/singleton_methods.rbs +1 -1
- data/sig/steep/services/path_assignment.rbs +7 -7
- data/sig/steep/services/signature_service.rbs +67 -40
- data/sig/steep/services/type_check_service.rbs +53 -39
- data/sig/steep/subtyping/check.rbs +80 -44
- data/sig/steep/subtyping/relation.rbs +24 -22
- data/sig/steep/subtyping/result.rbs +48 -30
- data/sig/steep/subtyping/variable_variance.rbs +2 -0
- data/sig/steep/type_construction.rbs +132 -23
- data/sig/steep/type_inference/block_params.rbs +120 -18
- data/sig/steep/type_inference/context.rbs +45 -20
- data/sig/steep/type_inference/context_array.rbs +37 -0
- data/sig/steep/type_inference/logic_type_interpreter.rbs +3 -1
- data/sig/steep/type_inference/method_params.rbs +13 -9
- data/sig/steep/type_inference/send_args.rbs +229 -0
- data/sig/steep/type_inference/type_env_builder.rbs +1 -1
- data/sig/steep/typing.rbs +4 -4
- data/sig/steep.rbs +4 -2
- data/smoke/block/e.rb +12 -0
- data/smoke/block/e.rbs +4 -0
- data/smoke/block/test_expectations.yml +12 -0
- data/smoke/regression/block_param_split.rb +7 -0
- data/smoke/regression/block_param_split.rbs +3 -0
- data/smoke/regression/empty_yield.rb +5 -0
- data/smoke/regression/empty_yield.rbs +3 -0
- data/smoke/regression/test_expectations.yml +12 -0
- data/smoke/yield/test_expectations.yml +4 -4
- data/steep.gemspec +2 -1
- metadata +61 -9
- data/lib/steep/interface/interface.rb +0 -34
- data/sig/steep/interface/interface.rbs +0 -23
- data/sig/version.rbs +0 -3
@@ -0,0 +1,17 @@
|
|
1
|
+
module Steep
|
2
|
+
module Drivers
|
3
|
+
class Annotations
|
4
|
+
attr_reader command_line_patterns: untyped
|
5
|
+
|
6
|
+
attr_reader stdout: untyped
|
7
|
+
|
8
|
+
attr_reader stderr: untyped
|
9
|
+
|
10
|
+
include Utils::DriverHelper
|
11
|
+
|
12
|
+
def initialize: (stdout: untyped, stderr: untyped) -> void
|
13
|
+
|
14
|
+
def run: () -> 0
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Steep
|
2
|
+
module Drivers
|
3
|
+
class Check
|
4
|
+
LSP: untyped
|
5
|
+
|
6
|
+
attr_reader stdout: untyped
|
7
|
+
|
8
|
+
attr_reader stderr: untyped
|
9
|
+
|
10
|
+
attr_reader command_line_patterns: untyped
|
11
|
+
|
12
|
+
attr_accessor with_expectations_path: untyped
|
13
|
+
|
14
|
+
attr_accessor save_expectations_path: untyped
|
15
|
+
|
16
|
+
attr_accessor severity_level: untyped
|
17
|
+
|
18
|
+
include Utils::DriverHelper
|
19
|
+
|
20
|
+
include Utils::JobsCount
|
21
|
+
|
22
|
+
def initialize: (stdout: untyped, stderr: untyped) -> void
|
23
|
+
|
24
|
+
def run: () -> untyped
|
25
|
+
|
26
|
+
def print_expectations: (project: untyped, all_files: untyped, expectations_path: untyped, notifications: untyped) -> untyped
|
27
|
+
|
28
|
+
def save_expectations: (project: untyped, all_files: untyped, expectations_path: untyped, notifications: untyped) -> 0
|
29
|
+
|
30
|
+
def print_result: (project: untyped, notifications: untyped) -> (0 | 1)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Steep
|
2
|
+
module Drivers
|
3
|
+
class Checkfile
|
4
|
+
LSP: singleton(LanguageServer::Protocol)
|
5
|
+
|
6
|
+
attr_reader stdout: IO
|
7
|
+
|
8
|
+
attr_reader stderr: IO
|
9
|
+
|
10
|
+
attr_reader command_line_args: Array[String]
|
11
|
+
|
12
|
+
include Utils::DriverHelper
|
13
|
+
include Utils::JobsCount
|
14
|
+
|
15
|
+
attr_accessor all_rbs: bool
|
16
|
+
|
17
|
+
attr_accessor all_ruby: bool
|
18
|
+
|
19
|
+
attr_reader stdin_input: Hash[Pathname, String]
|
20
|
+
|
21
|
+
def initialize: (stdout: IO, stderr: IO) -> void
|
22
|
+
|
23
|
+
def run: () -> Integer
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Steep
|
2
|
+
module Drivers
|
3
|
+
class DiagnosticPrinter
|
4
|
+
LSP: untyped
|
5
|
+
|
6
|
+
attr_reader stdout: untyped
|
7
|
+
|
8
|
+
attr_reader buffer: untyped
|
9
|
+
|
10
|
+
def initialize: (stdout: untyped, buffer: untyped) -> void
|
11
|
+
|
12
|
+
def path: () -> untyped
|
13
|
+
|
14
|
+
def color_severity: (untyped string, severity: untyped) -> untyped
|
15
|
+
|
16
|
+
def severity_message: (untyped severity) -> untyped
|
17
|
+
|
18
|
+
def location: (untyped diagnostic) -> untyped
|
19
|
+
|
20
|
+
def print: (untyped diagnostic, ?prefix: ::String, ?source: bool) -> untyped
|
21
|
+
|
22
|
+
def print_source_line: (untyped diagnostic, ?prefix: ::String) -> untyped
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Steep
|
2
|
+
module Drivers
|
3
|
+
class Init
|
4
|
+
attr_reader stdout: untyped
|
5
|
+
|
6
|
+
attr_reader stderr: untyped
|
7
|
+
|
8
|
+
attr_accessor force_write: untyped
|
9
|
+
|
10
|
+
include Utils::DriverHelper
|
11
|
+
|
12
|
+
TEMPLATE: "# D = Steep::Diagnostic\n#\n# target :lib do\n# signature \"sig\"\n#\n# check \"lib\" # Directory name\n# check \"Gemfile\" # File name\n# check \"app/models/**/*.rb\" # Glob\n# # ignore \"lib/templates/*.rb\"\n#\n# # library \"pathname\", \"set\" # Standard libraries\n# # library \"strong_json\" # Gems\n# \n# # configure_code_diagnostics(D::Ruby.strict) # `strict` diagnostics setting\n# # configure_code_diagnostics(D::Ruby.lenient) # `lenient` diagnostics setting\n# # configure_code_diagnostics do |hash| # You can setup everything yourself\n# # hash[D::Ruby::NoMethod] = :information\n# # end\n# end\n\n# target :test do\n# signature \"sig\", \"sig-private\"\n#\n# check \"test\"\n#\n# # library \"pathname\", \"set\" # Standard libraries\n# end\n"
|
13
|
+
|
14
|
+
def initialize: (stdout: untyped, stderr: untyped) -> void
|
15
|
+
|
16
|
+
def run: () -> (1 | 0)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Steep
|
2
|
+
module Drivers
|
3
|
+
class Langserver
|
4
|
+
attr_reader stdout: untyped
|
5
|
+
|
6
|
+
attr_reader stderr: untyped
|
7
|
+
|
8
|
+
attr_reader stdin: untyped
|
9
|
+
|
10
|
+
attr_reader latest_update_version: untyped
|
11
|
+
|
12
|
+
attr_reader write_mutex: untyped
|
13
|
+
|
14
|
+
attr_reader type_check_queue: untyped
|
15
|
+
|
16
|
+
attr_reader type_check_thread: untyped
|
17
|
+
|
18
|
+
include Utils::DriverHelper
|
19
|
+
|
20
|
+
include Utils::JobsCount
|
21
|
+
|
22
|
+
TypeCheckRequest: untyped
|
23
|
+
|
24
|
+
def initialize: (stdout: untyped, stderr: untyped, stdin: untyped) -> void
|
25
|
+
|
26
|
+
def writer: () -> untyped
|
27
|
+
|
28
|
+
def reader: () -> untyped
|
29
|
+
|
30
|
+
def project: () -> untyped
|
31
|
+
|
32
|
+
def run: () -> 0
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Steep
|
2
|
+
module Drivers
|
3
|
+
class PrintProject
|
4
|
+
attr_reader stdout: untyped
|
5
|
+
|
6
|
+
attr_reader stderr: untyped
|
7
|
+
|
8
|
+
include Utils::DriverHelper
|
9
|
+
|
10
|
+
def initialize: (stdout: untyped, stderr: untyped) -> void
|
11
|
+
|
12
|
+
def run: () -> 0
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Steep
|
2
|
+
module Drivers
|
3
|
+
class Stats
|
4
|
+
class CSVPrinter
|
5
|
+
attr_reader io: untyped
|
6
|
+
|
7
|
+
def initialize: (io: untyped) -> void
|
8
|
+
|
9
|
+
def print: (untyped stats_result) -> untyped
|
10
|
+
end
|
11
|
+
|
12
|
+
class TablePrinter
|
13
|
+
attr_reader io: untyped
|
14
|
+
|
15
|
+
def initialize: (io: untyped) -> void
|
16
|
+
|
17
|
+
def print: (untyped stats_result) -> untyped
|
18
|
+
end
|
19
|
+
|
20
|
+
attr_reader stdout: untyped
|
21
|
+
|
22
|
+
attr_reader stderr: untyped
|
23
|
+
|
24
|
+
attr_reader command_line_patterns: untyped
|
25
|
+
|
26
|
+
attr_accessor format: untyped
|
27
|
+
|
28
|
+
include Utils::DriverHelper
|
29
|
+
|
30
|
+
include Utils::JobsCount
|
31
|
+
|
32
|
+
def initialize: (stdout: untyped, stderr: untyped) -> void
|
33
|
+
|
34
|
+
def run: () -> 0
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Steep
|
2
|
+
module Drivers
|
3
|
+
module Utils
|
4
|
+
module DriverHelper
|
5
|
+
attr_accessor steepfile: Pathname?
|
6
|
+
|
7
|
+
def load_config: (?path: Pathname) -> Project
|
8
|
+
|
9
|
+
def type_check: (Project project) -> void
|
10
|
+
|
11
|
+
def request_id: () -> String
|
12
|
+
|
13
|
+
def wait_for_response_id: (reader: untyped, id: untyped, ?unknown_responses: ::Symbol) -> untyped
|
14
|
+
|
15
|
+
def shutdown_exit: (writer: untyped, reader: untyped) -> untyped
|
16
|
+
|
17
|
+
def wait_for_message: (reader: untyped, ?unknown_messages: ::Symbol) { (untyped) -> untyped } -> untyped
|
18
|
+
|
19
|
+
def keep_diagnostic?: (untyped diagnostic) -> bool
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Steep
|
2
|
+
module Drivers
|
3
|
+
class Validate
|
4
|
+
attr_reader stdout: untyped
|
5
|
+
|
6
|
+
attr_reader stderr: untyped
|
7
|
+
|
8
|
+
include Utils::DriverHelper
|
9
|
+
|
10
|
+
def initialize: (stdout: untyped, stderr: untyped) -> void
|
11
|
+
|
12
|
+
def run: () -> untyped
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Steep
|
2
|
+
module Drivers
|
3
|
+
class Vendor
|
4
|
+
attr_reader stdout: untyped
|
5
|
+
|
6
|
+
attr_reader stderr: untyped
|
7
|
+
|
8
|
+
attr_reader stdin: untyped
|
9
|
+
|
10
|
+
attr_accessor vendor_dir: untyped
|
11
|
+
|
12
|
+
attr_accessor clean_before: untyped
|
13
|
+
|
14
|
+
def initialize: (stdout: untyped, stderr: untyped, stdin: untyped) -> void
|
15
|
+
|
16
|
+
def run: () -> 0
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Steep
|
2
|
+
module Drivers
|
3
|
+
class Watch
|
4
|
+
attr_reader dirs: untyped
|
5
|
+
|
6
|
+
attr_reader stdout: untyped
|
7
|
+
|
8
|
+
attr_reader stderr: untyped
|
9
|
+
|
10
|
+
attr_reader queue: untyped
|
11
|
+
|
12
|
+
attr_accessor severity_level: untyped
|
13
|
+
|
14
|
+
include Utils::DriverHelper
|
15
|
+
|
16
|
+
include Utils::JobsCount
|
17
|
+
|
18
|
+
LSP: untyped
|
19
|
+
|
20
|
+
def initialize: (stdout: untyped, stderr: untyped) -> void
|
21
|
+
|
22
|
+
def watching?: (untyped changed_path, files: untyped, dirs: untyped) -> untyped
|
23
|
+
|
24
|
+
def run: () -> (1 | 0)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Steep
|
2
|
+
module Drivers
|
3
|
+
class Worker
|
4
|
+
attr_reader stdout: untyped
|
5
|
+
|
6
|
+
attr_reader stderr: untyped
|
7
|
+
|
8
|
+
attr_reader stdin: untyped
|
9
|
+
|
10
|
+
attr_accessor steepfile_path: untyped
|
11
|
+
|
12
|
+
attr_accessor worker_type: untyped
|
13
|
+
|
14
|
+
attr_accessor worker_name: untyped
|
15
|
+
|
16
|
+
attr_accessor delay_shutdown: untyped
|
17
|
+
|
18
|
+
attr_accessor max_index: untyped
|
19
|
+
|
20
|
+
attr_accessor index: untyped
|
21
|
+
|
22
|
+
attr_accessor commandline_args: untyped
|
23
|
+
|
24
|
+
include Utils::DriverHelper
|
25
|
+
|
26
|
+
def initialize: (stdout: untyped, stderr: untyped, stdin: untyped) -> void
|
27
|
+
|
28
|
+
def run: () -> 0
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
module Steep
|
2
|
+
module Index
|
3
|
+
class RBSIndex
|
4
|
+
class TypeEntry
|
5
|
+
attr_reader type_name: untyped
|
6
|
+
|
7
|
+
attr_reader declarations: untyped
|
8
|
+
|
9
|
+
attr_reader references: untyped
|
10
|
+
|
11
|
+
def initialize: (type_name: untyped) -> void
|
12
|
+
|
13
|
+
def add_declaration: (untyped decl) -> untyped
|
14
|
+
|
15
|
+
def add_reference: (untyped ref) -> untyped
|
16
|
+
end
|
17
|
+
|
18
|
+
class MethodEntry
|
19
|
+
attr_reader method_name: untyped
|
20
|
+
|
21
|
+
attr_reader declarations: untyped
|
22
|
+
|
23
|
+
attr_reader references: untyped
|
24
|
+
|
25
|
+
def initialize: (method_name: untyped) -> void
|
26
|
+
|
27
|
+
def add_declaration: (untyped decl) -> untyped
|
28
|
+
end
|
29
|
+
|
30
|
+
class ConstantEntry
|
31
|
+
attr_reader const_name: untyped
|
32
|
+
|
33
|
+
attr_reader declarations: untyped
|
34
|
+
|
35
|
+
def initialize: (const_name: untyped) -> void
|
36
|
+
|
37
|
+
def add_declaration: (untyped decl) -> untyped
|
38
|
+
end
|
39
|
+
|
40
|
+
class GlobalEntry
|
41
|
+
attr_reader global_name: untyped
|
42
|
+
|
43
|
+
attr_reader declarations: untyped
|
44
|
+
|
45
|
+
def initialize: (global_name: untyped) -> void
|
46
|
+
|
47
|
+
def add_declaration: (untyped decl) -> untyped
|
48
|
+
end
|
49
|
+
|
50
|
+
attr_reader type_index: untyped
|
51
|
+
|
52
|
+
attr_reader method_index: untyped
|
53
|
+
|
54
|
+
attr_reader const_index: untyped
|
55
|
+
|
56
|
+
attr_reader global_index: untyped
|
57
|
+
|
58
|
+
def initialize: () -> void
|
59
|
+
|
60
|
+
def entry: (?type_name: untyped?, ?method_name: untyped?, ?const_name: untyped?, ?global_name: untyped?) -> untyped
|
61
|
+
|
62
|
+
def each_entry: () { () -> untyped } -> untyped
|
63
|
+
|
64
|
+
def add_type_declaration: (untyped type_name, untyped declaration) -> untyped
|
65
|
+
|
66
|
+
def add_method_declaration: (untyped method_name, untyped member) -> untyped
|
67
|
+
|
68
|
+
def add_constant_declaration: (untyped const_name, untyped decl) -> untyped
|
69
|
+
|
70
|
+
def add_global_declaration: (untyped global_name, untyped decl) -> untyped
|
71
|
+
|
72
|
+
def each_declaration: (?type_name: untyped?, ?method_name: untyped?, ?const_name: untyped?, ?global_name: untyped?) { () -> untyped } -> untyped
|
73
|
+
|
74
|
+
def add_type_reference: (untyped type_name, untyped ref) -> untyped
|
75
|
+
|
76
|
+
def each_reference: (?type_name: untyped?) { () -> untyped } -> untyped
|
77
|
+
|
78
|
+
class Builder
|
79
|
+
attr_reader index: untyped
|
80
|
+
|
81
|
+
def initialize: (index: untyped) -> void
|
82
|
+
|
83
|
+
def member: (untyped type_name, untyped member) -> untyped
|
84
|
+
|
85
|
+
def type_reference: (untyped `type`, from: untyped) -> untyped
|
86
|
+
|
87
|
+
def env: (untyped env) -> untyped
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Steep
|
2
|
+
module Index
|
3
|
+
class SignatureSymbolProvider
|
4
|
+
LSP: untyped
|
5
|
+
|
6
|
+
SymbolInformation: untyped
|
7
|
+
|
8
|
+
attr_reader project: untyped
|
9
|
+
|
10
|
+
attr_reader indexes: untyped
|
11
|
+
|
12
|
+
attr_reader assignment: untyped
|
13
|
+
|
14
|
+
def initialize: (project: untyped, assignment: untyped) -> void
|
15
|
+
|
16
|
+
def self.test_type_name: (untyped query, untyped type_name) -> untyped
|
17
|
+
|
18
|
+
alias self.test_const_name self.test_type_name
|
19
|
+
|
20
|
+
alias self.test_global_name self.test_type_name
|
21
|
+
|
22
|
+
def self.test_method_name: (untyped query, untyped method_name) -> untyped
|
23
|
+
|
24
|
+
def assigned?: (untyped path) -> untyped
|
25
|
+
|
26
|
+
def query_symbol: (untyped query) -> untyped
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
module Steep
|
2
|
+
module Index
|
3
|
+
class SourceIndex
|
4
|
+
class ConstantEntry
|
5
|
+
attr_reader name: untyped
|
6
|
+
|
7
|
+
attr_reader definitions: untyped
|
8
|
+
|
9
|
+
attr_reader references: untyped
|
10
|
+
|
11
|
+
def initialize: (name: untyped) -> void
|
12
|
+
|
13
|
+
def add_definition: (untyped node) -> untyped
|
14
|
+
|
15
|
+
def add_reference: (untyped node) -> untyped
|
16
|
+
|
17
|
+
def merge!: (untyped other) -> untyped
|
18
|
+
end
|
19
|
+
|
20
|
+
class MethodEntry
|
21
|
+
attr_reader name: untyped
|
22
|
+
|
23
|
+
attr_reader definitions: untyped
|
24
|
+
|
25
|
+
attr_reader references: untyped
|
26
|
+
|
27
|
+
def initialize: (name: untyped) -> void
|
28
|
+
|
29
|
+
def add_definition: (untyped node) -> untyped
|
30
|
+
|
31
|
+
def add_reference: (untyped node) -> untyped
|
32
|
+
|
33
|
+
def merge!: (untyped other) -> untyped
|
34
|
+
end
|
35
|
+
|
36
|
+
attr_reader source: untyped
|
37
|
+
|
38
|
+
attr_reader constant_index: untyped
|
39
|
+
|
40
|
+
attr_reader method_index: untyped
|
41
|
+
|
42
|
+
attr_reader parent: untyped
|
43
|
+
|
44
|
+
attr_reader count: untyped
|
45
|
+
|
46
|
+
attr_reader parent_count: untyped
|
47
|
+
|
48
|
+
def initialize: (source: untyped, ?parent: untyped?) -> void
|
49
|
+
|
50
|
+
def new_child: () -> untyped
|
51
|
+
|
52
|
+
def merge!: (untyped child) -> untyped
|
53
|
+
|
54
|
+
def add_definition: (definition: untyped, ?constant: untyped?, ?method: untyped?) -> untyped
|
55
|
+
|
56
|
+
def add_reference: (ref: untyped, ?constant: untyped?, ?method: untyped?) -> untyped
|
57
|
+
|
58
|
+
def entry: (?constant: untyped?, ?method: untyped?) -> untyped
|
59
|
+
|
60
|
+
def reference: (?constant_node: untyped?) -> untyped
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -3,9 +3,11 @@ module Steep
|
|
3
3
|
class Block
|
4
4
|
attr_reader type: Function
|
5
5
|
|
6
|
+
attr_reader self_type: AST::Types::t?
|
7
|
+
|
6
8
|
attr_reader optional: bool
|
7
9
|
|
8
|
-
def initialize: (type: Function, optional: bool) -> void
|
10
|
+
def initialize: (type: Function, self_type: AST::Types::t?, optional: bool) -> void
|
9
11
|
|
10
12
|
def optional?: () -> bool
|
11
13
|
|