lib/melbourne/ast/control_flow.rb in melbourne-1.0.0 vs lib/melbourne/ast/control_flow.rb in melbourne-1.0.1
- old
+ new
@@ -19,11 +19,11 @@
# The +else+ node of the +case+ statement (or +nil+ if there is none)
#
attr_accessor :else
- def initialize(line, whens, else_body) #:nodoc:
+ def initialize(line, whens, else_body)
@line = line
@whens = whens
@else = else_body || Nil.new(line)
end
@@ -42,11 +42,11 @@
# The receiver of the +case+ statement
#
attr_accessor :receiver
- def initialize(line, receiver, whens, else_body) #:nodoc:
+ def initialize(line, receiver, whens, else_body)
@line = line
@receiver = receiver
@whens = whens
@else = else_body || Nil.new(line)
end
@@ -74,15 +74,15 @@
# The single value for the +when+ statement if only a single value is specified, +nil+ otherwise
#
attr_accessor :single
- # Any splat (<tt>*something</tt>) that is specified as a condition for the +when+ statement or +nil+ of no splat is specified
+ # Any splat (+*something+) that is specified as a condition for the +when+ statement or +nil+ of no splat is specified
#
attr_accessor :splat
- def initialize(line, conditions, body) #:nodoc:
+ def initialize(line, conditions, body)
@line = line
@body = body || Nil.new(line)
@splat = nil
@single = nil
@@ -108,11 +108,11 @@
end
end
end
- # A splat (<tt>*something</tt>) inside a condition of a +when+ statement as in:
+ # A splat (+*something+) inside a condition of a +when+ statement as in:
#
# case a
# when *c then
# d
# end
@@ -121,11 +121,11 @@
# The actual content of the plat
#
attr_accessor :condition
- def initialize(line, condition) #:nodoc:
+ def initialize(line, condition)
@line = line
@condition = condition
end
end
@@ -134,11 +134,11 @@
#
# 1 if TRUE..FALSE
#
class Flip2 < Node
- def initialize(line, start, finish) #:nodoc:
+ def initialize(line, start, finish)
@line = line
@start = start
@finish = finish
end
@@ -148,11 +148,11 @@
#
# 1 if TRUE...FALSE
#
class Flip3 < Node
- def initialize(line, start, finish) #:nodoc:
+ def initialize(line, start, finish)
@line = line
@start = start
@finish = finish
end
@@ -174,11 +174,11 @@
# The +else+ block of the +if+ statement (if there is one)
#
attr_accessor :else
- def initialize(line, condition, body, else_body) #:nodoc:
+ def initialize(line, condition, body, else_body)
@line = line
@condition = condition
@body = body || Nil.new(line)
@else = else_body || Nil.new(line)
end
@@ -201,11 +201,11 @@
# Whether to check the +while+ statement's condition before or after ths code in the +body+ is executed
#
attr_accessor :check_first
- def initialize(line, condition, body, check_first) #:nodoc:
+ def initialize(line, condition, body, check_first)
@line = line
@condition = condition
@body = body || Nil.new(line)
@check_first = check_first
end
@@ -228,11 +228,11 @@
# the regex pattern used for the match
#
attr_accessor :pattern
- def initialize(line, pattern, flags) #:nodoc:
+ def initialize(line, pattern, flags)
@line = line
@pattern = RegexLiteral.new line, pattern, flags
end
end
@@ -249,11 +249,11 @@
# the value that is matched against the +pattern+
#
attr_accessor :value
- def initialize(line, pattern, value) #:nodoc:
+ def initialize(line, pattern, value)
@line = line
@pattern = pattern
@value = value
end
@@ -271,11 +271,11 @@
# the value that is matched against the +pattern+
#
attr_accessor :value
- def initialize(line, pattern, value) #:nodoc:
+ def initialize(line, pattern, value)
@line = line
@pattern = pattern
@value = value
end
@@ -295,11 +295,11 @@
# The value passed to +break+
#
attr_accessor :value
- def initialize(line, expr) #:nodoc:
+ def initialize(line, expr)
@line = line
@value = expr || Nil.new(line)
end
end
@@ -311,11 +311,11 @@
# i += 1
# end
#
class Next < Break
- def initialize(line, value) #:nodoc:
+ def initialize(line, value)
@line = line
@value = value
end
end
@@ -330,11 +330,11 @@
# end
# end
#
class Redo < Break
- def initialize(line) #:nodoc:
+ def initialize(line)
@line = line
end
end
@@ -349,11 +349,11 @@
# end
# end
#
class Retry < Break
- def initialize(line) #:nodoc:
+ def initialize(line)
@line = line
end
end
@@ -367,10 +367,10 @@
# The value passed to +return+
#
attr_accessor :value
- def initialize(line, expr) #:nodoc:
+ def initialize(line, expr)
@line = line
@value = expr
@splat = nil
end