Skip to content

Commit 929df4d

Browse files
committed
Use slices for more internal locations
1 parent 859b4e4 commit 929df4d

File tree

2 files changed

+71
-70
lines changed

2 files changed

+71
-70
lines changed

config.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ nodes:
867867
alias :"#{foo}" :"#{bar}"
868868
^^^^^^^^^
869869
- name: keyword_loc
870-
type: location
870+
type: slice
871871
comment: |
872872
Represents the location of the `alias` keyword.
873873
@@ -897,7 +897,7 @@ nodes:
897897
foo => bar | baz
898898
^^^
899899
- name: operator_loc
900-
type: location
900+
type: slice
901901
comment: |
902902
Represents the alternation operator location.
903903
@@ -933,7 +933,7 @@ nodes:
933933
1 and 2
934934
^
935935
- name: operator_loc
936-
type: location
936+
type: slice
937937
comment: |
938938
The location of the `and` keyword or the `&&` operator.
939939
@@ -1113,7 +1113,7 @@ nodes:
11131113
{ **foo }
11141114
^^^
11151115
- name: operator_loc
1116-
type: location
1116+
type: slice
11171117
comment: |
11181118
The location of the `**` operator.
11191119
@@ -1206,7 +1206,7 @@ nodes:
12061206
foo(&args)
12071207
^^^^^
12081208
- name: operator_loc
1209-
type: location
1209+
type: slice
12101210
comment: |
12111211
Represents the location of the `&` operator.
12121212
@@ -1267,14 +1267,14 @@ nodes:
12671267
[1, 2, 3].each { |i| puts x }
12681268
^^^^^^
12691269
- name: opening_loc
1270-
type: location
1270+
type: slice
12711271
comment: |
12721272
Represents the location of the opening `|`.
12731273
12741274
[1, 2, 3].each { |i| puts x }
12751275
^
12761276
- name: closing_loc
1277-
type: location
1277+
type: slice
12781278
comment: |
12791279
Represents the location of the closing `|`.
12801280
@@ -1304,7 +1304,7 @@ nodes:
13041304
def a(&b)
13051305
^
13061306
- name: operator_loc
1307-
type: location
1307+
type: slice
13081308
comment: |
13091309
Represents the location of the `&` operator.
13101310
@@ -1385,7 +1385,7 @@ nodes:
13851385
break foo
13861386
^^^
13871387
- name: keyword_loc
1388-
type: location
1388+
type: slice
13891389
comment: |
13901390
The location of the `break` keyword.
13911391
@@ -1436,7 +1436,7 @@ nodes:
14361436
foo.bar &&= value # write_name `:bar=`
14371437
^^^
14381438
- name: operator_loc
1439-
type: location
1439+
type: slice
14401440
comment: |
14411441
Represents the location of the operator.
14421442
@@ -1604,7 +1604,7 @@ nodes:
16041604
foo.bar += value # binary_operator `:+`
16051605
^
16061606
- name: binary_operator_loc
1607-
type: location
1607+
type: slice
16081608
comment: |
16091609
Represents the location of the binary operator.
16101610
@@ -1663,7 +1663,7 @@ nodes:
16631663
foo.bar ||= value # write_name `:bar=`
16641664
^^^
16651665
- name: operator_loc
1666-
type: location
1666+
type: slice
16671667
comment: |
16681668
Represents the location of the operator.
16691669
@@ -1746,7 +1746,7 @@ nodes:
17461746
foo => bar
17471747
^^^
17481748
- name: operator_loc
1749-
type: location
1749+
type: slice
17501750
comment: |
17511751
Represents the location of the `=>` operator.
17521752
@@ -1784,14 +1784,14 @@ nodes:
17841784
case true; in false; else; end
17851785
^^^^
17861786
- name: case_keyword_loc
1787-
type: location
1787+
type: slice
17881788
comment: |
17891789
Represents the location of the `case` keyword.
17901790
17911791
case true; in false; end
17921792
^^^^
17931793
- name: end_keyword_loc
1794-
type: location
1794+
type: slice
17951795
comment: |
17961796
Represents the location of the `end` keyword.
17971797
@@ -1831,14 +1831,14 @@ nodes:
18311831
case true; when false; else; end
18321832
^^^^
18331833
- name: case_keyword_loc
1834-
type: location
1834+
type: slice
18351835
comment: |
18361836
Represents the location of the `case` keyword.
18371837
18381838
case true; when false; end
18391839
^^^^
18401840
- name: end_keyword_loc
1841-
type: location
1841+
type: slice
18421842
comment: |
18431843
Represents the location of the `end` keyword.
18441844
@@ -1856,7 +1856,7 @@ nodes:
18561856
- name: locals
18571857
type: constant[]
18581858
- name: class_keyword_loc
1859-
type: location
1859+
type: slice
18601860
comment: |
18611861
Represents the location of the `class` keyword.
18621862
@@ -1895,7 +1895,7 @@ nodes:
18951895
foo
18961896
^^^
18971897
- name: end_keyword_loc
1898-
type: location
1898+
type: slice
18991899
comment: |
19001900
Represents the location of the `end` keyword.
19011901
@@ -1929,7 +1929,7 @@ nodes:
19291929
@@target &&= value
19301930
^^^^^^^^
19311931
- name: operator_loc
1932-
type: location
1932+
type: slice
19331933
comment: |
19341934
Represents the location of the `&&=` operator.
19351935
@@ -1955,7 +1955,7 @@ nodes:
19551955
- name: name_loc
19561956
type: location
19571957
- name: binary_operator_loc
1958-
type: location
1958+
type: slice
19591959
- name: value
19601960
type: node
19611961
kind: non-void expression
@@ -1973,7 +1973,7 @@ nodes:
19731973
- name: name_loc
19741974
type: location
19751975
- name: operator_loc
1976-
type: location
1976+
type: slice
19771977
- name: value
19781978
type: node
19791979
kind: non-void expression
@@ -2035,7 +2035,7 @@ nodes:
20352035
@@_xyz = 123
20362036
^^^
20372037
- name: operator_loc
2038-
type: location
2038+
type: slice
20392039
comment: |
20402040
The location of the `=` operator.
20412041
@@ -2053,7 +2053,7 @@ nodes:
20532053
- name: name_loc
20542054
type: location
20552055
- name: operator_loc
2056-
type: location
2056+
type: slice
20572057
- name: value
20582058
type: node
20592059
kind: non-void expression
@@ -4569,7 +4569,7 @@ nodes:
45694569
- SymbolNode
45704570
- InterpolatedSymbolNode
45714571
- name: keyword_loc
4572-
type: location
4572+
type: slice
45734573
comment: |
45744574
Represents the use of the `undef` keyword.
45754575
@@ -4578,7 +4578,7 @@ nodes:
45784578
- name: UnlessNode
45794579
fields:
45804580
- name: keyword_loc
4581-
type: location
4581+
type: slice
45824582
comment: |
45834583
The location of the `unless` keyword.
45844584
@@ -4642,7 +4642,7 @@ nodes:
46424642
flags: LoopFlags
46434643
fields:
46444644
- name: keyword_loc
4645-
type: location
4645+
type: slice
46464646
- name: do_keyword_loc
46474647
type: location?
46484648
- name: closing_loc
@@ -4665,7 +4665,7 @@ nodes:
46654665
- name: WhenNode
46664666
fields:
46674667
- name: keyword_loc
4668-
type: location
4668+
type: slice
46694669
- name: conditions
46704670
type: node[]
46714671
kind: non-void expression
@@ -4685,7 +4685,7 @@ nodes:
46854685
flags: LoopFlags
46864686
fields:
46874687
- name: keyword_loc
4688-
type: location
4688+
type: slice
46894689
- name: do_keyword_loc
46904690
type: location?
46914691
- name: closing_loc
@@ -4724,7 +4724,7 @@ nodes:
47244724
- name: YieldNode
47254725
fields:
47264726
- name: keyword_loc
4727-
type: location
4727+
type: slice
47284728
- name: lparen_loc
47294729
type: location?
47304730
- name: arguments

0 commit comments

Comments
 (0)