@@ -589,7 +589,6 @@ def new_comment comment
589
589
# +comment+.
590
590
591
591
def parse_attr ( context , single , tk , comment )
592
- offset = tk . seek
593
592
line_no = tk . line_no
594
593
595
594
args = parse_symbol_arg 1
@@ -606,7 +605,6 @@ def parse_attr(context, single, tk, comment)
606
605
end
607
606
608
607
att = create_attr context , single , name , rw , comment
609
- att . offset = offset
610
608
att . line = line_no
611
609
612
610
read_documentation_modifiers att , RDoc ::ATTR_MODIFIERS
@@ -620,7 +618,6 @@ def parse_attr(context, single, tk, comment)
620
618
# comment for each to +comment+.
621
619
622
620
def parse_attr_accessor ( context , single , tk , comment )
623
- offset = tk . seek
624
621
line_no = tk . line_no
625
622
626
623
args = parse_symbol_arg
@@ -642,7 +639,6 @@ def parse_attr_accessor(context, single, tk, comment)
642
639
643
640
for name in args
644
641
att = create_attr context , single , name , rw , comment
645
- att . offset = offset
646
642
att . line = line_no
647
643
end
648
644
end
@@ -651,7 +647,6 @@ def parse_attr_accessor(context, single, tk, comment)
651
647
# Parses an +alias+ in +context+ with +comment+
652
648
653
649
def parse_alias ( context , single , tk , comment )
654
- offset = tk . seek
655
650
line_no = tk . line_no
656
651
657
652
skip_tkspace
@@ -680,7 +675,6 @@ def parse_alias(context, single, tk, comment)
680
675
al = RDoc ::Alias . new ( get_tkread , old_name , new_name , comment ,
681
676
single == SINGLE )
682
677
record_location al
683
- al . offset = offset
684
678
al . line = line_no
685
679
686
680
read_documentation_modifiers al , RDoc ::ATTR_MODIFIERS
@@ -733,7 +727,6 @@ def parse_call_parameters(tk)
733
727
# Parses a class in +context+ with +comment+
734
728
735
729
def parse_class container , single , tk , comment
736
- offset = tk . seek
737
730
line_no = tk . line_no
738
731
739
732
declaration_context = container
@@ -748,7 +741,7 @@ def parse_class container, single, tk, comment
748
741
case name = get_class_specification
749
742
when 'self' , container . name
750
743
parse_statements container , SINGLE
751
- return # don't update offset or line
744
+ return # don't update line
752
745
else
753
746
parse_class_singleton container , name , comment
754
747
end
@@ -757,7 +750,6 @@ def parse_class container, single, tk, comment
757
750
return
758
751
end
759
752
760
- cls . offset = offset
761
753
cls . line = line_no
762
754
763
755
cls
@@ -845,7 +837,6 @@ def parse_class_singleton container, name, comment # :nodoc:
845
837
# true, no found constants will be added to RDoc.
846
838
847
839
def parse_constant container , tk , comment , ignore_constants = false
848
- offset = tk . seek
849
840
line_no = tk . line_no
850
841
851
842
name = tk . name
@@ -885,7 +876,6 @@ def parse_constant container, tk, comment, ignore_constants = false
885
876
886
877
value . replace body
887
878
record_location con
888
- con . offset = offset
889
879
con . line = line_no
890
880
read_documentation_modifiers con , RDoc ::CONSTANT_MODIFIERS
891
881
@@ -950,7 +940,6 @@ def parse_constant_body container, constant # :nodoc:
950
940
def parse_comment container , tk , comment
951
941
return parse_comment_tomdoc container , tk , comment if @markup == 'tomdoc'
952
942
column = tk . char_no
953
- offset = tk . seek
954
943
line_no = tk . line_no
955
944
956
945
text = comment . text
@@ -966,7 +955,6 @@ def parse_comment container, tk, comment
966
955
967
956
if co then
968
957
co . singleton = singleton
969
- co . offset = offset
970
958
co . line = line_no
971
959
end
972
960
@@ -1031,19 +1019,18 @@ def parse_comment_ghost container, text, name, column, line_no, # :nodoc:
1031
1019
1032
1020
def parse_comment_tomdoc container , tk , comment
1033
1021
return unless signature = RDoc ::TomDoc . signature ( comment )
1034
- offset = tk . seek
1022
+ column = tk . char_no
1035
1023
line_no = tk . line_no
1036
1024
1037
1025
name , = signature . split %r%[ \( ]% , 2
1038
1026
1039
1027
meth = RDoc ::GhostMethod . new get_tkread , name
1040
1028
record_location meth
1041
- meth . offset = offset
1042
1029
meth . line = line_no
1043
1030
1044
1031
meth . start_collecting_tokens
1045
1032
indent = TkSPACE . new 0 , 1 , 1
1046
- indent . set_text " " * offset
1033
+ indent . set_text " " * column
1047
1034
1048
1035
position_comment = TkCOMMENT . new 0 , line_no , 1
1049
1036
position_comment . set_text "# File #{ @top_level . relative_name } , line #{ line_no } "
@@ -1183,7 +1170,6 @@ def parse_meta_attr(context, single, tk, comment)
1183
1170
1184
1171
def parse_meta_method ( container , single , tk , comment )
1185
1172
column = tk . char_no
1186
- offset = tk . seek
1187
1173
line_no = tk . line_no
1188
1174
1189
1175
start_collecting_tokens
@@ -1200,7 +1186,6 @@ def parse_meta_method(container, single, tk, comment)
1200
1186
1201
1187
meth = RDoc ::MetaMethod . new get_tkread , name
1202
1188
record_location meth
1203
- meth . offset = offset
1204
1189
meth . line = line_no
1205
1190
meth . singleton = singleton
1206
1191
@@ -1291,7 +1276,6 @@ def parse_method(container, single, tk, comment)
1291
1276
added_container = false
1292
1277
name = nil
1293
1278
column = tk . char_no
1294
- offset = tk . seek
1295
1279
line_no = tk . line_no
1296
1280
1297
1281
start_collecting_tokens
@@ -1309,7 +1293,6 @@ def parse_method(container, single, tk, comment)
1309
1293
meth . singleton = single == SINGLE ? true : singleton
1310
1294
1311
1295
record_location meth
1312
- meth . offset = offset
1313
1296
meth . line = line_no
1314
1297
1315
1298
meth . start_collecting_tokens
0 commit comments