Sha256: 5cbe63ab0114eeafcc2c2a96a10e36b62323392220f4b291e175e4ae0267f367
Contents?: true
Size: 468 Bytes
Versions: 8
Compression:
Stored size: 468 Bytes
Contents
module Mulang::Ruby module SexpParser Parser::Builders::Default.emit_lambda = true Parser::Builders::Default.emit_procarg0 = true def self.parser(ruby_code) parser = Parser::CurrentRuby.new parser.diagnostics.consumer = lambda {|it|} buffer = Parser::Source::Buffer.new('(string)') buffer.source = ruby_code parser.parse(buffer).tap do |result| raise "Syntax error" if result.eql? false end end end end
Version data entries
8 entries across 8 versions & 1 rubygems