Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions scip_indexer/SCIPProtoExt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
#include <string>

namespace scip {
#define CHECK_CMP(expr) \
{ \
auto cmp = expr; \
if (cmp != 0) { \
return cmp < 0; \
} \
#define CHECK_CMP(expr) \
{ \
auto cmp = expr; \
if (cmp != 0) { \
return cmp; \
} \
}

int compareDiagnostic(const scip::Diagnostic &d1, const scip::Diagnostic &d2) {
Expand Down
4 changes: 2 additions & 2 deletions test/scip/testdata/args.snapshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ def args(x, y)
# ^ reference local 1~#2634721084
# ^^ reference [..] BasicObject#`==`().
z += y
# ^ reference local 3~#2634721084
# ^ reference (write) local 3~#2634721084
# ^ reference local 3~#2634721084
# ^ reference local 2~#2634721084
else
z += x
# ^ reference local 3~#2634721084
# ^ reference (write) local 3~#2634721084
# ^ reference local 3~#2634721084
# ^ reference local 1~#2634721084
end
z
Expand Down
16 changes: 8 additions & 8 deletions test/scip/testdata/blocks_lambdas_procs.snapshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ def blk
[].each { |x|
# ^ definition local 2~#1472469056
y += x
# ^ reference local 1~#1472469056
# ^ reference (write) local 1~#1472469056
# ^ reference local 1~#1472469056
# ^^^^^^ reference local 1~#1472469056
# ^ reference local 2~#1472469056
}
[].each do |x|
# ^ definition local 3~#1472469056
y += x
# ^ reference local 1~#1472469056
# ^ reference (write) local 1~#1472469056
# ^ reference local 1~#1472469056
# ^^^^^^ reference local 1~#1472469056
# ^ reference local 3~#1472469056
end
Expand All @@ -32,8 +32,8 @@ def lam
# ^^ reference [..] Kernel#lambda().
# ^ definition local 3~#1499497673
y += x
# ^ reference local 1~#1499497673
# ^ reference (write) local 1~#1499497673
# ^ reference local 1~#1499497673
# ^^^^^^ reference local 1~#1499497673
# ^ reference local 3~#1499497673
}
Expand All @@ -53,8 +53,8 @@ def lam
# ^^ reference [..] Kernel#lambda().
# ^^ definition local 8~#1499497673
y += x
# ^ reference local 1~#1499497673
# ^ reference (write) local 1~#1499497673
# ^ reference local 1~#1499497673
# ^^^^^^ reference local 1~#1499497673
# ^ reference local 8~#1499497673
}
Expand All @@ -63,8 +63,8 @@ def lam
# ^^^^^^ reference [..] Kernel#lambda().
# ^^ definition local 10~#1499497673
y += x
# ^ reference local 1~#1499497673
# ^ reference (write) local 1~#1499497673
# ^ reference local 1~#1499497673
# ^^^^^^ reference local 1~#1499497673
# ^ reference local 10~#1499497673
}
Expand Down Expand Up @@ -102,8 +102,8 @@ def prc
# ^^^^ reference [..] Kernel#proc().
# ^ definition local 5~#1283111692
y += x
# ^ reference local 1~#1283111692
# ^ reference (write) local 1~#1283111692
# ^ reference local 1~#1283111692
# ^^^^^^ reference local 1~#1283111692
# ^ reference local 5~#1283111692
}
Expand All @@ -113,8 +113,8 @@ def prc
# ^^^ reference [..] `<Class:Proc>`#new().
# ^^ definition local 8~#1283111692
y += x
# ^ reference local 1~#1283111692
# ^ reference (write) local 1~#1283111692
# ^ reference local 1~#1283111692
# ^^^^^^ reference local 1~#1283111692
# ^ reference local 8~#1283111692
}
Expand All @@ -123,8 +123,8 @@ def prc
# ^^^^ reference [..] Kernel#proc().
# ^^ definition local 10~#1283111692
y += x
# ^ reference local 1~#1283111692
# ^ reference (write) local 1~#1283111692
# ^ reference local 1~#1283111692
# ^^^^^^ reference local 1~#1283111692
# ^ reference local 10~#1283111692
}
Expand Down
14 changes: 7 additions & 7 deletions test/scip/testdata/cattr.snapshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,28 @@ class CA
extend T::Sig
# ^^^^^^ reference [..] Kernel#extend().
cattr_accessor :both, :foo
# ^^^^^ definition [..] CA#both().
# ^^^^^ definition [..] CA#`both=`().
# ^^^^^ definition [..] `<Class:CA>`#`both=`().
# ^^^^^ definition [..] `<Class:CA>`#both().
# ^^^^^ definition [..] CA#both().
# ^^^^ definition [..] CA#foo().
# ^^^^ definition [..] `<Class:CA>`#foo().
# ^^^^ definition [..] CA#`foo=`().
# ^^^^ definition [..] CA#foo().
# ^^^^ definition [..] `<Class:CA>`#`foo=`().
# ^^^^ definition [..] `<Class:CA>`#foo().
cattr_accessor :no_instance, instance_accessor: false
# ^^^^^^^^^^^^ definition [..] `<Class:CA>`#no_instance().
# ^^^^^^^^^^^^ definition [..] `<Class:CA>`#`no_instance=`().
# ^^^^^^^^^^^^ definition [..] `<Class:CA>`#no_instance().
cattr_accessor :no_instance_reader, instance_reader: false
# ^^^^^^^^^^^^^^^^^^^ definition [..] `<Class:CA>`#no_instance_reader().
# ^^^^^^^^^^^^^^^^^^^ definition [..] CA#`no_instance_reader=`().
# ^^^^^^^^^^^^^^^^^^^ definition [..] `<Class:CA>`#`no_instance_reader=`().
# ^^^^^^^^^^^^^^^^^^^ definition [..] `<Class:CA>`#no_instance_reader().
cattr_accessor :bar, :no_instance_writer, instance_writer: false
# ^^^^ definition [..] CA#bar().
# ^^^^ definition [..] `<Class:CA>`#bar().
# ^^^^ definition [..] `<Class:CA>`#`bar=`().
# ^^^^^^^^^^^^^^^^^^^ definition [..] `<Class:CA>`#no_instance_writer().
# ^^^^ definition [..] `<Class:CA>`#bar().
# ^^^^^^^^^^^^^^^^^^^ definition [..] CA#no_instance_writer().
# ^^^^^^^^^^^^^^^^^^^ definition [..] `<Class:CA>`#`no_instance_writer=`().
# ^^^^^^^^^^^^^^^^^^^ definition [..] `<Class:CA>`#no_instance_writer().

sig {void}
def usages
Expand Down
4 changes: 2 additions & 2 deletions test/scip/testdata/def_delegator.snapshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class MyArray2
extend T::Sig
# ^^^^^^ reference [..] Kernel#extend().
attr_accessor :inner_array
# ^^^^^^^^^^^ definition [..] MyArray2#inner_array().
# ^^^^^^^^^^^ definition [..] MyArray2#`inner_array=`().
# ^^^^^^^^^^^ definition [..] MyArray2#inner_array().
extend Forwardable
# ^^^^^^ reference [..] Kernel#extend().
# ^^^^^^^^^^^ reference [..] Forwardable#
Expand All @@ -36,8 +36,8 @@ class MyArray2
class MyArray3
# ^^^^^^^^ definition [..] MyArray3#
attr_accessor :inner_array
# ^^^^^^^^^^^ definition [..] MyArray3#inner_array().
# ^^^^^^^^^^^ definition [..] MyArray3#`inner_array=`().
# ^^^^^^^^^^^ definition [..] MyArray3#inner_array().
extend Forwardable
# ^^^^^^ reference [..] Kernel#extend().
# ^^^^^^^^^^^ reference [..] Forwardable#
Expand Down
4 changes: 2 additions & 2 deletions test/scip/testdata/encrypted_prop.snapshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ def self.encrypted_prop(opts={}); end
# ^^^^^^^^^^^^^^ definition [..] `<Class:EncryptedProp>`#encrypted_prop().
encrypted_prop :foo
# ^^^^^^^^^^^^^^^^^^^ reference [..] String#
# ^^^ definition [..] EncryptedProp#encrypted_foo().
# ^^^ definition [..] EncryptedProp#`encrypted_foo=`().
# ^^^ definition [..] EncryptedProp#`foo=`().
# ^^^ definition [..] EncryptedProp#encrypted_foo().
# ^^^ definition [..] EncryptedProp#foo().
encrypted_prop :bar, migrating: true, immutable: true
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reference [..] String#
# ^^^ definition [..] EncryptedProp#encrypted_bar().
# ^^^ definition [..] EncryptedProp#bar().
# ^^^ definition [..] EncryptedProp#encrypted_bar().
end


Expand Down
4 changes: 2 additions & 2 deletions test/scip/testdata/field_inheritance.snapshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
class C1
# ^^ definition [..] C1#
attr_accessor :h
# ^ definition [..] C1#h().
# ^ definition [..] C1#`h=`().
# ^ definition [..] C1#h().
attr_accessor :i
# ^ definition [..] C1#i().
# ^ definition [..] C1#`i=`().
# ^ definition [..] C1#i().

def set_ivar
# ^^^^^^^^ definition [..] C1#set_ivar().
Expand Down
2 changes: 1 addition & 1 deletion test/scip/testdata/fields_and_attrs.snapshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def m3
class P
# ^ definition [..] P#
attr_accessor :a
# ^ definition [..] P#a().
# ^ definition [..] P#`a=`().
# ^ definition [..] P#a().
attr_reader :r
# ^ definition [..] P#r().
attr_writer :w
Expand Down
2 changes: 1 addition & 1 deletion test/scip/testdata/flatfile_dsl.snapshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class Flatfile < Record
# ^^^^^^^^ reference [..] `<Class:Record>`#flatfile().
from 1..2, :foo
# ^^^^ reference [..] `<Class:Record>`#from().
# ^^^^ definition [..] Flatfile#foo().
# ^^^^ definition [..] Flatfile#`foo=`().
# ^^^^ definition [..] Flatfile#foo().
pattern(/A-Za-z/, :bar)
# ^^^^^^^ reference [..] `<Class:Record>`#pattern().
# ^^^^^^^^ reference [..] Regexp#
Expand Down
4 changes: 2 additions & 2 deletions test/scip/testdata/for.snapshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ def for_loop()
for x in [1, 2, 3]
# ^ definition local 2~#1120785331
y += x
# ^ reference local 1~#1120785331
# ^ reference (write) local 1~#1120785331
# ^ reference local 1~#1120785331
# ^ reference local 2~#1120785331
for x in [3, 4, 5]
# ^ definition local 3~#1120785331
y += x
# ^ reference local 1~#1120785331
# ^ reference (write) local 1~#1120785331
# ^ reference local 1~#1120785331
# ^^^^^^ reference local 1~#1120785331
# ^^ reference [..] Integer#+().
# ^ reference local 3~#1120785331
Expand Down
2 changes: 1 addition & 1 deletion test/scip/testdata/hoverdocs.snapshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ def p1
# | @@y (T.untyped)
# | ```
@z += @x
# ^^ reference [..] K2#`@z`.
# ^^ reference (write) [..] K2#`@z`.
# ^^ reference [..] K2#`@z`.
# ^^^^^^^^ reference [..] K2#`@z`.
# ^^ reference [..] K1#`@x`.
# override_documentation
Expand Down
14 changes: 7 additions & 7 deletions test/scip/testdata/mattr.snapshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,28 @@ class MA
extend T::Sig
# ^^^^^^ reference [..] Kernel#extend().
mattr_accessor :both, :foo
# ^^^^^ definition [..] MA#both().
# ^^^^^ definition [..] MA#`both=`().
# ^^^^^ definition [..] `<Class:MA>`#`both=`().
# ^^^^^ definition [..] `<Class:MA>`#both().
# ^^^^^ definition [..] MA#both().
# ^^^^ definition [..] MA#foo().
# ^^^^ definition [..] `<Class:MA>`#foo().
# ^^^^ definition [..] MA#`foo=`().
# ^^^^ definition [..] MA#foo().
# ^^^^ definition [..] `<Class:MA>`#`foo=`().
# ^^^^ definition [..] `<Class:MA>`#foo().
mattr_accessor :no_instance, instance_accessor: false
# ^^^^^^^^^^^^ definition [..] `<Class:MA>`#no_instance().
# ^^^^^^^^^^^^ definition [..] `<Class:MA>`#`no_instance=`().
# ^^^^^^^^^^^^ definition [..] `<Class:MA>`#no_instance().
mattr_accessor :no_instance_reader, instance_reader: false
# ^^^^^^^^^^^^^^^^^^^ definition [..] `<Class:MA>`#no_instance_reader().
# ^^^^^^^^^^^^^^^^^^^ definition [..] MA#`no_instance_reader=`().
# ^^^^^^^^^^^^^^^^^^^ definition [..] `<Class:MA>`#`no_instance_reader=`().
# ^^^^^^^^^^^^^^^^^^^ definition [..] `<Class:MA>`#no_instance_reader().
mattr_accessor :bar, :no_instance_writer, instance_writer: false
# ^^^^ definition [..] MA#bar().
# ^^^^ definition [..] `<Class:MA>`#bar().
# ^^^^ definition [..] `<Class:MA>`#`bar=`().
# ^^^^^^^^^^^^^^^^^^^ definition [..] `<Class:MA>`#no_instance_writer().
# ^^^^ definition [..] `<Class:MA>`#bar().
# ^^^^^^^^^^^^^^^^^^^ definition [..] MA#no_instance_writer().
# ^^^^^^^^^^^^^^^^^^^ definition [..] `<Class:MA>`#`no_instance_writer=`().
# ^^^^^^^^^^^^^^^^^^^ definition [..] `<Class:MA>`#no_instance_writer().

sig {void}
def usages
Expand Down
26 changes: 13 additions & 13 deletions test/scip/testdata/prop.snapshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class SomeODM
# ^^^^^^^ reference [..] Module#include().

prop :foo, String
# ^^^ definition [..] SomeODM#foo().
# ^^^ definition [..] SomeODM#`foo=`().
# ^^^ definition [..] SomeODM#foo().
# ^^^^^^ reference [..] String#

sig {returns(T.nilable(String))}
Expand Down Expand Up @@ -40,17 +40,17 @@ class AdvancedODM
include T::Props
# ^^^^^^^ reference [..] Module#include().
prop :default, String, default: ""
# ^^^^^^^ definition [..] AdvancedODM#default().
# ^^^^^^^ definition [..] AdvancedODM#`default=`().
# ^^^^^^^ definition [..] AdvancedODM#default().
# ^^^^^^ reference [..] String#
prop :t_nilable, T.nilable(String)
# ^^^^^^^^^ definition [..] AdvancedODM#t_nilable().
# ^^^^^^^^^ definition [..] AdvancedODM#`t_nilable=`().
# ^^^^^^^^^ definition [..] AdvancedODM#t_nilable().
# ^^^^^^ reference [..] String#

prop :array, Array
# ^^^^^ definition [..] AdvancedODM#array().
# ^^^^^ definition [..] AdvancedODM#`array=`().
# ^^^^^ definition [..] AdvancedODM#array().
# ^^^^^ reference [..] Array#
prop :t_array, T::Array[String]
# ^^^^^^^ definition [..] AdvancedODM#`t_array=`().
Expand All @@ -76,29 +76,29 @@ class AdvancedODM

prop :foreign_lazy, String, foreign: -> {ForeignClass}
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reference [..] T#Boolean.
# ^^^^^^^^^^^^ definition [..] AdvancedODM#`foreign_lazy=`().
# ^^^^^^^^^^^^ definition [..] AdvancedODM#`foreign_lazy_!`().
# ^^^^^^^^^^^^ definition [..] AdvancedODM#foreign_lazy().
# ^^^^^^^^^^^^ definition [..] AdvancedODM#`foreign_lazy=`().
# ^^^^^^^^^^^^ definition [..] AdvancedODM#foreign_lazy_().
# ^^^^^^ reference [..] String#
# ^^ reference [..] Kernel#lambda().
# ^^ reference [..] Kernel#
# ^^ reference [..] Kernel#lambda().
# ^^^^^^^^^^^^ reference [..] ForeignClass#
prop :foreign_proc, String, foreign: proc {ForeignClass}
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reference [..] T#Boolean.
# ^^^^^^^^^^^^ definition [..] AdvancedODM#`foreign_proc=`().
# ^^^^^^^^^^^^ definition [..] AdvancedODM#`foreign_proc_!`().
# ^^^^^^^^^^^^ definition [..] AdvancedODM#foreign_proc().
# ^^^^^^^^^^^^ definition [..] AdvancedODM#foreign_proc_().
# ^^^^^^^^^^^^ definition [..] AdvancedODM#`foreign_proc_!`().
# ^^^^^^^^^^^^ definition [..] AdvancedODM#`foreign_proc=`().
# ^^^^^^ reference [..] String#
# ^^^^ reference [..] Kernel#proc().
# ^^^^^^^^^^^^ reference [..] ForeignClass#
prop :foreign_invalid, String, foreign: proc { :not_a_type }
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reference [..] T#Boolean.
# ^^^^^^^^^^^^^^^ definition [..] AdvancedODM#`foreign_invalid=`().
# ^^^^^^^^^^^^^^^ definition [..] AdvancedODM#`foreign_invalid_!`().
# ^^^^^^^^^^^^^^^ definition [..] AdvancedODM#foreign_invalid().
# ^^^^^^^^^^^^^^^ definition [..] AdvancedODM#foreign_invalid_().
# ^^^^^^^^^^^^^^^ definition [..] AdvancedODM#`foreign_invalid=`().
# ^^^^^^ reference [..] String#
# ^^^^ reference [..] Kernel#proc().

Expand Down Expand Up @@ -132,13 +132,13 @@ def self.created_prop(opts={}); end
token_prop
# ^^^^^ definition [..] PropHelpers#`token=`().
# ^^^^^ definition [..] PropHelpers#token().
# ^^^^^^^^^^ reference [..] `<Class:PropHelpers>`#token_prop().
# ^^^^^^^^^^ reference [..] String#
# ^^^^^^^^^^ reference [..] `<Class:PropHelpers>`#token_prop().
created_prop
# ^^^^^^^ definition [..] PropHelpers#created().
# ^^^^^^^ definition [..] PropHelpers#`created=`().
# ^^^^^^^^^^^^ reference [..] `<Class:PropHelpers>`#created_prop().
# ^^^^^^^ definition [..] PropHelpers#created().
# ^^^^^^^^^^^^ reference [..] Float#
# ^^^^^^^^^^^^ reference [..] `<Class:PropHelpers>`#created_prop().
end

class PropHelpers2
Expand All @@ -150,8 +150,8 @@ def self.timestamped_token_prop(opts={}); end
def self.created_prop(opts={}); end
# ^^^^^^^^^^^^ definition [..] `<Class:PropHelpers2>`#created_prop().
timestamped_token_prop
# ^^^^^^^^^^^^^^^^^^^^^^ reference [..] `<Class:PropHelpers2>`#timestamped_token_prop().
# ^^^^^^^^^^^^^^^^^^^^^^ reference [..] String#
# ^^^^^^^^^^^^^^^^^^^^^^ reference [..] `<Class:PropHelpers2>`#timestamped_token_prop().
# ^^^^^ definition [..] PropHelpers2#`token=`().
# ^^^^^ definition [..] PropHelpers2#token().
created_prop(immutable: true)
Expand Down
Loading