Sha256: f27ef6acece2776f4dfc9d38d8a3b77ab45d471099740b3d41c0979ca457d510
Contents?: true
Size: 700 Bytes
Versions: 8
Compression:
Stored size: 700 Bytes
Contents
require 'parser/current' module Yoda module Parsing class Parser # @param string [String] # @return [::Parser::AST::Node] def parse(string) ::Parser::CurrentRuby.parse(string) end # @param string [String] # @return [(::Parser::AST::Node, Array<::Parser::Source::Comment>)] def parse_with_comments(string) ::Parser::CurrentRuby.parse_with_comments(string) end # @param string [String] # @return [(::Parser::AST::Node, Array<::Parser::Source::Comment>), nil] def parse_with_comments_if_valid(string) parse_with_comments(source) rescue ::Parser::SyntaxError nil end end end end
Version data entries
8 entries across 8 versions & 1 rubygems