summaryrefslogtreecommitdiff
path: root/ext/ripper/lib/ripper/sexp.rb
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2020-11-17 21:26:24 -0800
committerJeremy Evans <code@jeremyevans.net>2020-11-17 21:26:56 -0800
commit1301bd8ca93c4e5035f3d52681d63a8966f005c4 (patch)
tree0087ae28eb302f446e95e7f19c3595031b0ba925 /ext/ripper/lib/ripper/sexp.rb
parentcd0877a93e91fecb3066984b3fa2a762e6977caf (diff)
Update documentation for Ripper.{lex,tokenize,sexp,sexp_raw} [ci skip]
Diffstat (limited to 'ext/ripper/lib/ripper/sexp.rb')
-rw-r--r--ext/ripper/lib/ripper/sexp.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/ripper/lib/ripper/sexp.rb b/ext/ripper/lib/ripper/sexp.rb
index 27b86e4..b1d553b 100644
--- a/ext/ripper/lib/ripper/sexp.rb
+++ b/ext/ripper/lib/ripper/sexp.rb
@@ -17,6 +17,10 @@ class Ripper
# Parses +src+ and create S-exp tree.
# Returns more readable tree rather than Ripper.sexp_raw.
# This method is mainly for developer use.
+ # The +filename+ argument is mostly ignored.
+ # By default, this method does not handle syntax errors in +src+,
+ # returning +nil+ in such cases. Use the +raise_errors+ keyword
+ # to raise a SyntaxError for an error in +src+.
#
# require 'ripper'
# require 'pp'
@@ -43,6 +47,10 @@ class Ripper
# [EXPERIMENTAL]
# Parses +src+ and create S-exp tree.
# This method is mainly for developer use.
+ # The +filename+ argument is mostly ignored.
+ # By default, this method does not handle syntax errors in +src+,
+ # returning +nil+ in such cases. Use the +raise_errors+ keyword
+ # to raise a SyntaxError for an error in +src+.
#
# require 'ripper'
# require 'pp'