docspring 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +4 -4
- data/README.md +11 -5
- data/docs/CreateHtmlSubmissionData.md +3 -1
- data/docs/CreatePdfSubmissionData.md +3 -1
- data/docs/PDFApi.md +156 -10
- data/docs/PublishVersionData.md +20 -0
- data/docs/RestoreVersionData.md +18 -0
- data/docs/Submission.md +4 -0
- data/docs/SubmissionPreview.md +4 -0
- data/docs/Template.md +15 -1
- data/docs/TemplateDeleteResponse.md +24 -0
- data/docs/TemplatePreview.md +13 -1
- data/docs/TemplatePublishVersionResponse.md +22 -0
- data/lib/docspring/api/pdf_api.rb +152 -5
- data/lib/docspring/api_client.rb +1 -1
- data/lib/docspring/models/combined_submission_action.rb +1 -5
- data/lib/docspring/models/create_html_submission_data.rb +13 -4
- data/lib/docspring/models/create_pdf_submission_data.rb +13 -4
- data/lib/docspring/models/publish_version_data.rb +230 -0
- data/lib/docspring/models/restore_version_data.rb +221 -0
- data/lib/docspring/models/submission.rb +41 -1
- data/lib/docspring/models/submission_data_request_event.rb +1 -5
- data/lib/docspring/models/submission_preview.rb +41 -1
- data/lib/docspring/models/template.rb +106 -4
- data/lib/docspring/models/template_delete_response.rb +287 -0
- data/lib/docspring/models/template_preview.rb +88 -4
- data/lib/docspring/models/template_publish_version_response.rb +282 -0
- data/lib/docspring/version.rb +1 -1
- data/lib/docspring.rb +4 -0
- data/spec/api/pdf_api_spec.rb +27 -2
- data/spec/models/create_html_submission_data_spec.rb +6 -0
- data/spec/models/create_pdf_submission_data_spec.rb +6 -0
- data/spec/models/publish_version_data_spec.rb +42 -0
- data/spec/models/restore_version_data_spec.rb +36 -0
- data/spec/models/submission_preview_spec.rb +16 -0
- data/spec/models/submission_spec.rb +16 -0
- data/spec/models/template_delete_response_spec.rb +58 -0
- data/spec/models/template_preview_spec.rb +40 -0
- data/spec/models/template_publish_version_response_spec.rb +52 -0
- data/spec/models/template_spec.rb +46 -0
- data/vendor/bundle/ruby/3.3.0/bin/irb +29 -0
- data/vendor/bundle/ruby/3.3.0/bin/rdbg +29 -0
- data/vendor/bundle/ruby/3.3.0/bin/rdoc +29 -0
- data/vendor/bundle/ruby/3.3.0/bin/ri +29 -0
- data/vendor/bundle/ruby/3.3.0/cache/ast-2.4.3.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/cache/debug-1.10.0.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/cache/io-console-0.8.0.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/cache/irb-1.15.1.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/cache/parser-3.3.7.2.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/cache/pp-0.6.2.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/cache/prettyprint-0.2.0.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/cache/rdoc-6.12.0.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/cache/reline-0.6.0.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-24/3.3.0/debug-1.10.0/debug/debug.bundle +0 -0
- data/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-24/3.3.0/debug-1.10.0/gem.build_complete +0 -0
- data/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-24/3.3.0/debug-1.10.0/gem_make.out +19 -0
- data/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-24/3.3.0/io-console-0.8.0/gem.build_complete +0 -0
- data/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-24/3.3.0/io-console-0.8.0/gem_make.out +31 -0
- data/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-24/3.3.0/io-console-0.8.0/io/console.bundle +0 -0
- data/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-24/3.3.0/io-console-0.8.0/mkmf.log +447 -0
- data/vendor/bundle/ruby/3.3.0/gems/ast-2.4.3/LICENSE.MIT +20 -0
- data/vendor/bundle/ruby/3.3.0/gems/ast-2.4.3/README.YARD.md +12 -0
- data/vendor/bundle/ruby/3.3.0/gems/ast-2.4.3/lib/ast/node.rb +268 -0
- data/vendor/bundle/ruby/3.3.0/gems/ast-2.4.3/lib/ast/processor/mixin.rb +288 -0
- data/vendor/bundle/ruby/3.3.0/gems/ast-2.4.3/lib/ast/processor.rb +12 -0
- data/vendor/bundle/ruby/3.3.0/gems/ast-2.4.3/lib/ast/sexp.rb +30 -0
- data/vendor/bundle/ruby/3.3.0/gems/ast-2.4.3/lib/ast.rb +17 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/CONTRIBUTING.md +573 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/Gemfile +10 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/README.md +970 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/Rakefile +57 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/TODO.md +23 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/debug.gemspec +33 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/exe/rdbg +53 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/ext/debug/Makefile +270 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/ext/debug/debug.c +228 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/ext/debug/debug_version.h +1 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/ext/debug/extconf.rb +27 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/ext/debug/iseq_collector.c +93 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/abbrev_command.rb +77 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/breakpoint.rb +556 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/client.rb +263 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/color.rb +123 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/config.rb +590 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/console.rb +213 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/dap_custom/traceInspector.rb +336 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/debug.bundle +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/frame_info.rb +188 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/irb_integration.rb +37 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/local.rb +115 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/open.rb +13 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/open_nonstop.rb +15 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/prelude.rb +50 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/server.rb +534 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/server_cdp.rb +1348 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/server_dap.rb +1108 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/session.rb +2659 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/source_repository.rb +150 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/start.rb +5 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/thread_client.rb +1455 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/tracer.rb +241 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug/version.rb +5 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/lib/debug.rb +9 -0
- data/vendor/bundle/ruby/3.3.0/gems/debug-1.10.0/misc/README.md.erb +636 -0
- data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.0/.document +5 -0
- data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.0/BSDL +22 -0
- data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.0/COPYING +56 -0
- data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.0/README.md +46 -0
- data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.0/ext/io/console/Makefile +272 -0
- data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.0/ext/io/console/console.c +1969 -0
- data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.0/ext/io/console/extconf.rb +61 -0
- data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.0/ext/io/console/win32_vk.inc +1390 -0
- data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.0/lib/io/console/size.rb +23 -0
- data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.0/lib/io/console.bundle +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/Gemfile +29 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/README.md +125 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/Rakefile +52 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/bin/console +6 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/bin/setup +6 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/doc/irb/irb-tools.rd.ja +184 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/doc/irb/irb.rd.ja +425 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/exe/irb +9 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/irb.gemspec +46 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/cmd/nop.rb +4 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/color.rb +263 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/color_printer.rb +56 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/backtrace.rb +17 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/base.rb +60 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/break.rb +17 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/catch.rb +17 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/cd.rb +51 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/chws.rb +40 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/context.rb +16 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/continue.rb +17 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/copy.rb +73 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/debug.rb +73 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/delete.rb +17 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/disable_irb.rb +19 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/edit.rb +63 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/exit.rb +18 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/finish.rb +17 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/force_exit.rb +18 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/help.rb +83 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/history.rb +45 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/info.rb +17 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/internal_helpers.rb +27 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/irb_info.rb +33 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/load.rb +91 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/ls.rb +167 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/measure.rb +49 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/next.rb +17 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/pushws.rb +65 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/show_doc.rb +51 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/show_source.rb +74 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/step.rb +17 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/subirb.rb +123 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command/whereami.rb +23 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/command.rb +23 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/completion.rb +504 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/context.rb +751 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/debug/ui.rb +101 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/debug.rb +127 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/default_commands.rb +279 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/easter-egg.rb +152 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/ext/change-ws.rb +37 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/ext/eval_history.rb +149 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/ext/loader.rb +127 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/ext/multi-irb.rb +258 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/ext/tracer.rb +39 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/ext/use-loader.rb +67 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/ext/workspaces.rb +36 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/frame.rb +80 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/help.rb +28 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/helper_method/base.rb +16 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/helper_method/conf.rb +11 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/helper_method.rb +29 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/history.rb +116 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/init.rb +540 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/input-method.rb +515 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/inspector.rb +136 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/lc/error.rb +52 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/lc/help-message +55 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/lc/ja/error.rb +53 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/lc/ja/help-message +58 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/locale.rb +153 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/nesting_parser.rb +239 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/notifier.rb +230 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/output-method.rb +80 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/pager.rb +213 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/ruby-lex.rb +476 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/ruby_logo.aa +118 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/source_finder.rb +138 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/statement.rb +101 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/version.rb +11 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/workspace.rb +171 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/ws-for-case-2.rb +9 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb/xmp.rb +164 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/lib/irb.rb +736 -0
- data/vendor/bundle/ruby/3.3.0/gems/irb-1.15.1/man/irb.1 +292 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/LICENSE.txt +26 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/bin/ruby-parse +7 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/bin/ruby-rewrite +7 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/gauntlet_parser.rb +123 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/all.rb +17 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/ast/node.rb +40 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/ast/processor.rb +293 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/base.rb +291 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/builders/default.rb +2338 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/clobbering_error.rb +13 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/color.rb +32 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/context.rb +51 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/current.rb +137 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/current_arg_stack.rb +46 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/deprecation.rb +13 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/diagnostic/engine.rb +104 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/diagnostic.rb +163 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/lexer/dedenter.rb +88 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/lexer/explanation.rb +55 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/lexer/literal.rb +284 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/lexer/stack_state.rb +49 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/lexer-F0.rb +12922 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/lexer-F1.rb +14875 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/lexer-strings.rb +5424 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/macruby.rb +9634 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/max_numparam_stack.rb +56 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/messages.rb +125 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/meta.rb +48 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/rewriter.rb +105 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/ruby18.rb +9272 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/ruby19.rb +9558 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/ruby20.rb +10229 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/ruby21.rb +10203 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/ruby22.rb +10302 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/ruby23.rb +10322 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/ruby24.rb +10454 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/ruby25.rb +10374 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/ruby26.rb +10352 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/ruby27.rb +11947 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/ruby30.rb +12243 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/ruby31.rb +12716 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/ruby32.rb +12704 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/ruby33.rb +12589 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/ruby34.rb +12596 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/rubymotion.rb +9515 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/runner/ruby_parse.rb +157 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/runner/ruby_rewrite.rb +101 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/runner.rb +299 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/buffer.rb +369 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/comment/associator.rb +233 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/comment.rb +134 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/map/collection.rb +18 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/map/condition.rb +21 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/map/constant.rb +32 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/map/definition.rb +23 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/map/for.rb +19 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/map/heredoc.rb +19 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/map/index.rb +33 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/map/keyword.rb +20 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/map/method_definition.rb +25 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/map/objc_kwarg.rb +19 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/map/operator.rb +17 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/map/rescue_body.rb +21 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/map/send.rb +36 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/map/ternary.rb +18 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/map/variable.rb +31 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/map.rb +186 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/range.rb +326 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/rewriter/action.rb +44 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/rewriter.rb +513 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/tree_rewriter/action.rb +243 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/source/tree_rewriter.rb +431 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/static_environment.rb +134 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/syntax_error.rb +21 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/tree_rewriter.rb +133 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/unknown_encoding_in_magic_comment_error.rb +15 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/variables_stack.rb +36 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser/version.rb +5 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/lib/parser.rb +91 -0
- data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.7.2/parser.gemspec +43 -0
- data/vendor/bundle/ruby/3.3.0/gems/pp-0.6.2/BSDL +22 -0
- data/vendor/bundle/ruby/3.3.0/gems/pp-0.6.2/COPYING +56 -0
- data/vendor/bundle/ruby/3.3.0/gems/pp-0.6.2/lib/pp.rb +699 -0
- data/vendor/bundle/ruby/3.3.0/gems/pp-0.6.2/pp.gemspec +35 -0
- data/vendor/bundle/ruby/3.3.0/gems/prettyprint-0.2.0/.github/dependabot.yml +6 -0
- data/vendor/bundle/ruby/3.3.0/gems/prettyprint-0.2.0/.github/workflows/test.yml +41 -0
- data/vendor/bundle/ruby/3.3.0/gems/prettyprint-0.2.0/.gitignore +8 -0
- data/vendor/bundle/ruby/3.3.0/gems/prettyprint-0.2.0/Gemfile +4 -0
- data/vendor/bundle/ruby/3.3.0/gems/prettyprint-0.2.0/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/3.3.0/gems/prettyprint-0.2.0/README.md +43 -0
- data/vendor/bundle/ruby/3.3.0/gems/prettyprint-0.2.0/Rakefile +10 -0
- data/vendor/bundle/ruby/3.3.0/gems/prettyprint-0.2.0/bin/console +14 -0
- data/vendor/bundle/ruby/3.3.0/gems/prettyprint-0.2.0/bin/setup +8 -0
- data/vendor/bundle/ruby/3.3.0/gems/prettyprint-0.2.0/lib/prettyprint.rb +558 -0
- data/vendor/bundle/ruby/3.3.0/gems/prettyprint-0.2.0/prettyprint.gemspec +29 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/CONTRIBUTING.rdoc +219 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/CVE-2013-0256.rdoc +49 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/ExampleMarkdown.md +39 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/ExampleRDoc.rdoc +210 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/History.rdoc +1668 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/LEGAL.rdoc +50 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/LICENSE.rdoc +59 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/README.rdoc +142 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/RI.md +842 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/TODO.rdoc +60 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/exe/rdoc +43 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/exe/ri +12 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/alias.rb +111 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/anon_class.rb +10 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/any_method.rb +379 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/attr.rb +175 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/class_module.rb +871 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/constant.rb +186 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/context/section.rb +175 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/context.rb +1264 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/extend.rb +9 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/ghost_method.rb +6 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/include.rb +9 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/meta_method.rb +6 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/method_attr.rb +430 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/mixin.rb +120 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/normal_class.rb +92 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/normal_module.rb +73 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/require.rb +51 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/single_class.rb +30 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object/top_level.rb +291 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_object.rb +426 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/code_objects.rb +5 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/comment.rb +239 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/cross_reference.rb +228 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/encoding.rb +120 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/erb_partial.rb +18 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/erbio.rb +37 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/darkfish.rb +824 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/json_index.rb +300 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/markup.rb +159 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/pot/message_extractor.rb +68 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/pot/po.rb +84 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/pot/po_entry.rb +141 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/pot.rb +99 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/ri.rb +30 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/_footer.rhtml +5 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/_head.rhtml +43 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml +19 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +34 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +15 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml +9 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +15 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +15 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +21 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml +11 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +32 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +6 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml +14 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +11 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +39 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/_sidebar_toggle.rhtml +3 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/class.rhtml +206 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/css/fonts.css +167 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/css/rdoc.css +668 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/add.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/arrow_up.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/brick.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/brick_link.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/bug.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/bullet_black.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/date.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/delete.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/find.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/macFFBgHack.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/package.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/page_green.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/page_white_text.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/page_white_width.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/plugin.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/ruby.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/tag_blue.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/tag_green.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/transparent.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/wrench.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/wrench_orange.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/images/zoom.png +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/index.rhtml +23 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/js/darkfish.js +120 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/js/search.js +110 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/page.rhtml +18 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml +20 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +65 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +70 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/json_index/js/navigation.js +105 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator/template/json_index/js/searcher.js +229 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/generator.rb +51 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/i18n/locale.rb +102 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/i18n/text.rb +126 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/i18n.rb +10 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/known_classes.rb +74 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markdown/entities.rb +2131 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markdown/literals.kpeg +21 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markdown/literals.rb +454 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markdown.kpeg +1244 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markdown.rb +16793 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/attr_changer.rb +22 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/attr_span.rb +35 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/attribute_manager.rb +405 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/attributes.rb +70 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/blank_line.rb +27 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/block_quote.rb +14 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/document.rb +164 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/formatter.rb +272 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/hard_break.rb +31 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/heading.rb +78 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/include.rb +42 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/indented_paragraph.rb +47 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/list.rb +101 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/list_item.rb +99 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/paragraph.rb +28 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/parser.rb +585 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/pre_process.rb +318 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/raw.rb +69 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/regexp_handling.rb +40 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/rule.rb +20 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/table.rb +56 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/to_ansi.rb +93 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/to_bs.rb +102 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/to_html.rb +452 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/to_html_crossref.rb +226 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/to_html_snippet.rb +287 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/to_joined_paragraph.rb +46 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/to_label.rb +74 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/to_markdown.rb +191 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/to_rdoc.rb +352 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/to_table_of_contents.rb +88 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/to_test.rb +69 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/to_tt_only.rb +120 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup/verbatim.rb +83 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/markup.rb +240 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/options.rb +1397 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/parser/c.rb +1260 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/parser/changelog.rb +350 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/parser/markdown.rb +22 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/parser/prism_ruby.rb +1099 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/parser/rd.rb +22 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/parser/ripper_state_lex.rb +302 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/parser/ruby.rb +2381 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/parser/ruby_tools.rb +165 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/parser/simple.rb +61 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/parser/text.rb +11 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/parser.rb +297 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/rd/block_parser.rb +1706 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/rd/block_parser.ry +643 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/rd/inline.rb +71 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/rd/inline_parser.rb +1854 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/rd/inline_parser.ry +593 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/rd.rb +99 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/rdoc.rb +566 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/ri/driver.rb +1558 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/ri/formatter.rb +6 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/ri/paths.rb +171 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/ri/store.rb +6 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/ri/task.rb +71 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/ri.rb +20 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/rubygems_hook.rb +330 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/servlet.rb +451 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/stats/normal.rb +58 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/stats/quiet.rb +59 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/stats/verbose.rb +44 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/stats.rb +461 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/store.rb +1001 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/task.rb +354 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/text.rb +322 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/token_stream.rb +118 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/tom_doc.rb +257 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc/version.rb +10 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rdoc.rb +211 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/lib/rubygems_plugin.rb +23 -0
- data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.12.0/man/ri.1 +247 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/BSDL +22 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/COPYING +56 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/README.md +94 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/config.rb +373 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/face.rb +199 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/history.rb +76 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/io/ansi.rb +325 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/io/dumb.rb +120 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/io/windows.rb +530 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/io.rb +55 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/key_actor/base.rb +37 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/key_actor/composite.rb +17 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/key_actor/emacs.rb +517 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/key_actor/vi_command.rb +518 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/key_actor/vi_insert.rb +517 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/key_actor.rb +8 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/key_stroke.rb +119 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/kill_ring.rb +125 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/line_editor.rb +2382 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/unicode/east_asian_width.rb +1267 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/unicode.rb +415 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline/version.rb +3 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/lib/reline.rb +519 -0
- data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.0/license_of_rb-readline +25 -0
- data/vendor/bundle/ruby/3.3.0/plugins/rdoc_plugin.rb +1 -0
- data/vendor/bundle/ruby/3.3.0/specifications/ast-2.4.3.gemspec +29 -0
- data/vendor/bundle/ruby/3.3.0/specifications/debug-1.10.0.gemspec +32 -0
- data/vendor/bundle/ruby/3.3.0/specifications/io-console-0.8.0.gemspec +25 -0
- data/vendor/bundle/ruby/3.3.0/specifications/irb-1.15.1.gemspec +31 -0
- data/vendor/bundle/ruby/3.3.0/specifications/parser-3.3.7.2.gemspec +37 -0
- data/vendor/bundle/ruby/3.3.0/specifications/pp-0.6.2.gemspec +27 -0
- data/vendor/bundle/ruby/3.3.0/specifications/prettyprint-0.2.0.gemspec +23 -0
- data/vendor/bundle/ruby/3.3.0/specifications/rdoc-6.12.0.gemspec +31 -0
- data/vendor/bundle/ruby/3.3.0/specifications/reline-0.6.0.gemspec +26 -0
- metadata +499 -3
@@ -0,0 +1,1260 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'tsort'
|
3
|
+
|
4
|
+
##
|
5
|
+
# RDoc::Parser::C attempts to parse C extension files. It looks for
|
6
|
+
# the standard patterns that you find in extensions: +rb_define_class+,
|
7
|
+
# +rb_define_method+ and so on. It tries to find the corresponding
|
8
|
+
# C source for the methods and extract comments, but if we fail
|
9
|
+
# we don't worry too much.
|
10
|
+
#
|
11
|
+
# The comments associated with a Ruby method are extracted from the C
|
12
|
+
# comment block associated with the routine that _implements_ that
|
13
|
+
# method, that is to say the method whose name is given in the
|
14
|
+
# +rb_define_method+ call. For example, you might write:
|
15
|
+
#
|
16
|
+
# /*
|
17
|
+
# * Returns a new array that is a one-dimensional flattening of this
|
18
|
+
# * array (recursively). That is, for every element that is an array,
|
19
|
+
# * extract its elements into the new array.
|
20
|
+
# *
|
21
|
+
# * s = [ 1, 2, 3 ] #=> [1, 2, 3]
|
22
|
+
# * t = [ 4, 5, 6, [7, 8] ] #=> [4, 5, 6, [7, 8]]
|
23
|
+
# * a = [ s, t, 9, 10 ] #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10]
|
24
|
+
# * a.flatten #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
25
|
+
# */
|
26
|
+
# static VALUE
|
27
|
+
# rb_ary_flatten(VALUE ary)
|
28
|
+
# {
|
29
|
+
# ary = rb_obj_dup(ary);
|
30
|
+
# rb_ary_flatten_bang(ary);
|
31
|
+
# return ary;
|
32
|
+
# }
|
33
|
+
#
|
34
|
+
# ...
|
35
|
+
#
|
36
|
+
# void
|
37
|
+
# Init_Array(void)
|
38
|
+
# {
|
39
|
+
# ...
|
40
|
+
# rb_define_method(rb_cArray, "flatten", rb_ary_flatten, 0);
|
41
|
+
#
|
42
|
+
# Here RDoc will determine from the +rb_define_method+ line that there's a
|
43
|
+
# method called "flatten" in class Array, and will look for the implementation
|
44
|
+
# in the method +rb_ary_flatten+. It will then use the comment from that
|
45
|
+
# method in the HTML output. This method must be in the same source file
|
46
|
+
# as the +rb_define_method+.
|
47
|
+
#
|
48
|
+
# The comment blocks may include special directives:
|
49
|
+
#
|
50
|
+
# [Document-class: +name+]
|
51
|
+
# Documentation for the named class.
|
52
|
+
#
|
53
|
+
# [Document-module: +name+]
|
54
|
+
# Documentation for the named module.
|
55
|
+
#
|
56
|
+
# [Document-const: +name+]
|
57
|
+
# Documentation for the named +rb_define_const+.
|
58
|
+
#
|
59
|
+
# Constant values can be supplied on the first line of the comment like so:
|
60
|
+
#
|
61
|
+
# /* 300: The highest possible score in bowling */
|
62
|
+
# rb_define_const(cFoo, "PERFECT", INT2FIX(300));
|
63
|
+
#
|
64
|
+
# The value can contain internal colons so long as they are escaped with a \
|
65
|
+
#
|
66
|
+
# [Document-global: +name+]
|
67
|
+
# Documentation for the named +rb_define_global_const+
|
68
|
+
#
|
69
|
+
# [Document-variable: +name+]
|
70
|
+
# Documentation for the named +rb_define_variable+
|
71
|
+
#
|
72
|
+
# [Document-method\: +method_name+]
|
73
|
+
# Documentation for the named method. Use this when the method name is
|
74
|
+
# unambiguous.
|
75
|
+
#
|
76
|
+
# [Document-method\: <tt>ClassName::method_name</tt>]
|
77
|
+
# Documentation for a singleton method in the given class. Use this when
|
78
|
+
# the method name alone is ambiguous.
|
79
|
+
#
|
80
|
+
# [Document-method\: <tt>ClassName#method_name</tt>]
|
81
|
+
# Documentation for a instance method in the given class. Use this when the
|
82
|
+
# method name alone is ambiguous.
|
83
|
+
#
|
84
|
+
# [Document-attr: +name+]
|
85
|
+
# Documentation for the named attribute.
|
86
|
+
#
|
87
|
+
# [call-seq: <i>text up to an empty line</i>]
|
88
|
+
# Because C source doesn't give descriptive names to Ruby-level parameters,
|
89
|
+
# you need to document the calling sequence explicitly
|
90
|
+
#
|
91
|
+
# In addition, RDoc assumes by default that the C method implementing a
|
92
|
+
# Ruby function is in the same source file as the rb_define_method call.
|
93
|
+
# If this isn't the case, add the comment:
|
94
|
+
#
|
95
|
+
# rb_define_method(....); // in filename
|
96
|
+
#
|
97
|
+
# As an example, we might have an extension that defines multiple classes
|
98
|
+
# in its Init_xxx method. We could document them using
|
99
|
+
#
|
100
|
+
# /*
|
101
|
+
# * Document-class: MyClass
|
102
|
+
# *
|
103
|
+
# * Encapsulate the writing and reading of the configuration
|
104
|
+
# * file. ...
|
105
|
+
# */
|
106
|
+
#
|
107
|
+
# /*
|
108
|
+
# * Document-method: read_value
|
109
|
+
# *
|
110
|
+
# * call-seq:
|
111
|
+
# * cfg.read_value(key) -> value
|
112
|
+
# * cfg.read_value(key} { |key| } -> value
|
113
|
+
# *
|
114
|
+
# * Return the value corresponding to +key+ from the configuration.
|
115
|
+
# * In the second form, if the key isn't found, invoke the
|
116
|
+
# * block and return its value.
|
117
|
+
# */
|
118
|
+
|
119
|
+
class RDoc::Parser::C < RDoc::Parser
|
120
|
+
|
121
|
+
parse_files_matching(/\.(?:([CcHh])\1?|c([+xp])\2|y)\z/)
|
122
|
+
|
123
|
+
include RDoc::Text
|
124
|
+
|
125
|
+
# :stopdoc:
|
126
|
+
BOOL_ARG_PATTERN = /\s*+\b([01]|Q?(?:true|false)|TRUE|FALSE)\b\s*/
|
127
|
+
TRUE_VALUES = ['1', 'TRUE', 'true', 'Qtrue'].freeze
|
128
|
+
# :startdoc:
|
129
|
+
|
130
|
+
##
|
131
|
+
# Maps C variable names to names of Ruby classes or modules
|
132
|
+
|
133
|
+
attr_reader :classes
|
134
|
+
|
135
|
+
##
|
136
|
+
# C file the parser is parsing
|
137
|
+
|
138
|
+
attr_accessor :content
|
139
|
+
|
140
|
+
##
|
141
|
+
# Dependencies from a missing enclosing class to the classes in
|
142
|
+
# missing_dependencies that depend upon it.
|
143
|
+
|
144
|
+
attr_reader :enclosure_dependencies
|
145
|
+
|
146
|
+
##
|
147
|
+
# Maps C variable names to names of Ruby classes (and singleton classes)
|
148
|
+
|
149
|
+
attr_reader :known_classes
|
150
|
+
|
151
|
+
##
|
152
|
+
# Classes found while parsing the C file that were not yet registered due to
|
153
|
+
# a missing enclosing class. These are processed by do_missing
|
154
|
+
|
155
|
+
attr_reader :missing_dependencies
|
156
|
+
|
157
|
+
##
|
158
|
+
# Maps C variable names to names of Ruby singleton classes
|
159
|
+
|
160
|
+
attr_reader :singleton_classes
|
161
|
+
|
162
|
+
##
|
163
|
+
# The TopLevel items in the parsed file belong to
|
164
|
+
|
165
|
+
attr_reader :top_level
|
166
|
+
|
167
|
+
##
|
168
|
+
# Prepares for parsing a C file. See RDoc::Parser#initialize for details on
|
169
|
+
# the arguments.
|
170
|
+
|
171
|
+
def initialize top_level, content, options, stats
|
172
|
+
super
|
173
|
+
|
174
|
+
@known_classes = RDoc::KNOWN_CLASSES.dup
|
175
|
+
@content = handle_tab_width handle_ifdefs_in @content
|
176
|
+
@file_dir = File.dirname @file_name
|
177
|
+
|
178
|
+
@classes = load_variable_map :c_class_variables
|
179
|
+
@singleton_classes = load_variable_map :c_singleton_class_variables
|
180
|
+
|
181
|
+
@markup = @options.markup
|
182
|
+
|
183
|
+
# class_variable => { function => [method, ...] }
|
184
|
+
@methods = Hash.new { |h, f| h[f] = Hash.new { |i, m| i[m] = [] } }
|
185
|
+
|
186
|
+
# missing variable => [handle_class_module arguments]
|
187
|
+
@missing_dependencies = {}
|
188
|
+
|
189
|
+
# missing enclosure variable => [dependent handle_class_module arguments]
|
190
|
+
@enclosure_dependencies = Hash.new { |h, k| h[k] = [] }
|
191
|
+
@enclosure_dependencies.instance_variable_set :@missing_dependencies,
|
192
|
+
@missing_dependencies
|
193
|
+
|
194
|
+
@enclosure_dependencies.extend TSort
|
195
|
+
|
196
|
+
def @enclosure_dependencies.tsort_each_node &block
|
197
|
+
each_key(&block)
|
198
|
+
rescue TSort::Cyclic => e
|
199
|
+
cycle_vars = e.message.scan(/"(.*?)"/).flatten
|
200
|
+
|
201
|
+
cycle = cycle_vars.sort.map do |var_name|
|
202
|
+
delete var_name
|
203
|
+
|
204
|
+
var_name, type, mod_name, = @missing_dependencies[var_name]
|
205
|
+
|
206
|
+
"#{type} #{mod_name} (#{var_name})"
|
207
|
+
end.join ', '
|
208
|
+
|
209
|
+
warn "Unable to create #{cycle} due to a cyclic class or module creation"
|
210
|
+
|
211
|
+
retry
|
212
|
+
end
|
213
|
+
|
214
|
+
def @enclosure_dependencies.tsort_each_child node, &block
|
215
|
+
fetch(node, []).each(&block)
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
##
|
220
|
+
# Scans #content for rb_define_alias
|
221
|
+
|
222
|
+
def do_aliases
|
223
|
+
@content.scan(/rb_define_alias\s*\(
|
224
|
+
\s*(\w+),
|
225
|
+
\s*"(.+?)",
|
226
|
+
\s*"(.+?)"
|
227
|
+
\s*\)/xm) do |var_name, new_name, old_name|
|
228
|
+
class_name = @known_classes[var_name]
|
229
|
+
|
230
|
+
unless class_name then
|
231
|
+
@options.warn "Enclosing class or module %p for alias %s %s is not known" % [
|
232
|
+
var_name, new_name, old_name]
|
233
|
+
next
|
234
|
+
end
|
235
|
+
|
236
|
+
class_obj = find_class var_name, class_name
|
237
|
+
comment = find_alias_comment var_name, new_name, old_name
|
238
|
+
comment.normalize
|
239
|
+
if comment.to_s.empty? and existing_method = class_obj.method_list.find { |m| m.name == old_name}
|
240
|
+
comment = existing_method.comment
|
241
|
+
end
|
242
|
+
add_alias(var_name, class_obj, old_name, new_name, comment)
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
##
|
247
|
+
# Add alias, either from a direct alias definition, or from two
|
248
|
+
# method that reference the same function.
|
249
|
+
|
250
|
+
def add_alias(var_name, class_obj, old_name, new_name, comment)
|
251
|
+
al = RDoc::Alias.new '', old_name, new_name, ''
|
252
|
+
al.singleton = @singleton_classes.key? var_name
|
253
|
+
al.comment = comment
|
254
|
+
al.record_location @top_level
|
255
|
+
class_obj.add_alias al
|
256
|
+
@stats.add_alias al
|
257
|
+
al
|
258
|
+
end
|
259
|
+
|
260
|
+
##
|
261
|
+
# Scans #content for rb_attr and rb_define_attr
|
262
|
+
|
263
|
+
def do_attrs
|
264
|
+
@content.scan(/rb_attr\s*\(
|
265
|
+
\s*(\w+),
|
266
|
+
\s*([\w"()]+),
|
267
|
+
#{BOOL_ARG_PATTERN},
|
268
|
+
#{BOOL_ARG_PATTERN},
|
269
|
+
\s*\w+\);/xmo) do |var_name, attr_name, read, write|
|
270
|
+
handle_attr var_name, attr_name, read, write
|
271
|
+
end
|
272
|
+
|
273
|
+
@content.scan(%r%rb_define_attr\(
|
274
|
+
\s*([\w\.]+),
|
275
|
+
\s*"([^"]+)",
|
276
|
+
#{BOOL_ARG_PATTERN},
|
277
|
+
#{BOOL_ARG_PATTERN}\);
|
278
|
+
%xmo) do |var_name, attr_name, read, write|
|
279
|
+
handle_attr var_name, attr_name, read, write
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
283
|
+
##
|
284
|
+
# Scans #content for boot_defclass
|
285
|
+
|
286
|
+
def do_boot_defclass
|
287
|
+
@content.scan(/(\w+)\s*=\s*boot_defclass\s*\(\s*"(\w+?)",\s*(\w+?)\s*\)/) do
|
288
|
+
|var_name, class_name, parent|
|
289
|
+
parent = nil if parent == "0"
|
290
|
+
handle_class_module(var_name, :class, class_name, parent, nil)
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
##
|
295
|
+
# Scans #content for rb_define_class, boot_defclass, rb_define_class_under
|
296
|
+
# and rb_singleton_class
|
297
|
+
|
298
|
+
def do_classes_and_modules
|
299
|
+
do_boot_defclass if @file_name == "class.c"
|
300
|
+
|
301
|
+
@content.scan(
|
302
|
+
%r(
|
303
|
+
(?<open>\s*\(\s*) {0}
|
304
|
+
(?<close>\s*\)\s*) {0}
|
305
|
+
(?<name>\s*"(?<class_name>\w+)") {0}
|
306
|
+
(?<parent>\s*(?:
|
307
|
+
(?<parent_name>[\w\*\s\(\)\.\->]+) |
|
308
|
+
rb_path2class\s*\(\s*"(?<path>[\w:]+)"\s*\)
|
309
|
+
)) {0}
|
310
|
+
(?<under>\w+) {0}
|
311
|
+
|
312
|
+
(?<var_name>[\w\.]+)\s* =
|
313
|
+
\s*rb_(?:
|
314
|
+
define_(?:
|
315
|
+
class(?: # rb_define_class(name, parent_name)
|
316
|
+
\(\s*
|
317
|
+
\g<name>,
|
318
|
+
\g<parent>
|
319
|
+
\s*\)
|
320
|
+
|
|
321
|
+
_under\g<open> # rb_define_class_under(under, name, parent_name...)
|
322
|
+
\g<under>,
|
323
|
+
\g<name>,
|
324
|
+
\g<parent>
|
325
|
+
\g<close>
|
326
|
+
)
|
327
|
+
|
|
328
|
+
(?<module>)
|
329
|
+
module(?: # rb_define_module(name)
|
330
|
+
\g<open>
|
331
|
+
\g<name>
|
332
|
+
\g<close>
|
333
|
+
|
|
334
|
+
_under\g<open> # rb_define_module_under(under, name)
|
335
|
+
\g<under>,
|
336
|
+
\g<name>
|
337
|
+
\g<close>
|
338
|
+
)
|
339
|
+
)
|
340
|
+
|
|
341
|
+
(?<attributes>(?:\s*"\w+",)*\s*NULL\s*) {0}
|
342
|
+
struct_define(?:
|
343
|
+
\g<open> # rb_struct_define(name, ...)
|
344
|
+
\g<name>,
|
345
|
+
|
|
346
|
+
_under\g<open> # rb_struct_define_under(under, name, ...)
|
347
|
+
\g<under>,
|
348
|
+
\g<name>,
|
349
|
+
|
|
350
|
+
_without_accessor(?:
|
351
|
+
\g<open> # rb_struct_define_without_accessor(name, parent_name, ...)
|
352
|
+
|
|
353
|
+
_under\g<open> # rb_struct_define_without_accessor_under(under, name, parent_name, ...)
|
354
|
+
\g<under>,
|
355
|
+
)
|
356
|
+
\g<name>,
|
357
|
+
\g<parent>,
|
358
|
+
\s*\w+, # Allocation function
|
359
|
+
)
|
360
|
+
\g<attributes>
|
361
|
+
\g<close>
|
362
|
+
|
|
363
|
+
singleton_class\g<open> # rb_singleton_class(target_class_name)
|
364
|
+
(?<target_class_name>\w+)
|
365
|
+
\g<close>
|
366
|
+
)
|
367
|
+
)mx
|
368
|
+
) do
|
369
|
+
if target_class_name = $~[:target_class_name]
|
370
|
+
# rb_singleton_class(target_class_name)
|
371
|
+
handle_singleton $~[:var_name], target_class_name
|
372
|
+
next
|
373
|
+
end
|
374
|
+
|
375
|
+
var_name = $~[:var_name]
|
376
|
+
type = $~[:module] ? :module : :class
|
377
|
+
class_name = $~[:class_name]
|
378
|
+
parent_name = $~[:parent_name] || $~[:path]
|
379
|
+
under = $~[:under]
|
380
|
+
attributes = $~[:attributes]
|
381
|
+
|
382
|
+
handle_class_module(var_name, type, class_name, parent_name, under)
|
383
|
+
if attributes and !parent_name # rb_struct_define *not* without_accessor
|
384
|
+
true_flag = 'Qtrue'
|
385
|
+
attributes.scan(/"\K\w+(?=")/) do |attr_name|
|
386
|
+
handle_attr var_name, attr_name, true_flag, true_flag
|
387
|
+
end
|
388
|
+
end
|
389
|
+
end
|
390
|
+
end
|
391
|
+
|
392
|
+
##
|
393
|
+
# Scans #content for rb_define_variable, rb_define_readonly_variable,
|
394
|
+
# rb_define_const and rb_define_global_const
|
395
|
+
|
396
|
+
def do_constants
|
397
|
+
@content.scan(%r%\Wrb_define_
|
398
|
+
( variable |
|
399
|
+
readonly_variable |
|
400
|
+
const |
|
401
|
+
global_const )
|
402
|
+
\s*\(
|
403
|
+
(?:\s*(\w+),)?
|
404
|
+
\s*"(\w+)",
|
405
|
+
\s*(.*?)\s*\)\s*;
|
406
|
+
%xm) do |type, var_name, const_name, definition|
|
407
|
+
var_name = "rb_cObject" if !var_name or var_name == "rb_mKernel"
|
408
|
+
type = "const" if type == "global_const"
|
409
|
+
handle_constants type, var_name, const_name, definition
|
410
|
+
end
|
411
|
+
|
412
|
+
@content.scan(%r%
|
413
|
+
\Wrb_curses_define_const
|
414
|
+
\s*\(
|
415
|
+
\s*
|
416
|
+
(\w+)
|
417
|
+
\s*
|
418
|
+
\)
|
419
|
+
\s*;%xm) do |consts|
|
420
|
+
const = consts.first
|
421
|
+
|
422
|
+
handle_constants 'const', 'mCurses', const, "UINT2NUM(#{const})"
|
423
|
+
end
|
424
|
+
|
425
|
+
@content.scan(%r%
|
426
|
+
\Wrb_file_const
|
427
|
+
\s*\(
|
428
|
+
\s*
|
429
|
+
"([^"]+)",
|
430
|
+
\s*
|
431
|
+
(.*?)
|
432
|
+
\s*
|
433
|
+
\)
|
434
|
+
\s*;%xm) do |name, value|
|
435
|
+
handle_constants 'const', 'rb_mFConst', name, value
|
436
|
+
end
|
437
|
+
end
|
438
|
+
|
439
|
+
|
440
|
+
##
|
441
|
+
# Scans #content for rb_include_module
|
442
|
+
|
443
|
+
def do_includes
|
444
|
+
@content.scan(/rb_include_module\s*\(\s*(\w+?),\s*(\w+?)\s*\)/) do |c, m|
|
445
|
+
next unless cls = @classes[c]
|
446
|
+
m = @known_classes[m] || m
|
447
|
+
|
448
|
+
comment = new_comment '', @top_level, :c
|
449
|
+
incl = cls.add_include RDoc::Include.new(m, comment)
|
450
|
+
incl.record_location @top_level
|
451
|
+
end
|
452
|
+
end
|
453
|
+
|
454
|
+
##
|
455
|
+
# Scans #content for rb_define_method, rb_define_singleton_method,
|
456
|
+
# rb_define_module_function, rb_define_private_method,
|
457
|
+
# rb_define_global_function and define_filetest_function
|
458
|
+
|
459
|
+
def do_methods
|
460
|
+
@content.scan(%r%rb_define_
|
461
|
+
(
|
462
|
+
singleton_method |
|
463
|
+
method |
|
464
|
+
module_function |
|
465
|
+
private_method
|
466
|
+
)
|
467
|
+
\s*\(\s*([\w\.]+),
|
468
|
+
\s*"([^"]+)",
|
469
|
+
\s*(?:RUBY_METHOD_FUNC\(|VALUEFUNC\(|\(METHOD\))?(\w+)\)?,
|
470
|
+
\s*(-?\w+)\s*\)
|
471
|
+
(?:;\s*/[*/]\s+in\s+(\w+?\.(?:cpp|c|y)))?
|
472
|
+
%xm) do |type, var_name, meth_name, function, param_count, source_file|
|
473
|
+
|
474
|
+
# Ignore top-object and weird struct.c dynamic stuff
|
475
|
+
next if var_name == "ruby_top_self"
|
476
|
+
next if var_name == "nstr"
|
477
|
+
|
478
|
+
var_name = "rb_cObject" if var_name == "rb_mKernel"
|
479
|
+
handle_method(type, var_name, meth_name, function, param_count,
|
480
|
+
source_file)
|
481
|
+
end
|
482
|
+
|
483
|
+
@content.scan(%r%rb_define_global_function\s*\(
|
484
|
+
\s*"([^"]+)",
|
485
|
+
\s*(?:RUBY_METHOD_FUNC\(|VALUEFUNC\()?(\w+)\)?,
|
486
|
+
\s*(-?\w+)\s*\)
|
487
|
+
(?:;\s*/[*/]\s+in\s+(\w+?\.[cy]))?
|
488
|
+
%xm) do |meth_name, function, param_count, source_file|
|
489
|
+
handle_method("method", "rb_mKernel", meth_name, function, param_count,
|
490
|
+
source_file)
|
491
|
+
end
|
492
|
+
|
493
|
+
@content.scan(/define_filetest_function\s*\(
|
494
|
+
\s*"([^"]+)",
|
495
|
+
\s*(?:RUBY_METHOD_FUNC\(|VALUEFUNC\()?(\w+)\)?,
|
496
|
+
\s*(-?\w+)\s*\)/xm) do |meth_name, function, param_count|
|
497
|
+
|
498
|
+
handle_method("method", "rb_mFileTest", meth_name, function, param_count)
|
499
|
+
handle_method("singleton_method", "rb_cFile", meth_name, function,
|
500
|
+
param_count)
|
501
|
+
end
|
502
|
+
end
|
503
|
+
|
504
|
+
##
|
505
|
+
# Creates classes and module that were missing were defined due to the file
|
506
|
+
# order being different than the declaration order.
|
507
|
+
|
508
|
+
def do_missing
|
509
|
+
return if @missing_dependencies.empty?
|
510
|
+
|
511
|
+
@enclosure_dependencies.tsort.each do |in_module|
|
512
|
+
arguments = @missing_dependencies.delete in_module
|
513
|
+
|
514
|
+
next unless arguments # dependency on existing class
|
515
|
+
|
516
|
+
handle_class_module(*arguments)
|
517
|
+
end
|
518
|
+
end
|
519
|
+
|
520
|
+
##
|
521
|
+
# Finds the comment for an alias on +class_name+ from +new_name+ to
|
522
|
+
# +old_name+
|
523
|
+
|
524
|
+
def find_alias_comment class_name, new_name, old_name
|
525
|
+
content =~ %r%((?>/\*.*?\*/\s+))
|
526
|
+
rb_define_alias\(\s*#{Regexp.escape class_name}\s*,
|
527
|
+
\s*"#{Regexp.escape new_name}"\s*,
|
528
|
+
\s*"#{Regexp.escape old_name}"\s*\);%xm
|
529
|
+
|
530
|
+
new_comment($1 || '', @top_level, :c)
|
531
|
+
end
|
532
|
+
|
533
|
+
##
|
534
|
+
# Finds a comment for rb_define_attr, rb_attr or Document-attr.
|
535
|
+
#
|
536
|
+
# +var_name+ is the C class variable the attribute is defined on.
|
537
|
+
# +attr_name+ is the attribute's name.
|
538
|
+
#
|
539
|
+
# +read+ and +write+ are the read/write flags ('1' or '0'). Either both or
|
540
|
+
# neither must be provided.
|
541
|
+
|
542
|
+
def find_attr_comment var_name, attr_name, read = nil, write = nil
|
543
|
+
attr_name = Regexp.escape attr_name
|
544
|
+
|
545
|
+
rw = if read and write then
|
546
|
+
/\s*#{read}\s*,\s*#{write}\s*/xm
|
547
|
+
else
|
548
|
+
/.*?/m
|
549
|
+
end
|
550
|
+
|
551
|
+
comment = if @content =~ %r%((?>/\*.*?\*/\s+))
|
552
|
+
rb_define_attr\((?:\s*#{var_name},)?\s*
|
553
|
+
"#{attr_name}"\s*,
|
554
|
+
#{rw}\)\s*;%xm then
|
555
|
+
$1
|
556
|
+
elsif @content =~ %r%((?>/\*.*?\*/\s+))
|
557
|
+
rb_attr\(\s*#{var_name}\s*,
|
558
|
+
\s*#{attr_name}\s*,
|
559
|
+
#{rw},.*?\)\s*;%xm then
|
560
|
+
$1
|
561
|
+
elsif @content =~ %r%(/\*.*?(?:\s*\*\s*)?)
|
562
|
+
Document-attr:\s#{attr_name}\s*?\n
|
563
|
+
((?>(.|\n)*?\*/))%x then
|
564
|
+
"#{$1}\n#{$2}"
|
565
|
+
else
|
566
|
+
''
|
567
|
+
end
|
568
|
+
|
569
|
+
new_comment comment, @top_level, :c
|
570
|
+
end
|
571
|
+
|
572
|
+
##
|
573
|
+
# Generate a Ruby-method table
|
574
|
+
|
575
|
+
def gen_body_table file_content
|
576
|
+
table = {}
|
577
|
+
file_content.scan(%r{
|
578
|
+
((?>/\*.*?\*/\s*)?)
|
579
|
+
((?:\w+\s+){0,2} VALUE\s+(\w+)
|
580
|
+
\s*(?:\([^\)]*\))(?:[^\);]|$))
|
581
|
+
| ((?>/\*.*?\*/\s*))^\s*(\#\s*define\s+(\w+)\s+(\w+))
|
582
|
+
| ^\s*\#\s*define\s+(\w+)\s+(\w+)
|
583
|
+
}xm) do
|
584
|
+
case
|
585
|
+
when name = $3
|
586
|
+
table[name] = [:func_def, $1, $2, $~.offset(2)] if !(t = table[name]) || t[0] != :func_def
|
587
|
+
when name = $6
|
588
|
+
table[name] = [:macro_def, $4, $5, $~.offset(5), $7] if !(t = table[name]) || t[0] == :macro_alias
|
589
|
+
when name = $8
|
590
|
+
table[name] ||= [:macro_alias, $9]
|
591
|
+
end
|
592
|
+
end
|
593
|
+
table
|
594
|
+
end
|
595
|
+
|
596
|
+
##
|
597
|
+
# Find the C code corresponding to a Ruby method
|
598
|
+
|
599
|
+
def find_body class_name, meth_name, meth_obj, file_content, quiet = false
|
600
|
+
if file_content
|
601
|
+
@body_table ||= {}
|
602
|
+
@body_table[file_content] ||= gen_body_table file_content
|
603
|
+
type, *args = @body_table[file_content][meth_name]
|
604
|
+
end
|
605
|
+
|
606
|
+
case type
|
607
|
+
when :func_def
|
608
|
+
comment = new_comment args[0], @top_level, :c
|
609
|
+
body = args[1]
|
610
|
+
offset, = args[2]
|
611
|
+
|
612
|
+
comment.remove_private if comment
|
613
|
+
|
614
|
+
# try to find the whole body
|
615
|
+
body = $& if /#{Regexp.escape body}[^(]*?\{.*?^\}/m =~ file_content
|
616
|
+
|
617
|
+
# The comment block may have been overridden with a 'Document-method'
|
618
|
+
# block. This happens in the interpreter when multiple methods are
|
619
|
+
# vectored through to the same C method but those methods are logically
|
620
|
+
# distinct (for example Kernel.hash and Kernel.object_id share the same
|
621
|
+
# implementation
|
622
|
+
|
623
|
+
override_comment = find_override_comment class_name, meth_obj
|
624
|
+
comment = override_comment if override_comment
|
625
|
+
|
626
|
+
comment.normalize
|
627
|
+
find_modifiers comment, meth_obj if comment
|
628
|
+
|
629
|
+
#meth_obj.params = params
|
630
|
+
meth_obj.start_collecting_tokens
|
631
|
+
tk = { :line_no => 1, :char_no => 1, :text => body }
|
632
|
+
meth_obj.add_token tk
|
633
|
+
meth_obj.comment = comment
|
634
|
+
meth_obj.line = file_content[0, offset].count("\n") + 1
|
635
|
+
|
636
|
+
body
|
637
|
+
when :macro_def
|
638
|
+
comment = new_comment args[0], @top_level, :c
|
639
|
+
body = args[1]
|
640
|
+
offset, = args[2]
|
641
|
+
|
642
|
+
find_body class_name, args[3], meth_obj, file_content, true
|
643
|
+
|
644
|
+
comment.normalize
|
645
|
+
find_modifiers comment, meth_obj
|
646
|
+
|
647
|
+
meth_obj.start_collecting_tokens
|
648
|
+
tk = { :line_no => 1, :char_no => 1, :text => body }
|
649
|
+
meth_obj.add_token tk
|
650
|
+
meth_obj.comment = comment
|
651
|
+
meth_obj.line = file_content[0, offset].count("\n") + 1
|
652
|
+
|
653
|
+
body
|
654
|
+
when :macro_alias
|
655
|
+
# with no comment we hope the aliased definition has it and use it's
|
656
|
+
# definition
|
657
|
+
|
658
|
+
body = find_body(class_name, args[0], meth_obj, file_content, true)
|
659
|
+
|
660
|
+
return body if body
|
661
|
+
|
662
|
+
@options.warn "No definition for #{meth_name}"
|
663
|
+
false
|
664
|
+
else # No body, but might still have an override comment
|
665
|
+
comment = find_override_comment class_name, meth_obj
|
666
|
+
|
667
|
+
if comment then
|
668
|
+
comment.normalize
|
669
|
+
find_modifiers comment, meth_obj
|
670
|
+
meth_obj.comment = comment
|
671
|
+
|
672
|
+
''
|
673
|
+
else
|
674
|
+
@options.warn "No definition for #{meth_name}"
|
675
|
+
false
|
676
|
+
end
|
677
|
+
end
|
678
|
+
end
|
679
|
+
|
680
|
+
##
|
681
|
+
# Finds a RDoc::NormalClass or RDoc::NormalModule for +raw_name+
|
682
|
+
|
683
|
+
def find_class(raw_name, name, base_name = nil)
|
684
|
+
unless @classes[raw_name]
|
685
|
+
if raw_name =~ /^rb_m/
|
686
|
+
container = @top_level.add_module RDoc::NormalModule, name
|
687
|
+
else
|
688
|
+
container = @top_level.add_class RDoc::NormalClass, name
|
689
|
+
end
|
690
|
+
container.name = base_name if base_name
|
691
|
+
|
692
|
+
container.record_location @top_level
|
693
|
+
@classes[raw_name] = container
|
694
|
+
end
|
695
|
+
@classes[raw_name]
|
696
|
+
end
|
697
|
+
|
698
|
+
##
|
699
|
+
# Look for class or module documentation above Init_+class_name+(void),
|
700
|
+
# in a Document-class +class_name+ (or module) comment or above an
|
701
|
+
# rb_define_class (or module). If a comment is supplied above a matching
|
702
|
+
# Init_ and a rb_define_class the Init_ comment is used.
|
703
|
+
#
|
704
|
+
# /*
|
705
|
+
# * This is a comment for Foo
|
706
|
+
# */
|
707
|
+
# Init_Foo(void) {
|
708
|
+
# VALUE cFoo = rb_define_class("Foo", rb_cObject);
|
709
|
+
# }
|
710
|
+
#
|
711
|
+
# /*
|
712
|
+
# * Document-class: Foo
|
713
|
+
# * This is a comment for Foo
|
714
|
+
# */
|
715
|
+
# Init_foo(void) {
|
716
|
+
# VALUE cFoo = rb_define_class("Foo", rb_cObject);
|
717
|
+
# }
|
718
|
+
#
|
719
|
+
# /*
|
720
|
+
# * This is a comment for Foo
|
721
|
+
# */
|
722
|
+
# VALUE cFoo = rb_define_class("Foo", rb_cObject);
|
723
|
+
|
724
|
+
def find_class_comment class_name, class_mod
|
725
|
+
comment = nil
|
726
|
+
|
727
|
+
if @content =~ %r%
|
728
|
+
((?>/\*.*?\*/\s+))
|
729
|
+
(static\s+)?
|
730
|
+
void\s+
|
731
|
+
Init(?:VM)?_(?i:#{class_name})\s*(?:_\(\s*)?\(\s*(?:void\s*)?\)%xm then
|
732
|
+
comment = $1.sub(%r%Document-(?:class|module):\s+#{class_name}%, '')
|
733
|
+
elsif @content =~ %r%Document-(?:class|module):\s+#{class_name}\s*?
|
734
|
+
(?:<\s+[:,\w]+)?\n((?>.*?\*/))%xm then
|
735
|
+
comment = "/*\n#{$1}"
|
736
|
+
elsif @content =~ %r%((?>/\*.*?\*/\s+))
|
737
|
+
([\w\.\s]+\s* = \s+)?rb_define_(class|module)[\t (]*?"(#{class_name})"%xm then
|
738
|
+
comment = $1
|
739
|
+
elsif @content =~ %r%((?>/\*.*?\*/\s+))
|
740
|
+
([\w\. \t]+ = \s+)?rb_define_(class|module)_under[\t\w, (]*?"(#{class_name.split('::').last})"%xm then
|
741
|
+
comment = $1
|
742
|
+
else
|
743
|
+
comment = ''
|
744
|
+
end
|
745
|
+
|
746
|
+
comment = new_comment comment, @top_level, :c
|
747
|
+
comment.normalize
|
748
|
+
|
749
|
+
look_for_directives_in class_mod, comment
|
750
|
+
|
751
|
+
class_mod.add_comment comment, @top_level
|
752
|
+
end
|
753
|
+
|
754
|
+
##
|
755
|
+
# Generate a const table
|
756
|
+
|
757
|
+
def gen_const_table file_content
|
758
|
+
table = {}
|
759
|
+
@content.scan(%r{
|
760
|
+
(?<doc>(?>^\s*/\*.*?\*/\s+))
|
761
|
+
rb_define_(?<type>\w+)\(\s*(?:\w+),\s*
|
762
|
+
"(?<name>\w+)"\s*,
|
763
|
+
.*?\)\s*;
|
764
|
+
| (?<doc>(?>^\s*/\*.*?\*/\s+))
|
765
|
+
rb_define_global_(?<type>const)\(\s*
|
766
|
+
"(?<name>\w+)"\s*,
|
767
|
+
.*?\)\s*;
|
768
|
+
| (?<doc>(?>^\s*/\*.*?\*/\s+))
|
769
|
+
rb_file_(?<type>const)\(\s*
|
770
|
+
"(?<name>\w+)"\s*,
|
771
|
+
.*?\)\s*;
|
772
|
+
| (?<doc>(?>^\s*/\*.*?\*/\s+))
|
773
|
+
rb_curses_define_(?<type>const)\(\s*
|
774
|
+
(?<name>\w+)
|
775
|
+
\s*\)\s*;
|
776
|
+
| Document-(?:const|global|variable):\s
|
777
|
+
(?<name>(?:\w+::)*\w+)
|
778
|
+
\s*?\n(?<doc>(?>.*?\*/))
|
779
|
+
}mxi) do
|
780
|
+
name, doc, type = $~.values_at(:name, :doc, :type)
|
781
|
+
if type
|
782
|
+
table[[type, name]] = doc
|
783
|
+
else
|
784
|
+
table[name] = "/*\n" + doc
|
785
|
+
end
|
786
|
+
end
|
787
|
+
table
|
788
|
+
end
|
789
|
+
|
790
|
+
##
|
791
|
+
# Finds a comment matching +type+ and +const_name+ either above the
|
792
|
+
# comment or in the matching Document- section.
|
793
|
+
|
794
|
+
def find_const_comment(type, const_name, class_name = nil)
|
795
|
+
@const_table ||= {}
|
796
|
+
@const_table[@content] ||= gen_const_table @content
|
797
|
+
table = @const_table[@content]
|
798
|
+
|
799
|
+
comment =
|
800
|
+
table[[type, const_name]] ||
|
801
|
+
(class_name && table[class_name + "::" + const_name]) ||
|
802
|
+
table[const_name] ||
|
803
|
+
''
|
804
|
+
|
805
|
+
new_comment comment, @top_level, :c
|
806
|
+
end
|
807
|
+
|
808
|
+
##
|
809
|
+
# Handles modifiers in +comment+ and updates +meth_obj+ as appropriate.
|
810
|
+
|
811
|
+
def find_modifiers comment, meth_obj
|
812
|
+
comment.normalize
|
813
|
+
comment.extract_call_seq meth_obj
|
814
|
+
|
815
|
+
look_for_directives_in meth_obj, comment
|
816
|
+
end
|
817
|
+
|
818
|
+
##
|
819
|
+
# Finds a <tt>Document-method</tt> override for +meth_obj+ on +class_name+
|
820
|
+
|
821
|
+
def find_override_comment class_name, meth_obj
|
822
|
+
name = Regexp.escape meth_obj.name
|
823
|
+
prefix = Regexp.escape meth_obj.name_prefix
|
824
|
+
|
825
|
+
comment = if @content =~ %r%Document-method:
|
826
|
+
\s+#{class_name}#{prefix}#{name}
|
827
|
+
\s*?\n((?>.*?\*/))%xm then
|
828
|
+
"/*#{$1}"
|
829
|
+
elsif @content =~ %r%Document-method:
|
830
|
+
\s#{name}\s*?\n((?>.*?\*/))%xm then
|
831
|
+
"/*#{$1}"
|
832
|
+
end
|
833
|
+
|
834
|
+
return unless comment
|
835
|
+
|
836
|
+
new_comment comment, @top_level, :c
|
837
|
+
end
|
838
|
+
|
839
|
+
##
|
840
|
+
# Creates a new RDoc::Attr +attr_name+ on class +var_name+ that is either
|
841
|
+
# +read+, +write+ or both
|
842
|
+
|
843
|
+
def handle_attr(var_name, attr_name, read, write)
|
844
|
+
rw = ''
|
845
|
+
rw += 'R' if TRUE_VALUES.include?(read)
|
846
|
+
rw += 'W' if TRUE_VALUES.include?(write)
|
847
|
+
|
848
|
+
class_name = @known_classes[var_name]
|
849
|
+
|
850
|
+
return unless class_name
|
851
|
+
|
852
|
+
class_obj = find_class var_name, class_name
|
853
|
+
|
854
|
+
return unless class_obj
|
855
|
+
|
856
|
+
comment = find_attr_comment var_name, attr_name
|
857
|
+
comment.normalize
|
858
|
+
|
859
|
+
name = attr_name.gsub(/rb_intern(?:_const)?\("([^"]+)"\)/, '\1')
|
860
|
+
|
861
|
+
attr = RDoc::Attr.new '', name, rw, comment
|
862
|
+
|
863
|
+
attr.record_location @top_level
|
864
|
+
class_obj.add_attribute attr
|
865
|
+
@stats.add_attribute attr
|
866
|
+
end
|
867
|
+
|
868
|
+
##
|
869
|
+
# Creates a new RDoc::NormalClass or RDoc::NormalModule based on +type+
|
870
|
+
# named +class_name+ in +parent+ which was assigned to the C +var_name+.
|
871
|
+
|
872
|
+
def handle_class_module(var_name, type, class_name, parent, in_module)
|
873
|
+
parent_name = @known_classes[parent] || parent
|
874
|
+
|
875
|
+
if in_module then
|
876
|
+
enclosure = @classes[in_module] || @store.find_c_enclosure(in_module)
|
877
|
+
|
878
|
+
if enclosure.nil? and enclosure = @known_classes[in_module] then
|
879
|
+
enc_type = /^rb_m/ =~ in_module ? :module : :class
|
880
|
+
handle_class_module in_module, enc_type, enclosure, nil, nil
|
881
|
+
enclosure = @classes[in_module]
|
882
|
+
end
|
883
|
+
|
884
|
+
unless enclosure then
|
885
|
+
@enclosure_dependencies[in_module] << var_name
|
886
|
+
@missing_dependencies[var_name] =
|
887
|
+
[var_name, type, class_name, parent, in_module]
|
888
|
+
|
889
|
+
return
|
890
|
+
end
|
891
|
+
else
|
892
|
+
enclosure = @top_level
|
893
|
+
end
|
894
|
+
|
895
|
+
if type == :class then
|
896
|
+
full_name = if RDoc::ClassModule === enclosure then
|
897
|
+
enclosure.full_name + "::#{class_name}"
|
898
|
+
else
|
899
|
+
class_name
|
900
|
+
end
|
901
|
+
|
902
|
+
if @content =~ %r%Document-class:\s+#{full_name}\s*<\s+([:,\w]+)% then
|
903
|
+
parent_name = $1
|
904
|
+
end
|
905
|
+
|
906
|
+
cm = enclosure.add_class RDoc::NormalClass, class_name, parent_name
|
907
|
+
else
|
908
|
+
cm = enclosure.add_module RDoc::NormalModule, class_name
|
909
|
+
end
|
910
|
+
|
911
|
+
cm.record_location enclosure.top_level
|
912
|
+
|
913
|
+
find_class_comment cm.full_name, cm
|
914
|
+
|
915
|
+
case cm
|
916
|
+
when RDoc::NormalClass
|
917
|
+
@stats.add_class cm
|
918
|
+
when RDoc::NormalModule
|
919
|
+
@stats.add_module cm
|
920
|
+
end
|
921
|
+
|
922
|
+
@classes[var_name] = cm
|
923
|
+
@known_classes[var_name] = cm.full_name
|
924
|
+
@store.add_c_enclosure var_name, cm
|
925
|
+
end
|
926
|
+
|
927
|
+
##
|
928
|
+
# Adds constants. By providing some_value: at the start of the comment you
|
929
|
+
# can override the C value of the comment to give a friendly definition.
|
930
|
+
#
|
931
|
+
# /* 300: The perfect score in bowling */
|
932
|
+
# rb_define_const(cFoo, "PERFECT", INT2FIX(300));
|
933
|
+
#
|
934
|
+
# Will override <tt>INT2FIX(300)</tt> with the value +300+ in the output
|
935
|
+
# RDoc. Values may include quotes and escaped colons (\:).
|
936
|
+
|
937
|
+
def handle_constants(type, var_name, const_name, definition)
|
938
|
+
class_name = @known_classes[var_name]
|
939
|
+
|
940
|
+
return unless class_name
|
941
|
+
|
942
|
+
class_obj = find_class var_name, class_name, class_name[/::\K[^:]+\z/]
|
943
|
+
|
944
|
+
unless class_obj then
|
945
|
+
@options.warn 'Enclosing class or module %p is not known' % [const_name]
|
946
|
+
return
|
947
|
+
end
|
948
|
+
|
949
|
+
comment = find_const_comment type, const_name, class_name
|
950
|
+
comment.normalize
|
951
|
+
|
952
|
+
# In the case of rb_define_const, the definition and comment are in
|
953
|
+
# "/* definition: comment */" form. The literal ':' and '\' characters
|
954
|
+
# can be escaped with a backslash.
|
955
|
+
if type.downcase == 'const' then
|
956
|
+
if /\A(.+?)?:(?!\S)/ =~ comment.text
|
957
|
+
new_definition, new_comment = $1, $'
|
958
|
+
|
959
|
+
if !new_definition # Default to literal C definition
|
960
|
+
new_definition = definition
|
961
|
+
else
|
962
|
+
new_definition = new_definition.gsub(/\\([\\:])/, '\1')
|
963
|
+
end
|
964
|
+
|
965
|
+
new_definition.sub!(/\A(\s+)/, '')
|
966
|
+
|
967
|
+
new_comment = "#{$1}#{new_comment.lstrip}"
|
968
|
+
|
969
|
+
new_comment = self.new_comment(new_comment, @top_level, :c)
|
970
|
+
|
971
|
+
con = RDoc::Constant.new const_name, new_definition, new_comment
|
972
|
+
else
|
973
|
+
con = RDoc::Constant.new const_name, definition, comment
|
974
|
+
end
|
975
|
+
else
|
976
|
+
con = RDoc::Constant.new const_name, definition, comment
|
977
|
+
end
|
978
|
+
|
979
|
+
con.record_location @top_level
|
980
|
+
@stats.add_constant con
|
981
|
+
class_obj.add_constant con
|
982
|
+
end
|
983
|
+
|
984
|
+
##
|
985
|
+
# Removes #ifdefs that would otherwise confuse us
|
986
|
+
|
987
|
+
def handle_ifdefs_in(body)
|
988
|
+
body.gsub(/^#ifdef HAVE_PROTOTYPES.*?#else.*?\n(.*?)#endif.*?\n/m, '\1')
|
989
|
+
end
|
990
|
+
|
991
|
+
##
|
992
|
+
# Adds an RDoc::AnyMethod +meth_name+ defined on a class or module assigned
|
993
|
+
# to +var_name+. +type+ is the type of method definition function used.
|
994
|
+
# +singleton_method+ and +module_function+ create a singleton method.
|
995
|
+
|
996
|
+
def handle_method(type, var_name, meth_name, function, param_count,
|
997
|
+
source_file = nil)
|
998
|
+
class_name = @known_classes[var_name]
|
999
|
+
singleton = @singleton_classes.key? var_name
|
1000
|
+
|
1001
|
+
@methods[var_name][function] << meth_name
|
1002
|
+
|
1003
|
+
return unless class_name
|
1004
|
+
|
1005
|
+
class_obj = find_class var_name, class_name
|
1006
|
+
|
1007
|
+
if existing_method = class_obj.method_list.find { |m| m.c_function == function }
|
1008
|
+
add_alias(var_name, class_obj, existing_method.name, meth_name, existing_method.comment)
|
1009
|
+
end
|
1010
|
+
|
1011
|
+
if class_obj then
|
1012
|
+
if meth_name == 'initialize' then
|
1013
|
+
meth_name = 'new'
|
1014
|
+
singleton = true
|
1015
|
+
type = 'method' # force public
|
1016
|
+
end
|
1017
|
+
|
1018
|
+
meth_obj = RDoc::AnyMethod.new '', meth_name
|
1019
|
+
meth_obj.c_function = function
|
1020
|
+
meth_obj.singleton =
|
1021
|
+
singleton || %w[singleton_method module_function].include?(type)
|
1022
|
+
|
1023
|
+
p_count = Integer(param_count) rescue -1
|
1024
|
+
|
1025
|
+
if source_file then
|
1026
|
+
file_name = File.join @file_dir, source_file
|
1027
|
+
|
1028
|
+
if File.exist? file_name then
|
1029
|
+
file_content = File.read file_name
|
1030
|
+
else
|
1031
|
+
@options.warn "unknown source #{source_file} for #{meth_name} in #{@file_name}"
|
1032
|
+
end
|
1033
|
+
else
|
1034
|
+
file_content = @content
|
1035
|
+
end
|
1036
|
+
|
1037
|
+
body = find_body class_name, function, meth_obj, file_content
|
1038
|
+
|
1039
|
+
if body and meth_obj.document_self then
|
1040
|
+
meth_obj.params = if p_count < -1 then # -2 is Array
|
1041
|
+
'(*args)'
|
1042
|
+
elsif p_count == -1 then # argc, argv
|
1043
|
+
rb_scan_args body
|
1044
|
+
else
|
1045
|
+
args = (1..p_count).map { |i| "p#{i}" }
|
1046
|
+
"(#{args.join ', '})"
|
1047
|
+
end
|
1048
|
+
|
1049
|
+
|
1050
|
+
meth_obj.record_location @top_level
|
1051
|
+
|
1052
|
+
if meth_obj.section_title
|
1053
|
+
class_obj.temporary_section = class_obj.add_section(meth_obj.section_title)
|
1054
|
+
end
|
1055
|
+
class_obj.add_method meth_obj
|
1056
|
+
|
1057
|
+
@stats.add_method meth_obj
|
1058
|
+
meth_obj.visibility = :private if 'private_method' == type
|
1059
|
+
end
|
1060
|
+
end
|
1061
|
+
end
|
1062
|
+
|
1063
|
+
##
|
1064
|
+
# Registers a singleton class +sclass_var+ as a singleton of +class_var+
|
1065
|
+
|
1066
|
+
def handle_singleton sclass_var, class_var
|
1067
|
+
class_name = @known_classes[class_var]
|
1068
|
+
|
1069
|
+
@known_classes[sclass_var] = class_name
|
1070
|
+
@singleton_classes[sclass_var] = class_name
|
1071
|
+
end
|
1072
|
+
|
1073
|
+
##
|
1074
|
+
# Loads the variable map with the given +name+ from the RDoc::Store, if
|
1075
|
+
# present.
|
1076
|
+
|
1077
|
+
def load_variable_map map_name
|
1078
|
+
return {} unless files = @store.cache[map_name]
|
1079
|
+
return {} unless name_map = files[@file_name]
|
1080
|
+
|
1081
|
+
class_map = {}
|
1082
|
+
|
1083
|
+
name_map.each do |variable, name|
|
1084
|
+
next unless mod = @store.find_class_or_module(name)
|
1085
|
+
|
1086
|
+
class_map[variable] = if map_name == :c_class_variables then
|
1087
|
+
mod
|
1088
|
+
else
|
1089
|
+
name
|
1090
|
+
end
|
1091
|
+
@known_classes[variable] = name
|
1092
|
+
end
|
1093
|
+
|
1094
|
+
class_map
|
1095
|
+
end
|
1096
|
+
|
1097
|
+
##
|
1098
|
+
# Look for directives in a normal comment block:
|
1099
|
+
#
|
1100
|
+
# /*
|
1101
|
+
# * :title: My Awesome Project
|
1102
|
+
# */
|
1103
|
+
#
|
1104
|
+
# This method modifies the +comment+
|
1105
|
+
# Both :main: and :title: directives are deprecated and will be removed in RDoc 7.
|
1106
|
+
|
1107
|
+
def look_for_directives_in context, comment
|
1108
|
+
@preprocess.handle comment, context do |directive, param|
|
1109
|
+
case directive
|
1110
|
+
when 'main' then
|
1111
|
+
@options.main_page = param
|
1112
|
+
|
1113
|
+
warn <<~MSG
|
1114
|
+
The :main: directive is deprecated and will be removed in RDoc 7.
|
1115
|
+
|
1116
|
+
You can use these options to specify the initial page displayed instead:
|
1117
|
+
- `--main=#{param}` via the command line
|
1118
|
+
- `rdoc.main = "#{param}"` if you use `RDoc::Task`
|
1119
|
+
- `main_page: #{param}` in your `.rdoc_options` file
|
1120
|
+
MSG
|
1121
|
+
''
|
1122
|
+
when 'title' then
|
1123
|
+
@options.default_title = param if @options.respond_to? :default_title=
|
1124
|
+
|
1125
|
+
warn <<~MSG
|
1126
|
+
The :title: directive is deprecated and will be removed in RDoc 7.
|
1127
|
+
|
1128
|
+
You can use these options to specify the title displayed instead:
|
1129
|
+
- `--title=#{param}` via the command line
|
1130
|
+
- `rdoc.title = "#{param}"` if you use `RDoc::Task`
|
1131
|
+
- `title: #{param}` in your `.rdoc_options` file
|
1132
|
+
MSG
|
1133
|
+
''
|
1134
|
+
end
|
1135
|
+
end
|
1136
|
+
|
1137
|
+
comment
|
1138
|
+
end
|
1139
|
+
|
1140
|
+
##
|
1141
|
+
# Extracts parameters from the +method_body+ and returns a method
|
1142
|
+
# parameter string. Follows 1.9.3dev's scan-arg-spec, see README.EXT
|
1143
|
+
|
1144
|
+
def rb_scan_args method_body
|
1145
|
+
method_body =~ /rb_scan_args\((.*?)\)/m
|
1146
|
+
return '(*args)' unless $1
|
1147
|
+
|
1148
|
+
$1.split(/,/)[2] =~ /"(.*?)"/ # format argument
|
1149
|
+
format = $1.split(//)
|
1150
|
+
|
1151
|
+
lead = opt = trail = 0
|
1152
|
+
|
1153
|
+
if format.first =~ /\d/ then
|
1154
|
+
lead = $&.to_i
|
1155
|
+
format.shift
|
1156
|
+
if format.first =~ /\d/ then
|
1157
|
+
opt = $&.to_i
|
1158
|
+
format.shift
|
1159
|
+
if format.first =~ /\d/ then
|
1160
|
+
trail = $&.to_i
|
1161
|
+
format.shift
|
1162
|
+
block_arg = true
|
1163
|
+
end
|
1164
|
+
end
|
1165
|
+
end
|
1166
|
+
|
1167
|
+
if format.first == '*' and not block_arg then
|
1168
|
+
var = true
|
1169
|
+
format.shift
|
1170
|
+
if format.first =~ /\d/ then
|
1171
|
+
trail = $&.to_i
|
1172
|
+
format.shift
|
1173
|
+
end
|
1174
|
+
end
|
1175
|
+
|
1176
|
+
if format.first == ':' then
|
1177
|
+
hash = true
|
1178
|
+
format.shift
|
1179
|
+
end
|
1180
|
+
|
1181
|
+
if format.first == '&' then
|
1182
|
+
block = true
|
1183
|
+
format.shift
|
1184
|
+
end
|
1185
|
+
|
1186
|
+
# if the format string is not empty there's a bug in the C code, ignore it
|
1187
|
+
|
1188
|
+
args = []
|
1189
|
+
position = 1
|
1190
|
+
|
1191
|
+
(1...(position + lead)).each do |index|
|
1192
|
+
args << "p#{index}"
|
1193
|
+
end
|
1194
|
+
|
1195
|
+
position += lead
|
1196
|
+
|
1197
|
+
(position...(position + opt)).each do |index|
|
1198
|
+
args << "p#{index} = v#{index}"
|
1199
|
+
end
|
1200
|
+
|
1201
|
+
position += opt
|
1202
|
+
|
1203
|
+
if var then
|
1204
|
+
args << '*args'
|
1205
|
+
position += 1
|
1206
|
+
end
|
1207
|
+
|
1208
|
+
(position...(position + trail)).each do |index|
|
1209
|
+
args << "p#{index}"
|
1210
|
+
end
|
1211
|
+
|
1212
|
+
position += trail
|
1213
|
+
|
1214
|
+
if hash then
|
1215
|
+
args << "p#{position} = {}"
|
1216
|
+
end
|
1217
|
+
|
1218
|
+
args << '&block' if block
|
1219
|
+
|
1220
|
+
"(#{args.join ', '})"
|
1221
|
+
end
|
1222
|
+
|
1223
|
+
##
|
1224
|
+
# Removes lines that are commented out that might otherwise get picked up
|
1225
|
+
# when scanning for classes and methods
|
1226
|
+
|
1227
|
+
def remove_commented_out_lines
|
1228
|
+
@content = @content.gsub(%r%//.*rb_define_%, '//')
|
1229
|
+
end
|
1230
|
+
|
1231
|
+
##
|
1232
|
+
# Extracts the classes, modules, methods, attributes, constants and aliases
|
1233
|
+
# from a C file and returns an RDoc::TopLevel for this file
|
1234
|
+
|
1235
|
+
def scan
|
1236
|
+
remove_commented_out_lines
|
1237
|
+
|
1238
|
+
do_classes_and_modules
|
1239
|
+
do_missing
|
1240
|
+
|
1241
|
+
do_constants
|
1242
|
+
do_methods
|
1243
|
+
do_includes
|
1244
|
+
do_aliases
|
1245
|
+
do_attrs
|
1246
|
+
|
1247
|
+
@store.add_c_variables self
|
1248
|
+
|
1249
|
+
@top_level
|
1250
|
+
end
|
1251
|
+
|
1252
|
+
##
|
1253
|
+
# Creates a RDoc::Comment instance.
|
1254
|
+
|
1255
|
+
def new_comment text = nil, location = nil, language = nil
|
1256
|
+
RDoc::Comment.new(text, location, language).tap do |comment|
|
1257
|
+
comment.format = @markup
|
1258
|
+
end
|
1259
|
+
end
|
1260
|
+
end
|