summaryrefslogtreecommitdiff
path: root/lib/rdoc/parser
AgeCommit message (Collapse)Author
2025-01-15Migrate rdoc as bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12577
2025-01-03[ruby/rdoc] Fix prism_ruby superclass resolve ordertomoya ishida
(https://github.com/ruby/rdoc/pull/1267) RDoc::Parser::PrismRuby wrongly resolves superclass of `class Cipher < Cipher; end` that exist in openssl. Superclass resolve should be done before adding class. https://github.com/ruby/rdoc/commit/57a4615a92
2024-12-16[ruby/rdoc] Fix to parse `rb_define_global_const`Nobuyoshi Nakada
https://github.com/ruby/ruby/pull/12357 https://github.com/ruby/rdoc/commit/458ecbb7f7
2024-12-05[ruby/rdoc] Deprecate `main` and `title` directivesStan Lo
(https://github.com/ruby/rdoc/pull/1218) * Deprecate :main: directive * Deprecate :title: direcive * Update documentation * Remove :main: directive's usage * Update test cases * Add '.rdoc_options' to suggested alternatives https://github.com/ruby/rdoc/commit/e2d4ac9dad
2024-08-05Sync rdocStan Lo
Notes: Merged: https://github.com/ruby/ruby/pull/11308
2024-07-31[ruby/rdoc] Add new ruby parser that uses Prismtomoya ishida
(https://github.com/ruby/rdoc/pull/1144) * Add a new ruby parser RDoc::Parser::PrismRuby * Add a new ruby parser testcase independent from parser's internal implementation * unknown meta method * Use MethodSignatureVisitor only to scan params, block_params and calls_super * Add calls_super test * Drop ruby 2.6. Prism requires ruby >= 2.7 * Remove duplicated documentation comment from prism_ruby.rb * Add test for wrong argument passed to metaprogramming method * Rename visit_call_[DSL_METHOD_NAME] to make it distinguishable from visit_[NODE_TYPE]_node * Method receiver switch of true/false/nil to a case statement * Extract common part of add_method(by def keyword) and add meta_comment method * Reuse consecutive comments array when collecting comments * Simplify DSL call_node handling * Refactor extracting method visibility arguments https://github.com/ruby/rdoc/commit/fde99f1be6
2024-07-17[ruby/rdoc] Improve rubocop setupStan Lo
(https://github.com/ruby/rdoc/pull/1139) * Rename rake rubocop to rake format_generated_files * Add rubocop rules to ensure spaces are applied consistently * Improve rubocop related CI workflows https://github.com/ruby/rdoc/commit/27932d001c
2024-07-16[ruby/rdoc] Drop reimplementation of Ripper lex statenicholas a. evans
(https://github.com/ruby/rdoc/pull/1118) * Drop reimplementation of Ripper lex state This code was for ruby 2.4 compatibility, but rdoc dropped support for ruby 2.4 about three years ago, in f480b970c. This code was almost half of the lines of code in rdoc/parser/ripper_state_lex. * Remove unused Ripper constants and const_defined? This was mostly copied from the diff in @st0012's PR comment. The remaining constants have been updated to get their value directly from Ripper. Co-authored-by: Stan Lo <[email protected]> * Use Ripper::EXPR_LABEL directly Since this is only used from outside RipperStateLex, there's no longer any benefit to using the indirect reference rather than just going straight to Ripper. --------- https://github.com/ruby/rdoc/commit/dd8c216263 Co-authored-by: Stan Lo <[email protected]>
2024-07-01[ruby/rdoc] Fix some typos (https://github.com/ruby/rdoc/pull/1129)Yudai Takada
* constist ==> consist * Tidyness ==> Tidiness * Currentry ==> Currently * valus ==> values https://github.com/ruby/rdoc/commit/8412705721
2024-02-09[ruby/rdoc] Don't document aliases with trailing `:nodoc` directivePetrik
Attribute readers and writers can be marked as `:nodoc` to keep them undocumented: ```ruby attr_reader :name # :nodoc: ``` For aliases this behaviour should be the same: ```ruby alias_method :old :new # :nodoc: ``` https://github.com/ruby/rdoc/commit/30f14e8271
2024-01-07[ruby/rdoc] Visibility should begin from `public` for each scopeNobuyoshi Nakada
Even for singleton class definition such as `class << self` that shares the same container with the outer scope, its visibility is separated and set to `public` by default. https://github.com/ruby/rdoc/commit/baf26363b9
2024-01-07[ruby/rdoc] Singleton method visibility should be isolatedNobuyoshi Nakada
Each singleton method definition of the form `def recv.method` has visibility separate from the outer scope and is set to `public` by default. https://github.com/ruby/rdoc/commit/810913a7ea
2023-12-25[ruby/rdoc] Fix support for `rb_file_const` and `rb_curses_define_const`Nobuyoshi Nakada
Constant definitions using these functions have been supported, but since RDoc::Parser::C#gen_const_table did not consider other than `rb_define_const` the documents for them have not been found, without `Document-const` direvtive. Fixes https://github.com/ruby/rdoc/issues/1067 https://github.com/ruby/rdoc/commit/cdad51a60b
2023-12-16[ruby/rdoc] [DOC] nodoc for probably internal methodsNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/f7dd147a8c
2023-12-16[ruby/rdoc] [DOC] Add missing documentsNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/e4c90340d0
2023-12-06[ruby/rdoc] Only word-ending colon separates new definitionNobuyoshi Nakada
When followed by non-space characters, rather it looks like a URL or a path name on Windows. https://github.com/ruby/rdoc/commit/72c6560773
2023-12-06[ruby/rdoc] Needs more backslash to match escaping backslashsNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/1904e9076d
2023-12-05[ruby/rdoc] Allow any single-word token upto 2 before C method implementationNobuyoshi Nakada
Previously only unknown word `intern` is allowed between a single-word token before a C method. Now any single-word token, such as `inline` which is used for `ArithmeticSequence` in enumerator.c, is allowed instead. https://github.com/ruby/rdoc/commit/3a214c1dd1
2023-12-05[ruby/rdoc] Reduce matched substring allocationsNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/aaed688a97
2023-09-05[ruby/rdoc] handle symbols declared with `%s`theo-squadracer
https://github.com/ruby/rdoc/commit/ed91c4b784
2023-06-03[ruby/rdoc] Auto-correct trailing new linesVinicius Stock
https://github.com/ruby/rdoc/commit/4b68c0728a
2023-04-29[ruby/rdoc] Fix polynominal backtrackingNobuyoshi Nakada
Fix https://github.com/ruby/rdoc/pull/995 https://github.com/ruby/rdoc/commit/adfa7db5b9
2023-02-21[ruby/rdoc] Fix RDoc::Parser::Ruby not being documentedÉtienne Barrié
The calls to require prevent the class from being documented. https://github.com/ruby/rdoc/commit/76283fc42e
2022-11-27[ruby/rdoc] Pull up handle_tab_width to RDoc::ParserNobuyoshi Nakada
To share with the duplicate code in RDoc::Parser::Ruby#initialize. https://github.com/ruby/rdoc/commit/27829ac119
2022-06-28[ruby/rdoc] Support attributes defined by `rb_struct_define`Nobuyoshi Nakada
https://github.com/ruby/rdoc/commit/854b370763
2022-06-28[ruby/rdoc] Parse also InitVM-prefixed functionsNobuyoshi Nakada
Initialization depending on VM is separated. https://github.com/ruby/rdoc/commit/030d10fccd
2022-06-07[ruby/rdoc] [DOC] Undocument internal constants [ci skip]Nobuyoshi Nakada
https://github.com/ruby/rdoc/commit/6d7bf24bb8
2022-06-07[ruby/rdoc] Allow boolean arguments to `rb_attr` and `rb_define_attr`Nobuyoshi Nakada
Currently only literal `0` and `1` are accepted as `read`/`write` flags. This patch allows other boolean arguments, C macros (`FALSE`/`TRUE`), Ruby `VALUE`s (`Qfalse`/`Qtrue`), and C99 `bool`s (`false`/`true`), as well. https://github.com/ruby/rdoc/commit/169dc02e3c
2022-03-16[ruby/rdoc] Fix full name of known classNobuyoshi Nakada
Properly set the name of `File::Constants`, which is the only name with a namespace in `RDoc::KNOWN_CLASSES`, and fixes longstanding bug that `File::Constants` becomes `File::File::Constants`. When it is generated by `rb_file_const` in dir.c, `name` is set to the qualified name as same as `full_name`, and generated in the normal way in file.c later, already set `full_name` is cleared and `name` will be constructed from the enclosing namespace and the `name`. It will results in duplicated namespace, `File::File::Constants`. https://github.com/ruby/rdoc/commit/3a8d6df562
2022-02-09[ruby/rdoc] Get rid of ruby-mode.el confusionsNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/63fac51198
2022-02-09[ruby/rdoc] Skip parentheses on singleton class declarationSoutaro Matsumoto
https://github.com/ruby/rdoc/commit/b6c6d4f978
2022-02-09[ruby/rdoc] Support all struct definition functionsNobuyoshi Nakada
Currently only `rb_struct_define_without_accessor` is supported by https://github.com/ruby/rdoc/pull/73. We should support other three functions too. https://github.com/ruby/rdoc/commit/d42288f06c
2021-10-16[ruby/rdoc] feat: add support for :category: on C functionsMike Dalessio
https://github.com/ruby/rdoc/commit/45c92005fe
2021-10-16[ruby/rdoc] fix: comments in C files use the global markup optionMike Dalessio
Previously, Parser::C comments all defaulted to "rdoc" format, even when the user had set a different default with the `--markup=<choice>` option. https://github.com/ruby/rdoc/commit/4643b08a26
2021-10-16[ruby/rdoc] extract Comment creation in Parser::CMike Dalessio
This is a prefactor for fixing comment format handling. https://github.com/ruby/rdoc/commit/a3d366feed
2021-07-05[ruby/rdoc] Support ActiveSupport::Concern.includedaycabta
ref. https://github.com/rails/rails/blob/168ddaa08a63cd956bb7c3ba10be1a7ae36d4ee2/activerecord/lib/active_record/core.rb#L9-L20 https://github.com/ruby/rdoc/commit/a2d651dade Co-authored-by: Fumiaki MATSUSHIMA <[email protected]>
2021-01-25[ruby/rdoc] Support iso-strict format in git-logNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/2a6c22da63
2021-01-25[ruby/rdoc] Support other date formats in git-logNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/ad8cf37d72
2021-01-24[ruby/rdoc] Skip non-date logs by git-logNobuyoshi Nakada
`RDoc::Parser::ChangeLog` mis-parses ChangeLog generated by git-log, because of too heuristic `Time.parse`. For instance, "commit 8187228de0142d3ac7950b7d977c2849e934c637" results in "8187-08-16", that is, day 228 in the year 8187. https://github.com/ruby/rdoc/commit/9711e6f6d9
2021-01-24[ruby/rdoc] Sort by CommitDate if availableNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/455715e930
2021-01-24[ruby/rdoc] Add links to the commitsNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/1821628076
2021-01-24[ruby/rdoc] Shorten commit hashesNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/5d3e153963
2021-01-24[ruby/rdoc] Tweak log entry markdownNobuyoshi Nakada
* add 3 levels to headings * prefix commit log to labels to make unique IDs https://github.com/ruby/rdoc/commit/5074c13209
2021-01-24[ruby/rdoc] Make each commit entries h3Nobuyoshi Nakada
https://github.com/ruby/rdoc/commit/11eefb2ae9
2021-01-24[ruby/rdoc] Support ChangeLog generated by `git log`Nobuyoshi Nakada
https://github.com/ruby/rdoc/commit/5e0a123ca1
2020-12-11Exclude parenthesized function declarations such as NORETURNNobuyoshi Nakada
Fixes https://github.com/ruby/ruby/pull/3883
2020-07-22[ruby/rdoc] Fix parsing of rb_define_module_underJeremy Evans
Fixes Ruby Bug #15819 https://github.com/ruby/rdoc/commit/94a052d833
2020-05-24[ruby/rdoc] Treat multiple Ruby methods calling the same C method as aliasesJeremy Evans
Previously, only calls to rb_define_alias were treated as aliases. This treats calls to rb_define_method with the same C function as aliases, with the first function defined being the primary method. This move the dedup code from the C parser to AnyMethod, and has AnyMethod look in its aliases to find the call_seq. Switch the deduplication code to remove lines matching one of the other aliases, instead of only keeping lines matching the current alias. The previous approach could eliminate all call_seq lines in cases where no line matched. This was necessary to pass tests when call_seq does deduplication by default. The only change to the darkfish template is to not perform unnecessary work by deduplicating twice. https://github.com/ruby/rdoc/commit/0ead78616b
2019-12-24[ruby/rdoc] Support newline in the middle of constant definitionaycabta
https://github.com/ruby/rdoc/commit/74d3984324
2019-12-24[ruby/rdoc] Treat Proc#call syntax sugar for constant correctlyaycabta
https://github.com/ruby/rdoc/commit/957d041ae0