mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
![]() This change introduces a wrapper of StringScanner that is aware of the current position (column and lineno). It has two advantages: faster and more modular. The old code frequently runs `@input.byteslice(0, byte_offset).length` to get the current position, but it was painfully slow. This change keeps track of the position at each scan, which reduces about half of time of "Generating RI format into ..." in Ruby's `make rdoc` (5.5 sec -> 3.0 sec). And the old code used four instance variables (`@input`, `@line`, `@line_pos`, and `@s`) to track the position. This change factors them out into MyStringScanner, so now only one variable (`@s`) is needed. |
||
---|---|---|
.. | ||
attr_changer.rb | ||
attr_span.rb | ||
attribute_manager.rb | ||
attributes.rb | ||
blank_line.rb | ||
block_quote.rb | ||
document.rb | ||
formatter.rb | ||
formatter_test_case.rb | ||
hard_break.rb | ||
heading.rb | ||
include.rb | ||
indented_paragraph.rb | ||
list.rb | ||
list_item.rb | ||
paragraph.rb | ||
parser.rb | ||
pre_process.rb | ||
raw.rb | ||
regexp_handling.rb | ||
rule.rb | ||
text_formatter_test_case.rb | ||
to_ansi.rb | ||
to_bs.rb | ||
to_html.rb | ||
to_html_crossref.rb | ||
to_html_snippet.rb | ||
to_joined_paragraph.rb | ||
to_label.rb | ||
to_markdown.rb | ||
to_rdoc.rb | ||
to_table_of_contents.rb | ||
to_test.rb | ||
to_tt_only.rb | ||
verbatim.rb |