* ext/ripper/lib/ripper.rb: Documentation for Ripper.
+:void_stmt+ is meaningless [Bug #6929] [ruby-core:47507] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0503756fe5
commit
cca61dafe8
@ -1,3 +1,9 @@
|
|||||||
|
Thu Sep 20 07:15:00 2012 Zachary Scott <zzak@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/ripper/lib/ripper.rb: Documentation for Ripper.
|
||||||
|
+:void_stmt+ is meaningless
|
||||||
|
[Bug #6929] [ruby-core:47507]
|
||||||
|
|
||||||
Thu Sep 20 07:05:00 2012 Zachary Scott <zzak@ruby-lang.org>
|
Thu Sep 20 07:05:00 2012 Zachary Scott <zzak@ruby-lang.org>
|
||||||
|
|
||||||
* lib/csv.rb (Object#CSV, Array#to_csv, String#parse_csv):
|
* lib/csv.rb (Object#CSV, Array#to_csv, String#parse_csv):
|
||||||
|
@ -20,19 +20,18 @@ require 'ripper/sexp'
|
|||||||
# require 'ripper'
|
# require 'ripper'
|
||||||
# require 'pp'
|
# require 'pp'
|
||||||
#
|
#
|
||||||
# pp Ripper.sexp('def hello(world); "Hello, #{world}!"; end')
|
# pp Ripper.sexp('def hello(world) "Hello, #{world}!"; end')
|
||||||
# #=> [:program,
|
# #=> [:program,
|
||||||
# [[:def,
|
# [[:def,
|
||||||
# [:@ident, "hello", [1, 4]],
|
# [:@ident, "hello", [1, 4]],
|
||||||
# [:paren,
|
# [:paren,
|
||||||
# [:params, [[:@ident, "world", [1, 10]]], nil, nil, nil, nil, nil, nil]],
|
# [:params, [[:@ident, "world", [1, 10]]], nil, nil, nil, nil]],
|
||||||
# [:bodystmt,
|
# [:bodystmt,
|
||||||
# [[:void_stmt],
|
# [[:string_literal,
|
||||||
# [:string_literal,
|
|
||||||
# [:string_content,
|
# [:string_content,
|
||||||
# [:@tstring_content, "Hello, ", [1, 19]],
|
# [:@tstring_content, "Hello, ", [1, 18]],
|
||||||
# [:string_embexpr, [[:var_ref, [:@ident, "world", [1, 28]]]]],
|
# [:string_embexpr, [[:var_ref, [:@ident, "world", [1, 27]]]]],
|
||||||
# [:@tstring_content, "!", [1, 34]]]]],
|
# [:@tstring_content, "!", [1, 33]]]]],
|
||||||
# nil,
|
# nil,
|
||||||
# nil,
|
# nil,
|
||||||
# nil]]]]
|
# nil]]]]
|
||||||
@ -47,7 +46,7 @@ require 'ripper/sexp'
|
|||||||
# which contains the full definition of the method.
|
# which contains the full definition of the method.
|
||||||
#
|
#
|
||||||
# In our case, we're simply returning a String, so next we have the
|
# In our case, we're simply returning a String, so next we have the
|
||||||
# +:void_stmt+ followed by a +:string_literal+.
|
# +:string_literal+ expression.
|
||||||
#
|
#
|
||||||
# Within our +:string_literal+ you'll notice two <code>@tstring_content</code>,
|
# Within our +:string_literal+ you'll notice two <code>@tstring_content</code>,
|
||||||
# this is the literal part for <code>Hello, </code> and <code>!</code>. Between
|
# this is the literal part for <code>Hello, </code> and <code>!</code>. Between
|
||||||
|
Loading…
x
Reference in New Issue
Block a user