D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Prism
/
Translation
/
Ripper
/
Filename :
sexp-c.ri
back
Copy
U:RDoc::AnyMethod[iI" sexp:ETI"%Prism::Translation::Ripper::sexp;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I")Parses +src+ and create S-exp tree. ;TI"=Returns more readable tree rather than Ripper.sexp_raw. ;TI".This method is mainly for developer use. ;TI"0The +filename+ argument is mostly ignored. ;TI"EBy default, this method does not handle syntax errors in +src+, ;TI"Creturning +nil+ in such cases. Use the +raise_errors+ keyword ;TI"2to raise a SyntaxError for an error in +src+.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"require "ripper" ;TI"require "pp" ;TI" ;TI"(pp Ripper.sexp("def m(a) nil end") ;TI" #=> [:program, ;TI" [[:def, ;TI"% [:@ident, "m", [1, 4]], ;TI"Z [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil, nil, nil, nil]], ;TI"O [:bodystmt, [[:var_ref, [:@kw, "nil", [1, 9]]]], nil, nil, nil]]]];T:@format0: @fileI"$lib/prism/translation/ripper.rb;T:0@omit_headings_from_table_of_contents_below000[ I";(src, filename = "-", lineno = 1, raise_errors: false);T@ FI"Ripper;TcRDoc::NormalClass00