diff options
| author | Seba Gamboa <[email protected]> | 2015-09-25 18:01:14 -0300 |
|---|---|---|
| committer | Seba Gamboa <[email protected]> | 2015-09-25 18:01:14 -0300 |
| commit | 3a60c88a3b3dbd334e4769a6283fb90c0495c25b (patch) | |
| tree | de3d8ec187771d6e2d5f42da864c19ee6d69d890 /lib/yard/mruby/parser | |
| parent | 82e906d74dcc943d737ced7a6ebfee1e71a74aaf (diff) | |
| download | yard-mruby-3a60c88a3b3dbd334e4769a6283fb90c0495c25b.tar.gz yard-mruby-3a60c88a3b3dbd334e4769a6283fb90c0495c25b.zip | |
Sorting tons of stuff around
Diffstat (limited to 'lib/yard/mruby/parser')
| -rw-r--r-- | lib/yard/mruby/parser/c.rb | 3 | ||||
| -rw-r--r-- | lib/yard/mruby/parser/c/header_parser.rb (renamed from lib/yard/mruby/parser/header_parser.rb) | 5 | ||||
| -rw-r--r-- | lib/yard/mruby/parser/c/parser.rb | 10 | ||||
| -rw-r--r-- | lib/yard/mruby/parser/c/source_parser.rb | 9 |
4 files changed, 24 insertions, 3 deletions
diff --git a/lib/yard/mruby/parser/c.rb b/lib/yard/mruby/parser/c.rb new file mode 100644 index 0000000..4d95fa1 --- /dev/null +++ b/lib/yard/mruby/parser/c.rb @@ -0,0 +1,3 @@ +require_relative 'c/parser' +require_relative 'c/source_parser' +require_relative 'c/header_parser' diff --git a/lib/yard/mruby/parser/header_parser.rb b/lib/yard/mruby/parser/c/header_parser.rb index 6fe4df3..598fe21 100644 --- a/lib/yard/mruby/parser/header_parser.rb +++ b/lib/yard/mruby/parser/c/header_parser.rb @@ -1,6 +1,5 @@ - -module YARD::MRuby::Parser - class HeaderParser < YARD::Parser::C::CParser +module YARD::MRuby::Parser::C + class HeaderParser < Parser end # diff --git a/lib/yard/mruby/parser/c/parser.rb b/lib/yard/mruby/parser/c/parser.rb new file mode 100644 index 0000000..3b6414a --- /dev/null +++ b/lib/yard/mruby/parser/c/parser.rb @@ -0,0 +1,10 @@ +module YARD::MRuby::Parser + module C + class Parser < YARD::Parser::C::CParser + end + + # Disable default C Parser + YARD::Parser::SourceParser.parser_types.delete(:c) + YARD::Parser::SourceParser.parser_type_extensions.delete(:c) + end +end diff --git a/lib/yard/mruby/parser/c/source_parser.rb b/lib/yard/mruby/parser/c/source_parser.rb new file mode 100644 index 0000000..f468dea --- /dev/null +++ b/lib/yard/mruby/parser/c/source_parser.rb @@ -0,0 +1,9 @@ +module YARD::MRuby::Parser::C + class SourceParser < Parser + end + + # + # Register all header files (.h) to be processed with the above HeaderParser + YARD::Parser::SourceParser.register_parser_type :source, SourceParser, 'c' + +end |
