class SimplePoParser::Parser

def comment_text

Returns:
  • (String) - text
def comment_text
  begin
    text = @scanner.scan(/.*/) # everything until newline
    text.rstrip! # benchmarked faster too rstrip the string in place
    raise PoSyntaxError, "Comment text should advance to next line or stop at eos" unless end_of_line
    text
  rescue PoSyntaxError => pe
    raise PoSyntaxError, "Syntax error in commtent_text\n" + pe.message, pe.backtrace
  end
end