sass 3.3.0.alpha.149 → 3.3.0.alpha.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. data/REVISION +1 -1
  2. data/VERSION +1 -1
  3. data/VERSION_DATE +1 -1
  4. data/lib/sass/css.rb +1 -1
  5. data/lib/sass/engine.rb +4 -4
  6. data/lib/sass/environment.rb +1 -1
  7. data/lib/sass/exec.rb +1 -1
  8. data/lib/sass/media.rb +15 -15
  9. data/lib/sass/script.rb +32 -7
  10. data/lib/sass/script/css_lexer.rb +2 -2
  11. data/lib/sass/script/css_parser.rb +1 -1
  12. data/lib/sass/script/functions.rb +246 -232
  13. data/lib/sass/script/lexer.rb +24 -32
  14. data/lib/sass/script/parser.rb +84 -65
  15. data/lib/sass/script/tree.rb +14 -0
  16. data/lib/sass/script/tree/funcall.rb +242 -0
  17. data/lib/sass/script/{interpolation.rb → tree/interpolation.rb} +30 -13
  18. data/lib/sass/script/tree/list_literal.rb +65 -0
  19. data/lib/sass/script/tree/literal.rb +46 -0
  20. data/lib/sass/script/{node.rb → tree/node.rb} +10 -10
  21. data/lib/sass/script/{operation.rb → tree/operation.rb} +16 -27
  22. data/lib/sass/script/{string_interpolation.rb → tree/string_interpolation.rb} +4 -4
  23. data/lib/sass/script/{unary_operation.rb → tree/unary_operation.rb} +7 -8
  24. data/lib/sass/script/tree/variable.rb +56 -0
  25. data/lib/sass/script/value.rb +10 -0
  26. data/lib/sass/script/{arg_list.rb → value/arg_list.rb} +5 -20
  27. data/lib/sass/script/value/base.rb +222 -0
  28. data/lib/sass/script/{bool.rb → value/bool.rb} +2 -2
  29. data/lib/sass/script/{color.rb → value/color.rb} +22 -20
  30. data/lib/sass/script/{list.rb → value/list.rb} +15 -28
  31. data/lib/sass/script/{null.rb → value/null.rb} +3 -3
  32. data/lib/sass/script/{number.rb → value/number.rb} +19 -19
  33. data/lib/sass/script/{string.rb → value/string.rb} +7 -7
  34. data/lib/sass/scss/parser.rb +14 -4
  35. data/lib/sass/selector.rb +26 -26
  36. data/lib/sass/selector/abstract_sequence.rb +1 -1
  37. data/lib/sass/selector/simple.rb +6 -7
  38. data/lib/sass/source/position.rb +13 -0
  39. data/lib/sass/supports.rb +4 -4
  40. data/lib/sass/tree/comment_node.rb +3 -3
  41. data/lib/sass/tree/css_import_node.rb +7 -7
  42. data/lib/sass/tree/debug_node.rb +2 -2
  43. data/lib/sass/tree/directive_node.rb +2 -2
  44. data/lib/sass/tree/each_node.rb +2 -2
  45. data/lib/sass/tree/extend_node.rb +4 -4
  46. data/lib/sass/tree/for_node.rb +4 -4
  47. data/lib/sass/tree/function_node.rb +4 -4
  48. data/lib/sass/tree/media_node.rb +3 -3
  49. data/lib/sass/tree/mixin_def_node.rb +4 -4
  50. data/lib/sass/tree/mixin_node.rb +6 -6
  51. data/lib/sass/tree/prop_node.rb +23 -15
  52. data/lib/sass/tree/return_node.rb +2 -2
  53. data/lib/sass/tree/rule_node.rb +3 -3
  54. data/lib/sass/tree/variable_node.rb +2 -2
  55. data/lib/sass/tree/visitors/convert.rb +2 -2
  56. data/lib/sass/tree/visitors/deep_copy.rb +5 -5
  57. data/lib/sass/tree/visitors/perform.rb +7 -7
  58. data/lib/sass/tree/visitors/set_options.rb +6 -6
  59. data/lib/sass/tree/visitors/to_css.rb +1 -1
  60. data/lib/sass/tree/warn_node.rb +2 -2
  61. data/lib/sass/tree/while_node.rb +2 -2
  62. data/lib/sass/util.rb +2 -2
  63. data/test/sass/engine_test.rb +6 -6
  64. data/test/sass/functions_test.rb +20 -20
  65. data/test/sass/plugin_test.rb +2 -2
  66. data/test/sass/script_test.rb +38 -29
  67. data/test/test_helper.rb +1 -1
  68. metadata +23 -19
  69. data/lib/sass/script/funcall.rb +0 -238
  70. data/lib/sass/script/literal.rb +0 -221
  71. data/lib/sass/script/variable.rb +0 -58
@@ -1,6 +1,6 @@
1
- module Sass::Script
1
+ module Sass::Script::Value
2
2
  # A SassScript object representing a boolean (true or false) value.
3
- class Bool < Literal
3
+ class Bool < Base
4
4
  # The Ruby value of the boolean.
5
5
  #
6
6
  # @return [Boolean]
@@ -1,4 +1,4 @@
1
- module Sass::Script
1
+ module Sass::Script::Value
2
2
  # A SassScript object representing a CSS color.
3
3
  #
4
4
  # A color may be represented internally as RGBA, HSLA, or both.
@@ -13,7 +13,7 @@ module Sass::Script
13
13
  # It's always stored, as 1 if nothing else is specified.
14
14
  # If only the alpha channel is modified using \{#with},
15
15
  # the cached RGB and HSL values are retained.
16
- class Color < Literal
16
+ class Color < Base
17
17
  class << self; include Sass::Util; end
18
18
 
19
19
  # A hash from color names to `[red, green, blue]` value arrays.
@@ -345,14 +345,14 @@ module Sass::Script
345
345
  end
346
346
 
347
347
  # The SassScript `==` operation.
348
- # **Note that this returns a {Sass::Script::Bool} object,
348
+ # **Note that this returns a {Sass::Script::Value::Bool} object,
349
349
  # not a Ruby boolean**.
350
350
  #
351
- # @param other [Literal] The right-hand side of the operator
352
- # @return [Bool] True if this literal is the same as the other,
351
+ # @param other [Value] The right-hand side of the operator
352
+ # @return [Bool] True if this value is the same as the other,
353
353
  # false otherwise
354
354
  def eq(other)
355
- Sass::Script::Bool.new(
355
+ Sass::Script::Value::Bool.new(
356
356
  other.is_a?(Color) && rgb == other.rgb && alpha == other.alpha)
357
357
  end
358
358
 
@@ -406,14 +406,14 @@ module Sass::Script
406
406
  # {Color}
407
407
  # : Adds each of the RGB color channels together.
408
408
  #
409
- # {Literal}
410
- # : See {Literal#plus}.
409
+ # {Value}
410
+ # : See {Value#plus}.
411
411
  #
412
- # @param other [Literal] The right-hand side of the operator
412
+ # @param other [Value] The right-hand side of the operator
413
413
  # @return [Color] The resulting color
414
414
  # @raise [Sass::SyntaxError] if `other` is a number with units
415
415
  def plus(other)
416
- if other.is_a?(Sass::Script::Number) || other.is_a?(Sass::Script::Color)
416
+ if other.is_a?(Sass::Script::Value::Number) || other.is_a?(Sass::Script::Value::Color)
417
417
  piecewise(other, :+)
418
418
  else
419
419
  super
@@ -429,14 +429,14 @@ module Sass::Script
429
429
  # {Color}
430
430
  # : Subtracts each of the other color's RGB color channels from this color's.
431
431
  #
432
- # {Literal}
433
- # : See {Literal#minus}.
432
+ # {Value}
433
+ # : See {Value#minus}.
434
434
  #
435
- # @param other [Literal] The right-hand side of the operator
435
+ # @param other [Value] The right-hand side of the operator
436
436
  # @return [Color] The resulting color
437
437
  # @raise [Sass::SyntaxError] if `other` is a number with units
438
438
  def minus(other)
439
- if other.is_a?(Sass::Script::Number) || other.is_a?(Sass::Script::Color)
439
+ if other.is_a?(Sass::Script::Value::Number) || other.is_a?(Sass::Script::Value::Color)
440
440
  piecewise(other, :-)
441
441
  else
442
442
  super
@@ -456,7 +456,7 @@ module Sass::Script
456
456
  # @return [Color] The resulting color
457
457
  # @raise [Sass::SyntaxError] if `other` is a number with units
458
458
  def times(other)
459
- if other.is_a?(Sass::Script::Number) || other.is_a?(Sass::Script::Color)
459
+ if other.is_a?(Sass::Script::Value::Number) || other.is_a?(Sass::Script::Value::Color)
460
460
  piecewise(other, :*)
461
461
  else
462
462
  raise NoMethodError.new(nil, :times)
@@ -472,14 +472,15 @@ module Sass::Script
472
472
  # {Color}
473
473
  # : Divides each of this color's RGB color channels by the other color's.
474
474
  #
475
- # {Literal}
476
- # : See {Literal#div}.
475
+ # {Value}
476
+ # : See {Value#div}.
477
477
  #
478
- # @param other [Literal] The right-hand side of the operator
478
+ # @param other [Value] The right-hand side of the operator
479
479
  # @return [Color] The resulting color
480
480
  # @raise [Sass::SyntaxError] if `other` is a number with units
481
481
  def div(other)
482
- if other.is_a?(Sass::Script::Number) || other.is_a?(Sass::Script::Color)
482
+ if other.is_a?(Sass::Script::Value::Number) ||
483
+ other.is_a?(Sass::Script::Value::Color)
483
484
  piecewise(other, :/)
484
485
  else
485
486
  super
@@ -499,7 +500,8 @@ module Sass::Script
499
500
  # @return [Color] The resulting color
500
501
  # @raise [Sass::SyntaxError] if `other` is a number with units
501
502
  def mod(other)
502
- if other.is_a?(Sass::Script::Number) || other.is_a?(Sass::Script::Color)
503
+ if other.is_a?(Sass::Script::Value::Number) ||
504
+ other.is_a?(Sass::Script::Value::Color)
503
505
  piecewise(other, :%)
504
506
  else
505
507
  raise NoMethodError.new(nil, :mod)
@@ -1,12 +1,11 @@
1
- module Sass::Script
1
+ module Sass::Script::Value
2
2
  # A SassScript object representing a CSS list.
3
3
  # This includes both comma-separated lists and space-separated lists.
4
- class List < Literal
4
+ class List < Base
5
5
  # The Ruby array containing the contents of the list.
6
6
  #
7
- # @return [Array<Literal>]
7
+ # @return [Array<Value>]
8
8
  attr_reader :value
9
- alias_method :children, :value
10
9
  alias_method :to_a, :value
11
10
 
12
11
  # The operator separating the values of the list.
@@ -17,34 +16,33 @@ module Sass::Script
17
16
 
18
17
  # Creates a new list.
19
18
  #
20
- # @param value [Array<Literal>] See \{#value}
21
- # @param separator [String] See \{#separator}
19
+ # @param value [Array<Value>] See \{#value}
20
+ # @param separator [Symbol] See \{#separator}
22
21
  def initialize(value, separator)
23
22
  super(value)
24
23
  @separator = separator
25
24
  end
26
25
 
27
- # @see Node#deep_copy
28
- def deep_copy
29
- node = dup
30
- node.instance_variable_set('@value', value.map {|c| c.deep_copy})
31
- node
26
+ # @see Value#options=
27
+ def options=(options)
28
+ super
29
+ value.each {|v| v.options = options}
32
30
  end
33
31
 
34
- # @see Node#eq
32
+ # @see Value#eq
35
33
  def eq(other)
36
- Sass::Script::Bool.new(
34
+ Sass::Script::Value::Bool.new(
37
35
  other.is_a?(List) && self.value == other.value &&
38
36
  self.separator == other.separator)
39
37
  end
40
38
 
41
- # @see Node#to_s
39
+ # @see Value#to_s
42
40
  def to_s(opts = {})
43
41
  raise Sass::SyntaxError.new("() isn't a valid CSS value.") if value.empty?
44
42
  return value.reject {|e| e.is_a?(Null) || e.is_a?(List) && e.value.empty?}.map {|e| e.to_s(opts)}.join(sep_str)
45
43
  end
46
44
 
47
- # @see Node#to_sass
45
+ # @see Value#to_sass
48
46
  def to_sass(opts = {})
49
47
  return "()" if value.empty?
50
48
  precedence = Sass::Script::Parser.precedence_of(separator)
@@ -57,20 +55,9 @@ module Sass::Script
57
55
  end.join(sep_str(nil))
58
56
  end
59
57
 
60
- # @see Node#inspect
58
+ # @see Value#inspect
61
59
  def inspect
62
- "(#{to_sass})"
63
- end
64
-
65
- protected
66
-
67
- # @see Node#_perform
68
- def _perform(environment)
69
- list = Sass::Script::List.new(
70
- value.map {|e| e.perform(environment)},
71
- separator)
72
- list.options = self.options
73
- list
60
+ "(#{value.map {|e| e.inspect}.join(sep_str(nil))})"
74
61
  end
75
62
 
76
63
  private
@@ -1,7 +1,7 @@
1
- module Sass::Script
1
+ module Sass::Script::Value
2
2
  # A SassScript object representing a null value.
3
- class Null < Literal
4
- # Creates a new null literal.
3
+ class Null < Base
4
+ # Creates a new null value.
5
5
  def initialize
6
6
  super nil
7
7
  end
@@ -1,4 +1,4 @@
1
- module Sass::Script
1
+ module Sass::Script::Value
2
2
  # A SassScript object representing a number.
3
3
  # SassScript numbers can have decimal values,
4
4
  # and can also have units.
@@ -7,7 +7,7 @@ module Sass::Script
7
7
  #
8
8
  # Numbers can also have more complex units, such as `1px*em/in`.
9
9
  # These cannot be inputted directly in Sass code at the moment.
10
- class Number < Literal
10
+ class Number < Base
11
11
  # The Ruby value of the number.
12
12
  #
13
13
  # @return [Numeric]
@@ -75,11 +75,11 @@ module Sass::Script
75
75
  # {Color}
76
76
  # : Adds this number to each of the RGB color channels.
77
77
  #
78
- # {Literal}
79
- # : See {Literal#plus}.
78
+ # {Value}
79
+ # : See {Value#plus}.
80
80
  #
81
- # @param other [Literal] The right-hand side of the operator
82
- # @return [Literal] The result of the operation
81
+ # @param other [Value] The right-hand side of the operator
82
+ # @return [Value] The result of the operation
83
83
  # @raise [Sass::UnitConversionError] if `other` is a number with incompatible units
84
84
  def plus(other)
85
85
  if other.is_a? Number
@@ -97,11 +97,11 @@ module Sass::Script
97
97
  # {Number}
98
98
  # : Subtracts this number from the other, converting units if possible.
99
99
  #
100
- # {Literal}
101
- # : See {Literal#minus}.
100
+ # {Value}
101
+ # : See {Value#minus}.
102
102
  #
103
- # @param other [Literal] The right-hand side of the operator
104
- # @return [Literal] The result of the operation
103
+ # @param other [Value] The right-hand side of the operator
104
+ # @return [Value] The result of the operation
105
105
  # @raise [Sass::UnitConversionError] if `other` is a number with incompatible units
106
106
  def minus(other)
107
107
  if other.is_a? Number
@@ -153,11 +153,11 @@ module Sass::Script
153
153
  # {Number}
154
154
  # : Divides this number by the other, converting units appropriately.
155
155
  #
156
- # {Literal}
157
- # : See {Literal#div}.
156
+ # {Value}
157
+ # : See {Value#div}.
158
158
  #
159
- # @param other [Literal] The right-hand side of the operator
160
- # @return [Literal] The result of the operation
159
+ # @param other [Value] The right-hand side of the operator
160
+ # @return [Value] The result of the operation
161
161
  def div(other)
162
162
  if other.is_a? Number
163
163
  res = operate(other, :/)
@@ -189,10 +189,10 @@ module Sass::Script
189
189
 
190
190
  # The SassScript `==` operation.
191
191
  #
192
- # @param other [Literal] The right-hand side of the operator
192
+ # @param other [Value] The right-hand side of the operator
193
193
  # @return [Boolean] Whether this number is equal to the other object
194
194
  def eq(other)
195
- return Sass::Script::Bool.new(false) unless other.is_a?(Sass::Script::Number)
195
+ return Sass::Script::Value::Bool.new(false) unless other.is_a?(Sass::Script::Value::Number)
196
196
  this = self
197
197
  begin
198
198
  if unitless?
@@ -201,10 +201,10 @@ module Sass::Script
201
201
  other = other.coerce(@numerator_units, @denominator_units)
202
202
  end
203
203
  rescue Sass::UnitConversionError
204
- return Sass::Script::Bool.new(false)
204
+ return Sass::Script::Value::Bool.new(false)
205
205
  end
206
206
 
207
- Sass::Script::Bool.new(this.value == other.value)
207
+ Sass::Script::Value::Bool.new(this.value == other.value)
208
208
  end
209
209
 
210
210
  # The SassScript `>` operation.
@@ -288,7 +288,7 @@ module Sass::Script
288
288
  # Checks whether the number has the numerator unit specified.
289
289
  #
290
290
  # @example
291
- # number = Sass::Script::Number.new(10, "px")
291
+ # number = Sass::Script::Value::Number.new(10, "px")
292
292
  # number.is_unit?("px") => true
293
293
  # number.is_unit?(nil) => false
294
294
  #
@@ -1,6 +1,6 @@
1
- module Sass::Script
1
+ module Sass::Script::Value
2
2
  # A SassScript object representing a CSS string *or* a CSS identifier.
3
- class String < Literal
3
+ class String < Base
4
4
  # The Ruby value of the string.
5
5
  #
6
6
  # @return [String]
@@ -22,13 +22,13 @@ module Sass::Script
22
22
  @type = type
23
23
  end
24
24
 
25
- # @see Literal#plus
25
+ # @see Value#plus
26
26
  def plus(other)
27
- other_str = other.is_a?(Sass::Script::String) ? other.value : other.to_s
28
- Sass::Script::String.new(self.value + other_str, self.type)
27
+ other_str = other.is_a?(Sass::Script::Value::String) ? other.value : other.to_s
28
+ Sass::Script::Value::String.new(self.value + other_str, self.type)
29
29
  end
30
30
 
31
- # @see Node#to_s
31
+ # @see Value#to_s
32
32
  def to_s(opts = {})
33
33
  if @type == :identifier
34
34
  return @value.gsub(/\n\s*/, " ")
@@ -41,7 +41,7 @@ module Sass::Script
41
41
  "\"#{value.gsub('"', "\\\"")}\"" #'
42
42
  end
43
43
 
44
- # @see Node#to_sass
44
+ # @see Value#to_sass
45
45
  def to_sass(opts = {})
46
46
  to_s
47
47
  end
@@ -45,7 +45,7 @@ module Sass
45
45
  # Note that this won't assert that the identifier takes up the entire input string;
46
46
  # it's meant to be used with `StringScanner`s as part of other parsers.
47
47
  #
48
- # @return [Array<String, Sass::Script::Node>, nil]
48
+ # @return [Array<String, Sass::Script::Tree::Node>, nil]
49
49
  # The interpolated identifier, or nil if none could be parsed
50
50
  def parse_interp_ident
51
51
  init_scanner!
@@ -903,14 +903,24 @@ module Sass
903
903
  value_start_pos = source_position
904
904
  @use_property_exception ||= space || !tok?(IDENT)
905
905
 
906
- return value_start_pos, true, Sass::Script::String.new("") if tok?(/\{/)
906
+ if tok?(/\{/)
907
+ str = Sass::Script::Tree::Literal.new(Sass::Script::Value::String.new(""))
908
+ str.line = source_position.line
909
+ str.source_range = range(source_position)
910
+ return value_start_pos, true, str
911
+ end
912
+
913
+ start_pos = source_position
907
914
  # This is a bit of a dirty trick:
908
915
  # if the value is completely static,
909
916
  # we don't parse it at all, and instead return a plain old string
910
917
  # containing the value.
911
918
  # This results in a dramatic speed increase.
912
919
  if val = tok(STATIC_VALUE, true)
913
- return value_start_pos, space, Sass::Script::String.new(val.strip)
920
+ str = Sass::Script::Tree::Literal.new(Sass::Script::Value::String.new(val.strip))
921
+ str.line = start_pos.line
922
+ str.source_range = range(start_pos)
923
+ return value_start_pos, space, str
914
924
  end
915
925
  return value_start_pos, space, sass_script(:parse)
916
926
  end
@@ -968,7 +978,7 @@ MESSAGE
968
978
  def var_expr
969
979
  return unless tok(/\$/)
970
980
  line = @line
971
- var = Sass::Script::Variable.new(tok!(IDENT))
981
+ var = Sass::Script::Tree::Variable.new(tok!(IDENT))
972
982
  var.line = line
973
983
  var
974
984
  end
@@ -47,10 +47,10 @@ module Sass
47
47
  class Class < Simple
48
48
  # The class name.
49
49
  #
50
- # @return [Array<String, Sass::Script::Node>]
50
+ # @return [Array<String, Sass::Script::Tree::Node>]
51
51
  attr_reader :name
52
52
 
53
- # @param name [Array<String, Sass::Script::Node>] The class name
53
+ # @param name [Array<String, Sass::Script::Tree::Node>] The class name
54
54
  def initialize(name)
55
55
  @name = name
56
56
  end
@@ -70,10 +70,10 @@ module Sass
70
70
  class Id < Simple
71
71
  # The id name.
72
72
  #
73
- # @return [Array<String, Sass::Script::Node>]
73
+ # @return [Array<String, Sass::Script::Tree::Node>]
74
74
  attr_reader :name
75
75
 
76
- # @param name [Array<String, Sass::Script::Node>] The id name
76
+ # @param name [Array<String, Sass::Script::Tree::Node>] The id name
77
77
  def initialize(name)
78
78
  @name = name
79
79
  end
@@ -105,10 +105,10 @@ module Sass
105
105
  class Placeholder < Simple
106
106
  # The placeholder name.
107
107
  #
108
- # @return [Array<String, Sass::Script::Node>]
108
+ # @return [Array<String, Sass::Script::Tree::Node>]
109
109
  attr_reader :name
110
110
 
111
- # @param name [Array<String, Sass::Script::Node>] The placeholder name
111
+ # @param name [Array<String, Sass::Script::Tree::Node>] The placeholder name
112
112
  def initialize(name)
113
113
  @name = name
114
114
  end
@@ -131,10 +131,10 @@ module Sass
131
131
  # `[""]` means no namespace,
132
132
  # `["*"]` means any namespace.
133
133
  #
134
- # @return [Array<String, Sass::Script::Node>, nil]
134
+ # @return [Array<String, Sass::Script::Tree::Node>, nil]
135
135
  attr_reader :namespace
136
136
 
137
- # @param namespace [Array<String, Sass::Script::Node>, nil] See \{#namespace}
137
+ # @param namespace [Array<String, Sass::Script::Tree::Node>, nil] See \{#namespace}
138
138
  def initialize(namespace)
139
139
  @namespace = namespace
140
140
  end
@@ -195,7 +195,7 @@ module Sass
195
195
  class Element < Simple
196
196
  # The element name.
197
197
  #
198
- # @return [Array<String, Sass::Script::Node>]
198
+ # @return [Array<String, Sass::Script::Tree::Node>]
199
199
  attr_reader :name
200
200
 
201
201
  # The selector namespace.
@@ -203,11 +203,11 @@ module Sass
203
203
  # `[""]` means no namespace,
204
204
  # `["*"]` means any namespace.
205
205
  #
206
- # @return [Array<String, Sass::Script::Node>, nil]
206
+ # @return [Array<String, Sass::Script::Tree::Node>, nil]
207
207
  attr_reader :namespace
208
208
 
209
- # @param name [Array<String, Sass::Script::Node>] The element name
210
- # @param namespace [Array<String, Sass::Script::Node>, nil] See \{#namespace}
209
+ # @param name [Array<String, Sass::Script::Tree::Node>] The element name
210
+ # @param namespace [Array<String, Sass::Script::Tree::Node>, nil] See \{#namespace}
211
211
  def initialize(name, namespace)
212
212
  @name = name
213
213
  @namespace = namespace
@@ -262,10 +262,10 @@ module Sass
262
262
  class Interpolation < Simple
263
263
  # The script to run.
264
264
  #
265
- # @return [Sass::Script::Node]
265
+ # @return [Sass::Script::Tree::Node]
266
266
  attr_reader :script
267
267
 
268
- # @param script [Sass::Script::Node] The script to run
268
+ # @param script [Sass::Script::Tree::Node] The script to run
269
269
  def initialize(script)
270
270
  @script = script
271
271
  end
@@ -288,7 +288,7 @@ module Sass
288
288
  class Attribute < Simple
289
289
  # The attribute name.
290
290
  #
291
- # @return [Array<String, Sass::Script::Node>]
291
+ # @return [Array<String, Sass::Script::Tree::Node>]
292
292
  attr_reader :name
293
293
 
294
294
  # The attribute namespace.
@@ -296,7 +296,7 @@ module Sass
296
296
  # `[""]` means no namespace,
297
297
  # `["*"]` means any namespace.
298
298
  #
299
- # @return [Array<String, Sass::Script::Node>, nil]
299
+ # @return [Array<String, Sass::Script::Tree::Node>, nil]
300
300
  attr_reader :namespace
301
301
 
302
302
  # The matching operator, e.g. `"="` or `"^="`.
@@ -306,19 +306,19 @@ module Sass
306
306
 
307
307
  # The right-hand side of the operator.
308
308
  #
309
- # @return [Array<String, Sass::Script::Node>]
309
+ # @return [Array<String, Sass::Script::Tree::Node>]
310
310
  attr_reader :value
311
311
 
312
312
  # Flags for the attribute selector (e.g. `i`).
313
313
  #
314
- # @return [Array<String, Sass::Script::Node>]
314
+ # @return [Array<String, Sass::Script::Tree::Node>]
315
315
  attr_reader :flags
316
316
 
317
- # @param name [Array<String, Sass::Script::Node>] The attribute name
318
- # @param namespace [Array<String, Sass::Script::Node>, nil] See \{#namespace}
317
+ # @param name [Array<String, Sass::Script::Tree::Node>] The attribute name
318
+ # @param namespace [Array<String, Sass::Script::Tree::Node>, nil] See \{#namespace}
319
319
  # @param operator [String] The matching operator, e.g. `"="` or `"^="`
320
- # @param value [Array<String, Sass::Script::Node>] See \{#value}
321
- # @param value [Array<String, Sass::Script::Node>] See \{#flags}
320
+ # @param value [Array<String, Sass::Script::Tree::Node>] See \{#value}
321
+ # @param value [Array<String, Sass::Script::Tree::Node>] See \{#flags}
322
322
  def initialize(name, namespace, operator, value, flags)
323
323
  @name = name
324
324
  @namespace = namespace
@@ -362,7 +362,7 @@ module Sass
362
362
 
363
363
  # The name of the selector.
364
364
  #
365
- # @return [Array<String, Sass::Script::Node>]
365
+ # @return [Array<String, Sass::Script::Tree::Node>]
366
366
  attr_reader :name
367
367
 
368
368
  # The argument to the selector,
@@ -372,12 +372,12 @@ module Sass
372
372
  # Note that this should not include SassScript nodes
373
373
  # after resolution has taken place.
374
374
  #
375
- # @return [Array<String, Sass::Script::Node>, nil]
375
+ # @return [Array<String, Sass::Script::Tree::Node>, nil]
376
376
  attr_reader :arg
377
377
 
378
378
  # @param type [Symbol] See \{#type}
379
- # @param name [Array<String, Sass::Script::Node>] The name of the selector
380
- # @param arg [nil, Array<String, Sass::Script::Node>] The argument to the selector,
379
+ # @param name [Array<String, Sass::Script::Tree::Node>] The name of the selector
380
+ # @param arg [nil, Array<String, Sass::Script::Tree::Node>] The argument to the selector,
381
381
  # or nil if no argument was given
382
382
  def initialize(type, name, arg)
383
383
  @type = type