mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[DOC] Ripper.{lex,tokenize} now always return full tokens. [ci skip]
This commit is contained in:
parent
18599b5749
commit
4f5d14eb8c
Notes:
git
2020-11-21 08:46:41 +09:00
1 changed files with 2 additions and 4 deletions
|
@ -17,8 +17,7 @@ class Ripper
|
|||
# The +filename+ and +lineno+ arguments are mostly ignored, since the
|
||||
# return value is just the tokenized input.
|
||||
# By default, this method does not handle syntax errors in +src+,
|
||||
# ignoring tokens after the syntax error. Use the +raise_errors+ keyword
|
||||
# to raise a SyntaxError for an error in +src+.
|
||||
# use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+.
|
||||
#
|
||||
# p Ripper.tokenize("def m(a) nil end")
|
||||
# # => ["def", " ", "m", "(", "a", ")", " ", "nil", " ", "end"]
|
||||
|
@ -32,8 +31,7 @@ class Ripper
|
|||
# <code>[[lineno, column], type, token, state]</code>.
|
||||
# The +filename+ argument is mostly ignored.
|
||||
# By default, this method does not handle syntax errors in +src+,
|
||||
# ignoring tokens after the syntax error. Use the +raise_errors+ keyword
|
||||
# to raise a SyntaxError for an error in +src+.
|
||||
# use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+.
|
||||
#
|
||||
# require 'ripper'
|
||||
# require 'pp'
|
||||
|
|
Loading…
Reference in a new issue