lib/melbourne/ast/literals.rb in melbourne-1.0.0 vs lib/melbourne/ast/literals.rb in melbourne-1.0.1

- old
+ new

@@ -10,11 +10,11 @@ # The body os the array literal (the actual values contained in the array) # attr_accessor :body - def initialize(line, array) #:nodoc: + def initialize(line, array) @line = line @body = array end end @@ -51,11 +51,11 @@ # The actual value of the float literal # attr_accessor :value - def initialize(line, str) #:nodoc: + def initialize(line, str) @line = line @value = str.to_f end end @@ -68,11 +68,11 @@ # The actual values in the hash literal # attr_accessor :array - def initialize(line, array) #:nodoc: + def initialize(line, array) @line = line @array = array end end @@ -85,11 +85,11 @@ # The value of the symbol literal # attr_accessor :value - def initialize(line, sym) #:nodoc: + def initialize(line, sym) @line = line @value = sym end end @@ -100,11 +100,11 @@ # class Nil < Node end - class NumberLiteral < Node #:nodoc: + class NumberLiteral < Node attr_accessor :value def initialize(line, value) @line = line @@ -117,11 +117,11 @@ # # 1 # class FixnumLiteral < NumberLiteral - def initialize(line, value) #:nodoc: + def initialize(line, value) @line = line @value = value end end @@ -138,11 +138,11 @@ # The finish of the range # attr_accessor :finish - def initialize(line, start, finish) #:nodoc: + def initialize(line, start, finish) @line = line @start = start @finish = finish end @@ -152,11 +152,11 @@ # # 1...3 # class RangeExclude < Range - def initialize(line, start, finish) #:nodoc: + def initialize(line, start, finish) @line = line @start = start @finish = finish end @@ -174,11 +174,11 @@ # Options defined for the regular expression literal (e.g. +n+ or +o+) # attr_accessor :options - def initialize(line, str, flags) #:nodoc: + def initialize(line, str, flags) @line = line @source = str @options = flags end @@ -192,11 +192,11 @@ # The actual string of the string literal # attr_accessor :string - def initialize(line, str) #:nodoc: + def initialize(line, str) @line = line @string = str end end @@ -209,13 +209,13 @@ # The parts of the dynamic string literal # attr_accessor :array - attr_accessor :options #:nodoc: + attr_accessor :options - def initialize(line, str, array) #:nodoc: + def initialize(line, str, array) @line = line @string = str @array = array end @@ -241,18 +241,18 @@ # # /.*#{a}/ # class DynamicRegex < DynamicString - def initialize(line, str, array, flags) #:nodoc: + def initialize(line, str, array, flags) super line, str, array @options = flags || 0 end end # TODO: document! - class DynamicOnceRegex < DynamicRegex #:nodoc: + class DynamicOnceRegex < DynamicRegex end # An execute string literal as in: #