hyper-pro-gem 0.0.1
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 +7 -0
- data/hyper-pro-gem.gemspec +12 -0
- data/yard-0.9.44/CHANGELOG.md +983 -0
- data/yard-0.9.44/LEGAL +94 -0
- data/yard-0.9.44/LICENSE +22 -0
- data/yard-0.9.44/README.md +329 -0
- data/yard-0.9.44/bin/yard +13 -0
- data/yard-0.9.44/bin/yardoc +13 -0
- data/yard-0.9.44/bin/yri +13 -0
- data/yard-0.9.44/docs/CodeObjects.md +115 -0
- data/yard-0.9.44/docs/GettingStarted.md +705 -0
- data/yard-0.9.44/docs/Handlers.md +152 -0
- data/yard-0.9.44/docs/Overview.md +61 -0
- data/yard-0.9.44/docs/Parser.md +166 -0
- data/yard-0.9.44/docs/Tags.md +304 -0
- data/yard-0.9.44/docs/TagsArch.md +123 -0
- data/yard-0.9.44/docs/Templates.md +497 -0
- data/yard-0.9.44/docs/WhatsNew.md +1297 -0
- data/yard-0.9.44/docs/images/code-objects-class-diagram.png +0 -0
- data/yard-0.9.44/docs/images/handlers-class-diagram.png +0 -0
- data/yard-0.9.44/docs/images/overview-class-diagram.png +0 -0
- data/yard-0.9.44/docs/images/parser-class-diagram.png +0 -0
- data/yard-0.9.44/docs/images/tags-class-diagram.png +0 -0
- data/yard-0.9.44/docs/templates/default/fulldoc/html/full_list_tag.erb +9 -0
- data/yard-0.9.44/docs/templates/default/fulldoc/html/setup.rb +6 -0
- data/yard-0.9.44/docs/templates/default/layout/html/setup.rb +9 -0
- data/yard-0.9.44/docs/templates/default/layout/html/tag_list.erb +11 -0
- data/yard-0.9.44/docs/templates/default/yard_tags/html/list.erb +18 -0
- data/yard-0.9.44/docs/templates/default/yard_tags/html/setup.rb +26 -0
- data/yard-0.9.44/docs/templates/plugin.rb +70 -0
- data/yard-0.9.44/lib/rubygems_plugin.rb +9 -0
- data/yard-0.9.44/lib/yard/autoload.rb +328 -0
- data/yard-0.9.44/lib/yard/cli/command.rb +85 -0
- data/yard-0.9.44/lib/yard/cli/command_parser.rb +93 -0
- data/yard-0.9.44/lib/yard/cli/config.rb +198 -0
- data/yard-0.9.44/lib/yard/cli/diff.rb +278 -0
- data/yard-0.9.44/lib/yard/cli/display.rb +69 -0
- data/yard-0.9.44/lib/yard/cli/gems.rb +84 -0
- data/yard-0.9.44/lib/yard/cli/graph.rb +125 -0
- data/yard-0.9.44/lib/yard/cli/help.rb +20 -0
- data/yard-0.9.44/lib/yard/cli/i18n.rb +70 -0
- data/yard-0.9.44/lib/yard/cli/list.rb +23 -0
- data/yard-0.9.44/lib/yard/cli/markup_types.rb +32 -0
- data/yard-0.9.44/lib/yard/cli/server.rb +266 -0
- data/yard-0.9.44/lib/yard/cli/stats.rb +234 -0
- data/yard-0.9.44/lib/yard/cli/yardoc.rb +791 -0
- data/yard-0.9.44/lib/yard/cli/yardopts_command.rb +110 -0
- data/yard-0.9.44/lib/yard/cli/yri.rb +215 -0
- data/yard-0.9.44/lib/yard/code_objects/base.rb +626 -0
- data/yard-0.9.44/lib/yard/code_objects/class_object.rb +146 -0
- data/yard-0.9.44/lib/yard/code_objects/class_variable_object.rb +11 -0
- data/yard-0.9.44/lib/yard/code_objects/constant_object.rb +16 -0
- data/yard-0.9.44/lib/yard/code_objects/extended_method_object.rb +24 -0
- data/yard-0.9.44/lib/yard/code_objects/extra_file_object.rb +135 -0
- data/yard-0.9.44/lib/yard/code_objects/macro_object.rb +171 -0
- data/yard-0.9.44/lib/yard/code_objects/method_object.rb +196 -0
- data/yard-0.9.44/lib/yard/code_objects/module_object.rb +21 -0
- data/yard-0.9.44/lib/yard/code_objects/namespace_mapper.rb +141 -0
- data/yard-0.9.44/lib/yard/code_objects/namespace_object.rb +200 -0
- data/yard-0.9.44/lib/yard/code_objects/proxy.rb +245 -0
- data/yard-0.9.44/lib/yard/code_objects/root_object.rb +19 -0
- data/yard-0.9.44/lib/yard/config.rb +274 -0
- data/yard-0.9.44/lib/yard/core_ext/array.rb +16 -0
- data/yard-0.9.44/lib/yard/core_ext/file.rb +69 -0
- data/yard-0.9.44/lib/yard/core_ext/hash.rb +16 -0
- data/yard-0.9.44/lib/yard/core_ext/insertion.rb +63 -0
- data/yard-0.9.44/lib/yard/core_ext/module.rb +11 -0
- data/yard-0.9.44/lib/yard/core_ext/string.rb +68 -0
- data/yard-0.9.44/lib/yard/core_ext/symbol_hash.rb +75 -0
- data/yard-0.9.44/lib/yard/docstring.rb +386 -0
- data/yard-0.9.44/lib/yard/docstring_parser.rb +344 -0
- data/yard-0.9.44/lib/yard/gem_index.rb +29 -0
- data/yard-0.9.44/lib/yard/globals.rb +22 -0
- data/yard-0.9.44/lib/yard/handlers/base.rb +617 -0
- data/yard-0.9.44/lib/yard/handlers/c/alias_handler.rb +16 -0
- data/yard-0.9.44/lib/yard/handlers/c/attribute_handler.rb +13 -0
- data/yard-0.9.44/lib/yard/handlers/c/base.rb +164 -0
- data/yard-0.9.44/lib/yard/handlers/c/class_handler.rb +27 -0
- data/yard-0.9.44/lib/yard/handlers/c/constant_handler.rb +13 -0
- data/yard-0.9.44/lib/yard/handlers/c/handler_methods.rb +212 -0
- data/yard-0.9.44/lib/yard/handlers/c/init_handler.rb +20 -0
- data/yard-0.9.44/lib/yard/handlers/c/method_handler.rb +45 -0
- data/yard-0.9.44/lib/yard/handlers/c/mixin_handler.rb +21 -0
- data/yard-0.9.44/lib/yard/handlers/c/module_handler.rb +17 -0
- data/yard-0.9.44/lib/yard/handlers/c/override_comment_handler.rb +31 -0
- data/yard-0.9.44/lib/yard/handlers/c/path_handler.rb +11 -0
- data/yard-0.9.44/lib/yard/handlers/c/struct_handler.rb +13 -0
- data/yard-0.9.44/lib/yard/handlers/c/symbol_handler.rb +8 -0
- data/yard-0.9.44/lib/yard/handlers/common/method_handler.rb +19 -0
- data/yard-0.9.44/lib/yard/handlers/processor.rb +200 -0
- data/yard-0.9.44/lib/yard/handlers/rbs/attribute_handler.rb +79 -0
- data/yard-0.9.44/lib/yard/handlers/rbs/base.rb +38 -0
- data/yard-0.9.44/lib/yard/handlers/rbs/constant_handler.rb +18 -0
- data/yard-0.9.44/lib/yard/handlers/rbs/method_handler.rb +327 -0
- data/yard-0.9.44/lib/yard/handlers/rbs/mixin_handler.rb +20 -0
- data/yard-0.9.44/lib/yard/handlers/rbs/namespace_handler.rb +26 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/alias_handler.rb +45 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/attribute_handler.rb +90 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/base.rb +165 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/class_condition_handler.rb +92 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/class_handler.rb +119 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/class_variable_handler.rb +17 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/comment_handler.rb +10 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/constant_handler.rb +73 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/decorator_handler_methods.rb +123 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/dsl_handler.rb +15 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/dsl_handler_methods.rb +96 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/exception_handler.rb +27 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/extend_handler.rb +22 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/alias_handler.rb +37 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/attribute_handler.rb +65 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/base.rb +245 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/class_condition_handler.rb +83 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/class_handler.rb +113 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/class_variable_handler.rb +15 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/comment_handler.rb +10 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/constant_handler.rb +29 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/dsl_handler.rb +17 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/exception_handler.rb +13 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/extend_handler.rb +21 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/method_handler.rb +90 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/mixin_handler.rb +39 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/module_function_handler.rb +19 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/module_handler.rb +12 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/private_class_method_handler.rb +22 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/private_constant_handler.rb +22 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/visibility_handler.rb +18 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/yield_handler.rb +29 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/method_condition_handler.rb +9 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/method_handler.rb +104 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/mixin_handler.rb +61 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/module_function_handler.rb +39 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/module_handler.rb +12 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/private_class_method_handler.rb +14 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/private_constant_handler.rb +43 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/public_class_method_handler.rb +14 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/struct_handler_methods.rb +143 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/visibility_handler.rb +35 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/yield_handler.rb +31 -0
- data/yard-0.9.44/lib/yard/i18n/locale.rb +67 -0
- data/yard-0.9.44/lib/yard/i18n/message.rb +57 -0
- data/yard-0.9.44/lib/yard/i18n/messages.rb +56 -0
- data/yard-0.9.44/lib/yard/i18n/po_parser.rb +61 -0
- data/yard-0.9.44/lib/yard/i18n/pot_generator.rb +290 -0
- data/yard-0.9.44/lib/yard/i18n/text.rb +173 -0
- data/yard-0.9.44/lib/yard/logging.rb +260 -0
- data/yard-0.9.44/lib/yard/open_struct.rb +67 -0
- data/yard-0.9.44/lib/yard/options.rb +217 -0
- data/yard-0.9.44/lib/yard/parser/base.rb +57 -0
- data/yard-0.9.44/lib/yard/parser/c/c_parser.rb +235 -0
- data/yard-0.9.44/lib/yard/parser/c/comment_parser.rb +134 -0
- data/yard-0.9.44/lib/yard/parser/c/statement.rb +66 -0
- data/yard-0.9.44/lib/yard/parser/rbs/rbs_parser.rb +325 -0
- data/yard-0.9.44/lib/yard/parser/rbs/statement.rb +75 -0
- data/yard-0.9.44/lib/yard/parser/ruby/ast_node.rb +559 -0
- data/yard-0.9.44/lib/yard/parser/ruby/legacy/irb/slex.rb +294 -0
- data/yard-0.9.44/lib/yard/parser/ruby/legacy/ruby_lex.rb +1360 -0
- data/yard-0.9.44/lib/yard/parser/ruby/legacy/ruby_parser.rb +32 -0
- data/yard-0.9.44/lib/yard/parser/ruby/legacy/statement.rb +68 -0
- data/yard-0.9.44/lib/yard/parser/ruby/legacy/statement_list.rb +394 -0
- data/yard-0.9.44/lib/yard/parser/ruby/legacy/token_list.rb +74 -0
- data/yard-0.9.44/lib/yard/parser/ruby/ruby_parser.rb +792 -0
- data/yard-0.9.44/lib/yard/parser/ruby/token_resolver.rb +158 -0
- data/yard-0.9.44/lib/yard/parser/source_parser.rb +526 -0
- data/yard-0.9.44/lib/yard/rake/yardoc_task.rb +81 -0
- data/yard-0.9.44/lib/yard/registry.rb +439 -0
- data/yard-0.9.44/lib/yard/registry_resolver.rb +225 -0
- data/yard-0.9.44/lib/yard/registry_store.rb +342 -0
- data/yard-0.9.44/lib/yard/rubygems/backports/LICENSE.txt +57 -0
- data/yard-0.9.44/lib/yard/rubygems/backports/MIT.txt +20 -0
- data/yard-0.9.44/lib/yard/rubygems/backports/gem.rb +10 -0
- data/yard-0.9.44/lib/yard/rubygems/backports/source_index.rb +365 -0
- data/yard-0.9.44/lib/yard/rubygems/backports.rb +10 -0
- data/yard-0.9.44/lib/yard/rubygems/doc_manager.rb +90 -0
- data/yard-0.9.44/lib/yard/rubygems/hook.rb +197 -0
- data/yard-0.9.44/lib/yard/rubygems/specification.rb +50 -0
- data/yard-0.9.44/lib/yard/serializers/base.rb +83 -0
- data/yard-0.9.44/lib/yard/serializers/file_system_serializer.rb +123 -0
- data/yard-0.9.44/lib/yard/serializers/process_serializer.rb +24 -0
- data/yard-0.9.44/lib/yard/serializers/stdout_serializer.rb +34 -0
- data/yard-0.9.44/lib/yard/serializers/yardoc_serializer.rb +152 -0
- data/yard-0.9.44/lib/yard/server/adapter.rb +100 -0
- data/yard-0.9.44/lib/yard/server/commands/base.rb +203 -0
- data/yard-0.9.44/lib/yard/server/commands/display_file_command.rb +29 -0
- data/yard-0.9.44/lib/yard/server/commands/display_object_command.rb +65 -0
- data/yard-0.9.44/lib/yard/server/commands/frames_command.rb +16 -0
- data/yard-0.9.44/lib/yard/server/commands/library_command.rb +187 -0
- data/yard-0.9.44/lib/yard/server/commands/library_index_command.rb +28 -0
- data/yard-0.9.44/lib/yard/server/commands/list_command.rb +25 -0
- data/yard-0.9.44/lib/yard/server/commands/root_request_command.rb +15 -0
- data/yard-0.9.44/lib/yard/server/commands/search_command.rb +79 -0
- data/yard-0.9.44/lib/yard/server/commands/static_file_command.rb +23 -0
- data/yard-0.9.44/lib/yard/server/commands/static_file_helpers.rb +60 -0
- data/yard-0.9.44/lib/yard/server/doc_server_helper.rb +91 -0
- data/yard-0.9.44/lib/yard/server/doc_server_serializer.rb +39 -0
- data/yard-0.9.44/lib/yard/server/http_utils.rb +512 -0
- data/yard-0.9.44/lib/yard/server/library_version.rb +277 -0
- data/yard-0.9.44/lib/yard/server/rack_adapter.rb +97 -0
- data/yard-0.9.44/lib/yard/server/router.rb +187 -0
- data/yard-0.9.44/lib/yard/server/static_caching.rb +77 -0
- data/yard-0.9.44/lib/yard/server/templates/default/fulldoc/html/css/custom.css +207 -0
- data/yard-0.9.44/lib/yard/server/templates/default/fulldoc/html/images/processing.gif +0 -0
- data/yard-0.9.44/lib/yard/server/templates/default/fulldoc/html/js/autocomplete.js +203 -0
- data/yard-0.9.44/lib/yard/server/templates/default/layout/html/breadcrumb.erb +21 -0
- data/yard-0.9.44/lib/yard/server/templates/default/layout/html/script_setup.erb +7 -0
- data/yard-0.9.44/lib/yard/server/templates/default/layout/html/setup.rb +8 -0
- data/yard-0.9.44/lib/yard/server/templates/default/method_details/html/permalink.erb +6 -0
- data/yard-0.9.44/lib/yard/server/templates/default/method_details/html/setup.rb +5 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/library_list/html/headers.erb +8 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/library_list/html/library_list.erb +13 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/library_list/html/listing.erb +13 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/library_list/html/setup.rb +6 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/library_list/html/title.erb +2 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/processing/html/processing.erb +58 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/processing/html/setup.rb +4 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/search/html/search.erb +18 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/search/html/setup.rb +9 -0
- data/yard-0.9.44/lib/yard/server/webrick_adapter.rb +45 -0
- data/yard-0.9.44/lib/yard/server.rb +13 -0
- data/yard-0.9.44/lib/yard/tags/default_factory.rb +192 -0
- data/yard-0.9.44/lib/yard/tags/default_tag.rb +13 -0
- data/yard-0.9.44/lib/yard/tags/directives.rb +631 -0
- data/yard-0.9.44/lib/yard/tags/library.rb +633 -0
- data/yard-0.9.44/lib/yard/tags/option_tag.rb +13 -0
- data/yard-0.9.44/lib/yard/tags/overload_tag.rb +72 -0
- data/yard-0.9.44/lib/yard/tags/ref_tag.rb +8 -0
- data/yard-0.9.44/lib/yard/tags/ref_tag_list.rb +28 -0
- data/yard-0.9.44/lib/yard/tags/tag.rb +72 -0
- data/yard-0.9.44/lib/yard/tags/tag_format_error.rb +7 -0
- data/yard-0.9.44/lib/yard/tags/types_explainer.rb +288 -0
- data/yard-0.9.44/lib/yard/templates/engine.rb +185 -0
- data/yard-0.9.44/lib/yard/templates/erb_cache.rb +23 -0
- data/yard-0.9.44/lib/yard/templates/helpers/base_helper.rb +215 -0
- data/yard-0.9.44/lib/yard/templates/helpers/filter_helper.rb +27 -0
- data/yard-0.9.44/lib/yard/templates/helpers/html_helper.rb +688 -0
- data/yard-0.9.44/lib/yard/templates/helpers/html_syntax_highlight_helper.rb +83 -0
- data/yard-0.9.44/lib/yard/templates/helpers/markup/html_entities.rb +2140 -0
- data/yard-0.9.44/lib/yard/templates/helpers/markup/hybrid_markdown.rb +2131 -0
- data/yard-0.9.44/lib/yard/templates/helpers/markup/rdoc_markdown.rb +23 -0
- data/yard-0.9.44/lib/yard/templates/helpers/markup/rdoc_markup.rb +112 -0
- data/yard-0.9.44/lib/yard/templates/helpers/markup_helper.rb +175 -0
- data/yard-0.9.44/lib/yard/templates/helpers/method_helper.rb +77 -0
- data/yard-0.9.44/lib/yard/templates/helpers/module_helper.rb +21 -0
- data/yard-0.9.44/lib/yard/templates/helpers/text_helper.rb +112 -0
- data/yard-0.9.44/lib/yard/templates/helpers/uml_helper.rb +47 -0
- data/yard-0.9.44/lib/yard/templates/section.rb +103 -0
- data/yard-0.9.44/lib/yard/templates/template.rb +420 -0
- data/yard-0.9.44/lib/yard/templates/template_options.rb +91 -0
- data/yard-0.9.44/lib/yard/verifier.rb +151 -0
- data/yard-0.9.44/lib/yard/version.rb +6 -0
- data/yard-0.9.44/lib/yard.rb +75 -0
- data/yard-0.9.44/po/ja.po +31108 -0
- data/yard-0.9.44/templates/default/class/dot/setup.rb +7 -0
- data/yard-0.9.44/templates/default/class/dot/superklass.erb +3 -0
- data/yard-0.9.44/templates/default/class/html/constructor_details.erb +8 -0
- data/yard-0.9.44/templates/default/class/html/setup.rb +2 -0
- data/yard-0.9.44/templates/default/class/html/subclasses.erb +4 -0
- data/yard-0.9.44/templates/default/class/setup.rb +36 -0
- data/yard-0.9.44/templates/default/class/text/setup.rb +12 -0
- data/yard-0.9.44/templates/default/class/text/subclasses.erb +5 -0
- data/yard-0.9.44/templates/default/constant/text/header.erb +11 -0
- data/yard-0.9.44/templates/default/constant/text/setup.rb +4 -0
- data/yard-0.9.44/templates/default/docstring/html/abstract.erb +4 -0
- data/yard-0.9.44/templates/default/docstring/html/deprecated.erb +1 -0
- data/yard-0.9.44/templates/default/docstring/html/index.erb +5 -0
- data/yard-0.9.44/templates/default/docstring/html/note.erb +6 -0
- data/yard-0.9.44/templates/default/docstring/html/private.erb +4 -0
- data/yard-0.9.44/templates/default/docstring/html/returns_void.erb +1 -0
- data/yard-0.9.44/templates/default/docstring/html/text.erb +1 -0
- data/yard-0.9.44/templates/default/docstring/html/todo.erb +6 -0
- data/yard-0.9.44/templates/default/docstring/setup.rb +52 -0
- data/yard-0.9.44/templates/default/docstring/text/abstract.erb +2 -0
- data/yard-0.9.44/templates/default/docstring/text/deprecated.erb +2 -0
- data/yard-0.9.44/templates/default/docstring/text/index.erb +2 -0
- data/yard-0.9.44/templates/default/docstring/text/note.erb +4 -0
- data/yard-0.9.44/templates/default/docstring/text/private.erb +2 -0
- data/yard-0.9.44/templates/default/docstring/text/returns_void.erb +1 -0
- data/yard-0.9.44/templates/default/docstring/text/text.erb +1 -0
- data/yard-0.9.44/templates/default/docstring/text/todo.erb +4 -0
- data/yard-0.9.44/templates/default/fulldoc/html/css/common.css +1 -0
- data/yard-0.9.44/templates/default/fulldoc/html/css/full_list.css +206 -0
- data/yard-0.9.44/templates/default/fulldoc/html/css/style.css +1089 -0
- data/yard-0.9.44/templates/default/fulldoc/html/frames.erb +22 -0
- data/yard-0.9.44/templates/default/fulldoc/html/full_list.erb +40 -0
- data/yard-0.9.44/templates/default/fulldoc/html/full_list_class.erb +2 -0
- data/yard-0.9.44/templates/default/fulldoc/html/full_list_file.erb +7 -0
- data/yard-0.9.44/templates/default/fulldoc/html/full_list_method.erb +10 -0
- data/yard-0.9.44/templates/default/fulldoc/html/js/app.js +801 -0
- data/yard-0.9.44/templates/default/fulldoc/html/js/full_list.js +334 -0
- data/yard-0.9.44/templates/default/fulldoc/html/js/jquery.js +4 -0
- data/yard-0.9.44/templates/default/fulldoc/html/setup.rb +249 -0
- data/yard-0.9.44/templates/default/layout/dot/header.erb +6 -0
- data/yard-0.9.44/templates/default/layout/dot/setup.rb +15 -0
- data/yard-0.9.44/templates/default/layout/html/breadcrumb.erb +11 -0
- data/yard-0.9.44/templates/default/layout/html/files.erb +11 -0
- data/yard-0.9.44/templates/default/layout/html/footer.erb +5 -0
- data/yard-0.9.44/templates/default/layout/html/headers.erb +15 -0
- data/yard-0.9.44/templates/default/layout/html/index.erb +2 -0
- data/yard-0.9.44/templates/default/layout/html/layout.erb +26 -0
- data/yard-0.9.44/templates/default/layout/html/listing.erb +4 -0
- data/yard-0.9.44/templates/default/layout/html/objects.erb +32 -0
- data/yard-0.9.44/templates/default/layout/html/script_setup.erb +4 -0
- data/yard-0.9.44/templates/default/layout/html/search.erb +13 -0
- data/yard-0.9.44/templates/default/layout/html/setup.rb +89 -0
- data/yard-0.9.44/templates/default/method/html/header.erb +17 -0
- data/yard-0.9.44/templates/default/method/setup.rb +4 -0
- data/yard-0.9.44/templates/default/method/text/header.erb +1 -0
- data/yard-0.9.44/templates/default/method_details/html/header.erb +3 -0
- data/yard-0.9.44/templates/default/method_details/html/method_signature.erb +25 -0
- data/yard-0.9.44/templates/default/method_details/html/source.erb +10 -0
- data/yard-0.9.44/templates/default/method_details/setup.rb +11 -0
- data/yard-0.9.44/templates/default/method_details/text/header.erb +10 -0
- data/yard-0.9.44/templates/default/method_details/text/method_signature.erb +12 -0
- data/yard-0.9.44/templates/default/method_details/text/setup.rb +11 -0
- data/yard-0.9.44/templates/default/module/dot/child.erb +1 -0
- data/yard-0.9.44/templates/default/module/dot/dependencies.erb +3 -0
- data/yard-0.9.44/templates/default/module/dot/header.erb +6 -0
- data/yard-0.9.44/templates/default/module/dot/info.erb +14 -0
- data/yard-0.9.44/templates/default/module/dot/setup.rb +15 -0
- data/yard-0.9.44/templates/default/module/html/attribute_details.erb +10 -0
- data/yard-0.9.44/templates/default/module/html/attribute_summary.erb +8 -0
- data/yard-0.9.44/templates/default/module/html/box_info.erb +43 -0
- data/yard-0.9.44/templates/default/module/html/children.erb +8 -0
- data/yard-0.9.44/templates/default/module/html/constant_summary.erb +17 -0
- data/yard-0.9.44/templates/default/module/html/defines.erb +3 -0
- data/yard-0.9.44/templates/default/module/html/header.erb +5 -0
- data/yard-0.9.44/templates/default/module/html/inherited_attributes.erb +14 -0
- data/yard-0.9.44/templates/default/module/html/inherited_constants.erb +8 -0
- data/yard-0.9.44/templates/default/module/html/inherited_methods.erb +20 -0
- data/yard-0.9.44/templates/default/module/html/item_summary.erb +40 -0
- data/yard-0.9.44/templates/default/module/html/method_details_list.erb +9 -0
- data/yard-0.9.44/templates/default/module/html/method_summary.erb +22 -0
- data/yard-0.9.44/templates/default/module/html/methodmissing.erb +12 -0
- data/yard-0.9.44/templates/default/module/html/pre_docstring.erb +1 -0
- data/yard-0.9.44/templates/default/module/setup.rb +187 -0
- data/yard-0.9.44/templates/default/module/text/children.erb +10 -0
- data/yard-0.9.44/templates/default/module/text/class_meths_list.erb +8 -0
- data/yard-0.9.44/templates/default/module/text/extends.erb +8 -0
- data/yard-0.9.44/templates/default/module/text/header.erb +7 -0
- data/yard-0.9.44/templates/default/module/text/includes.erb +8 -0
- data/yard-0.9.44/templates/default/module/text/instance_meths_list.erb +8 -0
- data/yard-0.9.44/templates/default/module/text/setup.rb +13 -0
- data/yard-0.9.44/templates/default/onefile/html/files.erb +5 -0
- data/yard-0.9.44/templates/default/onefile/html/headers.erb +8 -0
- data/yard-0.9.44/templates/default/onefile/html/layout.erb +16 -0
- data/yard-0.9.44/templates/default/onefile/html/readme.erb +3 -0
- data/yard-0.9.44/templates/default/onefile/html/setup.rb +62 -0
- data/yard-0.9.44/templates/default/root/dot/child.erb +3 -0
- data/yard-0.9.44/templates/default/root/dot/setup.rb +6 -0
- data/yard-0.9.44/templates/default/root/html/setup.rb +2 -0
- data/yard-0.9.44/templates/default/tags/html/example.erb +11 -0
- data/yard-0.9.44/templates/default/tags/html/index.erb +3 -0
- data/yard-0.9.44/templates/default/tags/html/option.erb +24 -0
- data/yard-0.9.44/templates/default/tags/html/overload.erb +14 -0
- data/yard-0.9.44/templates/default/tags/html/see.erb +8 -0
- data/yard-0.9.44/templates/default/tags/html/tag.erb +20 -0
- data/yard-0.9.44/templates/default/tags/setup.rb +57 -0
- data/yard-0.9.44/templates/default/tags/text/example.erb +12 -0
- data/yard-0.9.44/templates/default/tags/text/index.erb +1 -0
- data/yard-0.9.44/templates/default/tags/text/option.erb +20 -0
- data/yard-0.9.44/templates/default/tags/text/overload.erb +19 -0
- data/yard-0.9.44/templates/default/tags/text/see.erb +11 -0
- data/yard-0.9.44/templates/default/tags/text/tag.erb +13 -0
- data/yard-0.9.44/templates/guide/class/html/setup.rb +2 -0
- data/yard-0.9.44/templates/guide/docstring/html/setup.rb +2 -0
- data/yard-0.9.44/templates/guide/fulldoc/html/css/style.css +358 -0
- data/yard-0.9.44/templates/guide/fulldoc/html/js/app.js +61 -0
- data/yard-0.9.44/templates/guide/fulldoc/html/setup.rb +74 -0
- data/yard-0.9.44/templates/guide/layout/html/layout.erb +78 -0
- data/yard-0.9.44/templates/guide/layout/html/setup.rb +25 -0
- data/yard-0.9.44/templates/guide/method/html/header.erb +18 -0
- data/yard-0.9.44/templates/guide/method/html/setup.rb +22 -0
- data/yard-0.9.44/templates/guide/module/html/header.erb +7 -0
- data/yard-0.9.44/templates/guide/module/html/method_list.erb +5 -0
- data/yard-0.9.44/templates/guide/module/html/setup.rb +27 -0
- data/yard-0.9.44/templates/guide/onefile/html/files.erb +4 -0
- data/yard-0.9.44/templates/guide/onefile/html/setup.rb +6 -0
- data/yard-0.9.44/templates/guide/onefile/html/toc.erb +3 -0
- data/yard-0.9.44/templates/guide/tags/html/setup.rb +9 -0
- metadata +419 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
module YARD
|
|
3
|
+
module Parser
|
|
4
|
+
module C
|
|
5
|
+
class CParser < Base
|
|
6
|
+
def initialize(source, file = '(stdin)')
|
|
7
|
+
@file = file
|
|
8
|
+
@namespaces = {}
|
|
9
|
+
@content = source
|
|
10
|
+
@index = 0
|
|
11
|
+
@line = 1
|
|
12
|
+
@state = nil
|
|
13
|
+
@newline = true
|
|
14
|
+
@statements = []
|
|
15
|
+
@last_comment = nil
|
|
16
|
+
@last_statement = nil
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def parse
|
|
20
|
+
parse_toplevel
|
|
21
|
+
enumerator
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def enumerator
|
|
25
|
+
@statements
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def tokenize
|
|
29
|
+
raise NotImplementedError, "no tokenization support for C/C++ files"
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
private
|
|
33
|
+
|
|
34
|
+
def parse_toplevel
|
|
35
|
+
advance_loop do
|
|
36
|
+
case char
|
|
37
|
+
when /['"]/; consume_quote(char)
|
|
38
|
+
when '#'; consume_directive
|
|
39
|
+
when '/'; consume_comment
|
|
40
|
+
when /\s/; consume_whitespace
|
|
41
|
+
when '}'; advance # Skip possible C++ namespace closing brackets.
|
|
42
|
+
else consume_toplevel_statement
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def consume_quote(type = '"')
|
|
48
|
+
advance
|
|
49
|
+
advance_loop do
|
|
50
|
+
case char
|
|
51
|
+
when "\n"; advance; nextline
|
|
52
|
+
when '\\'; advance(2)
|
|
53
|
+
when type; advance; return
|
|
54
|
+
else advance
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def consume_directive
|
|
60
|
+
return(advance) unless @newline
|
|
61
|
+
@last_comment = nil
|
|
62
|
+
@last_statement = nil
|
|
63
|
+
advance_loop do
|
|
64
|
+
if char == '\\' && nextchar =~ /[\r\n]/
|
|
65
|
+
advance_loop { advance; break(nextline) if char == "\n" }
|
|
66
|
+
elsif char == "\n"
|
|
67
|
+
return
|
|
68
|
+
end
|
|
69
|
+
advance
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def consume_toplevel_statement
|
|
74
|
+
@newline = false
|
|
75
|
+
start = @index
|
|
76
|
+
line = @line
|
|
77
|
+
decl = consume_until(/[{;]/)
|
|
78
|
+
return nil if decl =~ /\A\s*\Z/
|
|
79
|
+
# Skip C++ namespace - treat content as top level statement.
|
|
80
|
+
return nil if decl =~ /\A(namespace)/
|
|
81
|
+
statement = ToplevelStatement.new(nil, @file, line)
|
|
82
|
+
@statements << statement
|
|
83
|
+
attach_comment(statement)
|
|
84
|
+
stmts = nil
|
|
85
|
+
if prevchar == '{'
|
|
86
|
+
stmts = consume_body_statements
|
|
87
|
+
if decl =~ /\A(typedef|enum|class|#{struct}|union)/
|
|
88
|
+
consume_until(';')
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
statement.source = @content[start..@index]
|
|
92
|
+
statement.block = stmts
|
|
93
|
+
statement.declaration = decl # rubocop:disable Lint/UselessSetterCall
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def consume_body_statements
|
|
97
|
+
stmts = []
|
|
98
|
+
brace_level = 1
|
|
99
|
+
loop do
|
|
100
|
+
strip_non_statement_data
|
|
101
|
+
start = @index
|
|
102
|
+
line = @line
|
|
103
|
+
consume_until(/[{};]/)
|
|
104
|
+
brace_level += 1 if prevchar == '{'
|
|
105
|
+
brace_level -= 1 if prevchar == '}'
|
|
106
|
+
|
|
107
|
+
break if prevchar.empty? || (brace_level <= 0 && prevchar == '}')
|
|
108
|
+
src = @content[start...@index]
|
|
109
|
+
next unless src && src !~ /\A\s*\Z|\A\}\Z/
|
|
110
|
+
|
|
111
|
+
stmt = BodyStatement.new(src, @file, line)
|
|
112
|
+
attach_comment(stmt)
|
|
113
|
+
stmts << stmt
|
|
114
|
+
end
|
|
115
|
+
stmts
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
def strip_non_statement_data
|
|
119
|
+
start = @index
|
|
120
|
+
loop do
|
|
121
|
+
start = @index
|
|
122
|
+
case char
|
|
123
|
+
when /\s/; consume_whitespace
|
|
124
|
+
when '#'; consume_directive
|
|
125
|
+
when '/'; consume_comment
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
break if start == @index
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
def consume_whitespace
|
|
133
|
+
advance_loop { nextline if char == "\n"; break if char =~ /\S/; advance }
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
def consume_comment(add_comment = true)
|
|
137
|
+
return(advance) unless nextchar == '*' || nextchar == '/'
|
|
138
|
+
line = @line
|
|
139
|
+
type = nextchar == '*' ? :multi : :line
|
|
140
|
+
advance(2)
|
|
141
|
+
comment = String.new("")
|
|
142
|
+
advance_loop do
|
|
143
|
+
comment << char
|
|
144
|
+
if type == :multi
|
|
145
|
+
nextline if char == "\n"
|
|
146
|
+
if char(2) == '*/'
|
|
147
|
+
if add_comment
|
|
148
|
+
comment << '/'
|
|
149
|
+
stmt = Comment.new(comment, @file, line)
|
|
150
|
+
stmt.type = type
|
|
151
|
+
attach_comment(stmt)
|
|
152
|
+
@statements << stmt
|
|
153
|
+
end
|
|
154
|
+
return advance(2)
|
|
155
|
+
end
|
|
156
|
+
elsif char == "\n"
|
|
157
|
+
if add_comment
|
|
158
|
+
stmt = Comment.new(comment[0...-1], @file, line)
|
|
159
|
+
stmt.type = type
|
|
160
|
+
attach_comment(stmt)
|
|
161
|
+
@statements << stmt
|
|
162
|
+
end
|
|
163
|
+
return
|
|
164
|
+
end
|
|
165
|
+
advance
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
def consume_until(end_char, bracket_level = 0, brace_level = 0, add_comment = true)
|
|
170
|
+
end_char = /#{end_char}/ if end_char.is_a?(String)
|
|
171
|
+
start = @index
|
|
172
|
+
advance_loop do
|
|
173
|
+
chr = char
|
|
174
|
+
case chr
|
|
175
|
+
when /\s/; consume_whitespace
|
|
176
|
+
when /['"]/; consume_quote(char)
|
|
177
|
+
when '#'; consume_directive
|
|
178
|
+
when '/'; consume_comment(add_comment)
|
|
179
|
+
when '{'; advance; brace_level += 1
|
|
180
|
+
when '}'; advance; brace_level -= 1
|
|
181
|
+
when '('; advance; bracket_level += 1
|
|
182
|
+
when ')'; advance; bracket_level -= 1
|
|
183
|
+
else advance
|
|
184
|
+
end
|
|
185
|
+
@newline = false if chr !~ /\s/
|
|
186
|
+
|
|
187
|
+
if chr =~ end_char
|
|
188
|
+
break if chr == '{' || chr == '('
|
|
189
|
+
break if bracket_level <= 0 && brace_level <= 0
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
@content[start...@index]
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
def attach_comment(statement)
|
|
196
|
+
if Comment === statement
|
|
197
|
+
if @last_statement && @last_statement.line == statement.line
|
|
198
|
+
@last_statement.comments = statement
|
|
199
|
+
statement.statement = @last_statement
|
|
200
|
+
end
|
|
201
|
+
@last_comment = statement
|
|
202
|
+
@last_statement = nil
|
|
203
|
+
else
|
|
204
|
+
if @last_comment
|
|
205
|
+
statement.comments = @last_comment
|
|
206
|
+
@last_comment.statement = statement
|
|
207
|
+
end
|
|
208
|
+
@last_statement = statement
|
|
209
|
+
@last_comment = nil
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
def advance(num = 1) @index += num end
|
|
214
|
+
def back(num = 1) @index -= num end
|
|
215
|
+
|
|
216
|
+
def advance_loop
|
|
217
|
+
yield while @index <= @content.size
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
def nextline
|
|
221
|
+
@line += 1
|
|
222
|
+
@newline = true
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
def char(num = 1) @content[@index, num] end
|
|
226
|
+
def prevchar(num = 1) @content[@index - 1, num] end
|
|
227
|
+
def nextchar(num = 1) @content[@index + 1, num] end
|
|
228
|
+
|
|
229
|
+
def struct
|
|
230
|
+
/struct\s[a-zA-Z0-9]+\s\{/
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
end
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
module YARD
|
|
3
|
+
module Parser
|
|
4
|
+
module C
|
|
5
|
+
module CommentParser
|
|
6
|
+
protected
|
|
7
|
+
|
|
8
|
+
def parse_comments(comments)
|
|
9
|
+
@overrides = []
|
|
10
|
+
spaces = nil
|
|
11
|
+
comments = remove_private_comments(comments)
|
|
12
|
+
comments = comments.split(/\r?\n/).map do |line|
|
|
13
|
+
line.gsub!(%r{^\s*/?\*/?}, '')
|
|
14
|
+
line.gsub!(%r{\*/\s*$}, '')
|
|
15
|
+
if line =~ /^\s*$/
|
|
16
|
+
next if spaces.nil?
|
|
17
|
+
next ""
|
|
18
|
+
end
|
|
19
|
+
spaces = (line[/^(\s+)/, 1] || "").size if spaces.nil?
|
|
20
|
+
line.gsub(/^\s{0,#{spaces}}/, '').rstrip
|
|
21
|
+
end.compact
|
|
22
|
+
|
|
23
|
+
comments = parse_overrides(comments)
|
|
24
|
+
comments = parse_callseq(comments)
|
|
25
|
+
comments.join("\n")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
private
|
|
29
|
+
|
|
30
|
+
def parse_overrides(comments)
|
|
31
|
+
comments.map do |line|
|
|
32
|
+
type, name = *line.scan(/^\s*Document-(class|module|method|attr|const):\s*(\S.*)\s*$/).first
|
|
33
|
+
if type
|
|
34
|
+
@overrides << [type.to_sym, name]
|
|
35
|
+
nil
|
|
36
|
+
else
|
|
37
|
+
line
|
|
38
|
+
end
|
|
39
|
+
end.compact
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def parse_callseq(comments)
|
|
43
|
+
return comments unless comments[0] =~ /\Acall-seq:\s*(\S.+)?/
|
|
44
|
+
if $1
|
|
45
|
+
comments[0] = " #{$1}"
|
|
46
|
+
else
|
|
47
|
+
comments.shift
|
|
48
|
+
end
|
|
49
|
+
overloads = []
|
|
50
|
+
seen_data = false
|
|
51
|
+
while comments.first =~ /^\s+(\S.+)/ || comments.first =~ /^\s*$/
|
|
52
|
+
line = comments.shift.strip
|
|
53
|
+
break if line.empty? && seen_data
|
|
54
|
+
next if line.empty?
|
|
55
|
+
seen_data = true
|
|
56
|
+
line.sub!(/^\w+[\.#]/, '')
|
|
57
|
+
signature, types = *line.split(/ [-=]> /)
|
|
58
|
+
types = parse_types(types)
|
|
59
|
+
if signature.sub!(/\[?\s*(\{(?:\s*\|(.+?)\|)?.*\})\s*\]?\s*$/, '') && $1
|
|
60
|
+
blk = $1
|
|
61
|
+
blkparams = $2
|
|
62
|
+
else
|
|
63
|
+
blk = nil
|
|
64
|
+
blkparams = nil
|
|
65
|
+
end
|
|
66
|
+
case signature
|
|
67
|
+
when /^(\w+)\s*=\s+(\w+)/
|
|
68
|
+
signature = "#{$1}=(#{$2})"
|
|
69
|
+
when /^\w+\s+\S/
|
|
70
|
+
signature = signature.split(/\s+/)
|
|
71
|
+
signature = "#{signature[1]}#{signature[2] ? '(' + signature[2..-1].join(' ') + ')' : ''}"
|
|
72
|
+
when /^\w+\[(.+?)\]\s*(=)?/
|
|
73
|
+
signature = "[]#{$2}(#{$1})"
|
|
74
|
+
when /^\w+\s+(#{CodeObjects::METHODMATCH})\s+(\w+)/
|
|
75
|
+
signature = "#{$1}(#{$2})"
|
|
76
|
+
end
|
|
77
|
+
break unless signature =~ /^#{CodeObjects::METHODNAMEMATCH}/
|
|
78
|
+
signature = signature.rstrip
|
|
79
|
+
overloads << "@overload #{signature}"
|
|
80
|
+
overloads << " @yield [#{blkparams}]" if blk
|
|
81
|
+
overloads << " @return [#{types.join(', ')}]" unless types.empty?
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
comments + [""] + overloads
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
def parse_types(types)
|
|
88
|
+
if types =~ /true or false/
|
|
89
|
+
["Boolean"]
|
|
90
|
+
else
|
|
91
|
+
(types || "").split(/,| or /).map do |t|
|
|
92
|
+
case t.strip.gsub(/^an?_/, '')
|
|
93
|
+
when "class"; "Class"
|
|
94
|
+
when "obj", "object", "anObject"; "Object"
|
|
95
|
+
when "arr", "array", "anArray", "ary", "new_ary", /^\[/; "Array"
|
|
96
|
+
when /^char\s*\*/, "char", "str", "string", "new_str"; "String"
|
|
97
|
+
when "enum", "anEnumerator"; "Enumerator"
|
|
98
|
+
when "exc", "exception"; "Exception"
|
|
99
|
+
when "proc", "proc_obj", "prc"; "Proc"
|
|
100
|
+
when "binding"; "Binding"
|
|
101
|
+
when "hsh", "hash", "aHash"; "Hash"
|
|
102
|
+
when "ios", "io"; "IO"
|
|
103
|
+
when "file"; "File"
|
|
104
|
+
when "float"; "Float"
|
|
105
|
+
when "time", "new_time"; "Time"
|
|
106
|
+
when "dir", "aDir"; "Dir"
|
|
107
|
+
when "regexp", "new_regexp"; "Regexp"
|
|
108
|
+
when "matchdata"; "MatchData"
|
|
109
|
+
when "encoding"; "Encoding"
|
|
110
|
+
when "fixnum", "fix"; "Fixnum"
|
|
111
|
+
when /^(?:un)?signed$/, /^(?:(?:un)?signed\s*)?(?:short|int|long|long\s+long)$/, "integer", "Integer"; "Integer"
|
|
112
|
+
when "num", "numeric", "Numeric", "number"; "Numeric"
|
|
113
|
+
when "aBignum"; "Bignum"
|
|
114
|
+
when "nil"; "nil"
|
|
115
|
+
when "true"; "true"
|
|
116
|
+
when "false"; "false"
|
|
117
|
+
when "bool", "boolean", "Boolean"; "Boolean"
|
|
118
|
+
when "self"; "self"
|
|
119
|
+
when /^[-+]?\d/; t
|
|
120
|
+
when /[A-Z][_a-z0-9]+/; t
|
|
121
|
+
end
|
|
122
|
+
end.compact
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
def remove_private_comments(comment)
|
|
127
|
+
comment = comment.gsub(%r{/?\*--\n(.*?)/?\*\+\+}m, '')
|
|
128
|
+
comment = comment.sub(%r{/?\*--\n.*}m, '')
|
|
129
|
+
comment
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
module YARD
|
|
3
|
+
module Parser
|
|
4
|
+
module C
|
|
5
|
+
class Statement
|
|
6
|
+
attr_accessor :source
|
|
7
|
+
attr_accessor :line
|
|
8
|
+
attr_accessor :file
|
|
9
|
+
|
|
10
|
+
# @deprecated Groups are now defined by directives
|
|
11
|
+
# @see Tags::GroupDirective
|
|
12
|
+
attr_accessor :group
|
|
13
|
+
|
|
14
|
+
attr_accessor :comments_hash_flag
|
|
15
|
+
|
|
16
|
+
def initialize(source, file = nil, line = nil)
|
|
17
|
+
@source = source
|
|
18
|
+
@file = file
|
|
19
|
+
@line = line
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def line_range
|
|
23
|
+
line...(line + source.count("\n"))
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def comments_range
|
|
27
|
+
comments.line_range
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def first_line
|
|
31
|
+
source.split(/\n/).first
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
alias signature first_line
|
|
35
|
+
|
|
36
|
+
def show
|
|
37
|
+
"\t#{line}: #{first_line}"
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
class BodyStatement < Statement
|
|
42
|
+
attr_accessor :comments
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
class ToplevelStatement < Statement
|
|
46
|
+
attr_accessor :block
|
|
47
|
+
attr_accessor :declaration
|
|
48
|
+
attr_accessor :comments
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
class Comment < Statement
|
|
52
|
+
include CommentParser
|
|
53
|
+
|
|
54
|
+
attr_accessor :type
|
|
55
|
+
attr_accessor :overrides
|
|
56
|
+
attr_accessor :statement
|
|
57
|
+
|
|
58
|
+
def initialize(source, file = nil, line = nil)
|
|
59
|
+
super(parse_comments(source), file, line)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def comments; self end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|