🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

ruby_parser

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ruby_parser - rubygems Package Compare versions

Comparing version
3.7.2
to
3.7.3
+7
-0
History.txt

@@ -0,1 +1,8 @@

=== 3.7.3 / 2016-01-21
* 2 bug fixes:
* Fixed parsing kwargs in defs with no parens. (presidentbeef)
* defs should have a nil node if body is empty.
=== 3.7.2 / 2015-10-26

@@ -2,0 +9,0 @@

+60
-60
# encoding: UTF-8
#--
# This file is automatically generated. Do not modify it.
# Generated by: oedipus_lex version 2.4.0.
# Generated by: oedipus_lex version 2.4.1.
# Source: lib/ruby_lexer.rex

@@ -79,3 +79,3 @@ #++

case
when text = ss.scan(/[\ \t\r\f\v]/) then
when ss.skip(/[\ \t\r\f\v]/) then
action { self.space_seen = true; next }

@@ -86,5 +86,5 @@ when text = ss.scan(/\n|\#/) then

process_bracing text
when ss.check(/\!/) then
when ss.match?(/\!/) then
case
when in_arg_state? && (text = ss.scan(/\!\@/)) then
when in_arg_state? && (ss.skip(/\!\@/)) then
action { result :expr_arg, :tUBANG, "!@" }

@@ -94,9 +94,9 @@ when text = ss.scan(/\![=~]?/) then

end # group /\!/
when ss.check(/\./) then
when ss.match?(/\./) then
case
when text = ss.scan(/\.\.\.?/) then
action { result :expr_beg, TOKENS[text], text }
when text = ss.scan(/\.\d/) then
when ss.skip(/\.\d/) then
action { rb_compile_error "no .<digit> floating literal anymore put 0 before dot" }
when text = ss.scan(/\./) then
when ss.skip(/\./) then
action { result :expr_dot, :tDOT, "." }

@@ -108,3 +108,3 @@ end # group /\./

action { result :expr_beg, TOKENS[text], text }
when ss.check(/=/) then
when ss.match?(/=/) then
case

@@ -128,3 +128,3 @@ when text = ss.scan(/\=\=\=|\=\=|\=~|\=>|\=(?!begin\b)/) then

process_ivar text
when ss.check(/:/) then
when ss.match?(/:/) then
case

@@ -142,27 +142,27 @@ when not_end? && (text = ss.scan(/:([a-zA-Z_]#{IDENT_CHAR}*(?:[?]|[!](?!=)|=(?==>)|=(?![=>]))?)/o)) then

end # group /:/
when text = ss.scan(/->/) then
when ss.skip(/->/) then
action { result :expr_endfn, :tLAMBDA, nil }
when text = ss.scan(/[+-]/) then
process_plus_minus text
when ss.check(/[+\d]/) then
when ss.match?(/[+\d]/) then
case
when text = ss.scan(/#{NUM_BAD}/o) then
when ss.skip(/#{NUM_BAD}/o) then
action { rb_compile_error "Invalid numeric format" }
when text = ss.scan(/#{INT_DEC}/o) then
when ss.skip(/#{INT_DEC}/o) then
action { int_with_base 10 }
when text = ss.scan(/#{INT_HEX}/o) then
when ss.skip(/#{INT_HEX}/o) then
action { int_with_base 16 }
when text = ss.scan(/#{INT_BIN}/o) then
when ss.skip(/#{INT_BIN}/o) then
action { int_with_base 2 }
when text = ss.scan(/#{INT_OCT_BAD}/o) then
when ss.skip(/#{INT_OCT_BAD}/o) then
action { rb_compile_error "Illegal octal digit." }
when text = ss.scan(/#{INT_OCT}/o) then
when ss.skip(/#{INT_OCT}/o) then
action { int_with_base 8 }
when text = ss.scan(/#{FLOAT_BAD}/o) then
when ss.skip(/#{FLOAT_BAD}/o) then
action { rb_compile_error "Trailing '_' in number." }
when text = ss.scan(/#{FLOAT}/o) then
process_float text
when text = ss.scan(/#{INT_DEC2}/o) then
when ss.skip(/#{INT_DEC2}/o) then
action { int_with_base 10 }
when text = ss.scan(/[0-9]/) then
when ss.skip(/[0-9]/) then
action { rb_compile_error "Bad number format" }

@@ -174,11 +174,11 @@ end # group /[+\d]/

process_label_or_string text
when ss.check(/\|/) then
when ss.match?(/\|/) then
case
when text = ss.scan(/\|\|\=/) then
when ss.skip(/\|\|\=/) then
action { result :expr_beg, :tOP_ASGN, "||" }
when text = ss.scan(/\|\|/) then
when ss.skip(/\|\|/) then
action { result :expr_beg, :tOROP, "||" }
when text = ss.scan(/\|\=/) then
when ss.skip(/\|\=/) then
action { result :expr_beg, :tOP_ASGN, "|" }
when text = ss.scan(/\|/) then
when ss.skip(/\|/) then
action { result :arg_state, :tPIPE, "|" }

@@ -188,44 +188,44 @@ end # group /\|/

process_curly_brace text
when ss.check(/\*/) then
when ss.match?(/\*/) then
case
when text = ss.scan(/\*\*=/) then
when ss.skip(/\*\*=/) then
action { result :expr_beg, :tOP_ASGN, "**" }
when text = ss.scan(/\*\*/) then
when ss.skip(/\*\*/) then
action { result(:arg_state, space_vs_beginning(:tDSTAR, :tDSTAR, :tPOW), "**") }
when text = ss.scan(/\*\=/) then
when ss.skip(/\*\=/) then
action { result(:expr_beg, :tOP_ASGN, "*") }
when text = ss.scan(/\*/) then
when ss.skip(/\*/) then
action { result(:arg_state, space_vs_beginning(:tSTAR, :tSTAR, :tSTAR2), "*") }
end # group /\*/
when ss.check(/</) then
when ss.match?(/</) then
case
when text = ss.scan(/\<\=\>/) then
when ss.skip(/\<\=\>/) then
action { result :arg_state, :tCMP, "<=>" }
when text = ss.scan(/\<\=/) then
when ss.skip(/\<\=/) then
action { result :arg_state, :tLEQ, "<=" }
when text = ss.scan(/\<\<\=/) then
when ss.skip(/\<\<\=/) then
action { result :arg_state, :tOP_ASGN, "<<" }
when text = ss.scan(/\<\</) then
process_lchevron text
when text = ss.scan(/\</) then
when ss.skip(/\</) then
action { result :arg_state, :tLT, "<" }
end # group /</
when ss.check(/>/) then
when ss.match?(/>/) then
case
when text = ss.scan(/\>\=/) then
when ss.skip(/\>\=/) then
action { result :arg_state, :tGEQ, ">=" }
when text = ss.scan(/\>\>=/) then
when ss.skip(/\>\>=/) then
action { result :arg_state, :tOP_ASGN, ">>" }
when text = ss.scan(/\>\>/) then
when ss.skip(/\>\>/) then
action { result :arg_state, :tRSHFT, ">>" }
when text = ss.scan(/\>/) then
when ss.skip(/\>/) then
action { result :arg_state, :tGT, ">" }
end # group />/
when ss.check(/\`/) then
when ss.match?(/\`/) then
case
when expr_fname? && (text = ss.scan(/\`/)) then
when expr_fname? && (ss.skip(/\`/)) then
action { result(:expr_end, :tBACK_REF2, "`") }
when expr_dot? && (text = ss.scan(/\`/)) then
when expr_dot? && (ss.skip(/\`/)) then
action { result((command_state ? :expr_cmdarg : :expr_arg), :tBACK_REF2, "`") }
when text = ss.scan(/\`/) then
when ss.skip(/\`/) then
action { string STR_XQUOTE, '`'; result(nil, :tXSTRING_BEG, "`") }

@@ -235,9 +235,9 @@ end # group /\`/

process_questionmark text
when ss.check(/&/) then
when ss.match?(/&/) then
case
when text = ss.scan(/\&\&\=/) then
when ss.skip(/\&\&\=/) then
action { result(:expr_beg, :tOP_ASGN, "&&") }
when text = ss.scan(/\&\&/) then
when ss.skip(/\&\&/) then
action { result(:expr_beg, :tANDOP, "&&") }
when text = ss.scan(/\&\=/) then
when ss.skip(/\&\=/) then
action { result(:expr_beg, :tOP_ASGN, "&" ) }

@@ -249,23 +249,23 @@ when text = ss.scan(/\&/) then

process_slash text
when ss.check(/\^/) then
when ss.match?(/\^/) then
case
when text = ss.scan(/\^=/) then
when ss.skip(/\^=/) then
action { result(:expr_beg, :tOP_ASGN, "^") }
when text = ss.scan(/\^/) then
when ss.skip(/\^/) then
action { result(:arg_state, :tCARET, "^") }
end # group /\^/
when text = ss.scan(/\;/) then
when ss.skip(/\;/) then
action { self.command_start = true; result(:expr_beg, :tSEMI, ";") }
when ss.check(/~/) then
when ss.match?(/~/) then
case
when in_arg_state? && (text = ss.scan(/\~@/)) then
when in_arg_state? && (ss.skip(/\~@/)) then
action { result(:arg_state, :tTILDE, "~") }
when text = ss.scan(/\~/) then
when ss.skip(/\~/) then
action { result(:arg_state, :tTILDE, "~") }
end # group /~/
when ss.check(/\\/) then
when ss.match?(/\\/) then
case
when text = ss.scan(/\\\r?\n/) then
when ss.skip(/\\\r?\n/) then
action { self.lineno += 1; self.space_seen = true; next }
when text = ss.scan(/\\/) then
when ss.skip(/\\/) then
action { rb_compile_error "bare backslash only allowed before newline" }

@@ -275,3 +275,3 @@ end # group /\\/

process_percent text
when ss.check(/\$/) then
when ss.match?(/\$/) then
case

@@ -303,3 +303,3 @@ when text = ss.scan(/\$_\w+/) then

process_token text
when text = ss.scan(/\004|\032|\000|\Z/) then
when ss.skip(/\004|\032|\000|\Z/) then
action { [RubyLexer::EOF, RubyLexer::EOF] }

@@ -306,0 +306,0 @@ when text = ss.scan(/./) then

@@ -94,3 +94,3 @@ # encoding: ASCII-8BIT

module RubyParserStuff
VERSION = "3.7.2" unless constants.include? "VERSION" # SIGH
VERSION = "3.7.3" unless constants.include? "VERSION" # SIGH

@@ -649,2 +649,3 @@ attr_accessor :lexer, :in_def, :in_single, :file

recv, name, args, body = val[1], val[4], val[6], val[7]
body ||= s(:nil)

@@ -651,0 +652,0 @@ result = s(:defs, recv, name.to_sym, args)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display