Module: RubyAST
- Defined in:
- lib/rubyast.rb,
lib/rubyast/version.rb,
lib/rubyast/include_jrubyparser.rb,
lib/rubyast/jruby_parser_wrapper.rb
Defined Under Namespace
Modules: J, JRubyParserWrapper
Classes: SyntaxException
Constant Summary
collapse
- VERSION =
"0.0.2"
Class Method Summary
collapse
Class Method Details
.parse(file_name, source, config = {}) ⇒ Object
6
7
8
9
10
|
# File 'lib/rubyast.rb', line 6
def self.parse file_name, source, config = {}
line_number = config.fetch(:line_number, 0)
ruby_version = config.fetch(:ruby_version, "RUBY1_9")
JRubyParserWrapper.parse file_name, source, line_number, ruby_version
end
|
.to_source(ast, original_source = "") ⇒ Object
12
13
14
|
# File 'lib/rubyast.rb', line 12
def self.to_source ast, original_source = ""
JRubyParserWrapper.to_source ast, original_source
end
|