Class: RubyNext::Language::PacoParsers::Comments
- Defined in:
- lib/ruby-next/language/paco_parsers/comments.rb
Instance Method Summary collapse
-
#block_comment ⇒ Object
Matches a Ruby block comment (from ‘=begin` till `=end`).
- #default ⇒ Object
-
#line_comment ⇒ Object
Matches a Ruby line comment (from ‘#` till the end of the line).
Methods inherited from Base
Instance Method Details
#block_comment ⇒ Object
Matches a Ruby block comment (from ‘=begin` till `=end`)
20 21 22 |
# File 'lib/ruby-next/language/paco_parsers/comments.rb', line 20 def block_comment anything_between(starting_string("=begin"), starting_string("=end")) end |
#default ⇒ Object
7 8 9 10 11 12 |
# File 'lib/ruby-next/language/paco_parsers/comments.rb', line 7 def default alt( line_comment, block_comment ) end |
#line_comment ⇒ Object
Matches a Ruby line comment (from ‘#` till the end of the line)
15 16 17 |
# File 'lib/ruby-next/language/paco_parsers/comments.rb', line 15 def line_comment anything_between(string("#"), end_of_line) end |