sass 3.1.0.alpha.48 → 3.1.0.alpha.49

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.
@@ -4,39 +4,15 @@ module Sass
4
4
  #
5
5
  # @see Sass::Tree
6
6
  class WarnNode < Node
7
+ # The expression to print.
8
+ # @return [Script::Node]
9
+ attr_reader :expr
10
+
7
11
  # @param expr [Script::Node] The expression to print
8
12
  def initialize(expr)
9
13
  @expr = expr
10
14
  super()
11
15
  end
12
-
13
- protected
14
-
15
- # @see Node#to_src
16
- def to_src(tabs, opts, fmt)
17
- "#{' ' * tabs}@warn #{@expr.to_sass(opts)}#{semi fmt}\n"
18
- end
19
-
20
- # Prints the expression to STDERR with a stylesheet trace.
21
- #
22
- # @param environment [Sass::Environment] The lexical environment containing
23
- # variable and mixin values
24
- def _perform(environment)
25
- environment.push_frame(:filename => filename, :line => line)
26
- res = @expr.perform(environment)
27
- res = res.value if res.is_a?(Sass::Script::String)
28
- msg = "WARNING: #{res}\n"
29
- environment.stack.reverse.each_with_index do |entry, i|
30
- msg << " #{i == 0 ? "on" : "from"} line #{entry[:line]}" <<
31
- " of #{entry[:filename] || "an unknown file"}"
32
- msg << ", in `#{entry[:mixin]}'" if entry[:mixin]
33
- msg << "\n"
34
- end
35
- Sass::Util.sass_warn msg
36
- []
37
- ensure
38
- environment.pop_frame
39
- end
40
16
  end
41
17
  end
42
18
  end
@@ -5,32 +5,14 @@ module Sass::Tree
5
5
  #
6
6
  # @see Sass::Tree
7
7
  class WhileNode < Node
8
- # @param expr [Script::Node] The parse tree for the continue expression
8
+ # The parse tree for the continuation expression.
9
+ # @return [Script::Node]
10
+ attr_reader :expr
11
+
12
+ # @param expr [Script::Node] See \{#expr}
9
13
  def initialize(expr)
10
14
  @expr = expr
11
15
  super()
12
16
  end
13
-
14
- protected
15
-
16
- # @see Node#to_src
17
- def to_src(tabs, opts, fmt)
18
- "#{' ' * tabs}@while #{@expr.to_sass(opts)}" + children_to_src(tabs, opts, fmt)
19
- end
20
-
21
- # Runs the child nodes until the continue expression becomes false.
22
- #
23
- # @param environment [Sass::Environment] The lexical environment containing
24
- # variable and mixin values
25
- # @return [Array<Tree::Node>] The resulting static nodes
26
- # @see Sass::Tree
27
- def _perform(environment)
28
- children = []
29
- new_environment = Sass::Environment.new(environment)
30
- while @expr.perform(environment).to_bool
31
- children += perform_children(new_environment)
32
- end
33
- children
34
- end
35
17
  end
36
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.alpha.48
4
+ version: 3.1.0.alpha.49
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum
@@ -58,6 +58,11 @@ files:
58
58
  - lib/sass/script.rb
59
59
  - lib/sass/selector.rb
60
60
  - lib/sass/cache_stores.rb
61
+ - lib/sass/cache_stores/active_support.rb
62
+ - lib/sass/cache_stores/base.rb
63
+ - lib/sass/cache_stores/filesystem.rb
64
+ - lib/sass/cache_stores/memory.rb
65
+ - lib/sass/cache_stores/null.rb
61
66
  - lib/sass/plugin/configuration.rb
62
67
  - lib/sass/plugin/merb.rb
63
68
  - lib/sass/plugin/generic.rb
@@ -65,13 +70,11 @@ files:
65
70
  - lib/sass/plugin/rails.rb
66
71
  - lib/sass/plugin/staleness_checker.rb
67
72
  - lib/sass/plugin/compiler.rb
68
- - lib/sass/cache_stores/active_support.rb
69
- - lib/sass/cache_stores/base.rb
70
- - lib/sass/cache_stores/filesystem.rb
71
- - lib/sass/cache_stores/memory.rb
72
- - lib/sass/cache_stores/null.rb
73
- - lib/sass/repl.rb
74
73
  - lib/sass/importers.rb
74
+ - lib/sass/repl.rb
75
+ - lib/sass/importers/base.rb
76
+ - lib/sass/importers/filesystem.rb
77
+ - lib/sass/importers/rails.rb
75
78
  - lib/sass/root.rb
76
79
  - lib/sass/script/bool.rb
77
80
  - lib/sass/script/color.rb
@@ -99,25 +102,23 @@ files:
99
102
  - lib/sass/scss/script_lexer.rb
100
103
  - lib/sass/scss/script_parser.rb
101
104
  - lib/sass/scss/static_parser.rb
102
- - lib/sass/importers/base.rb
103
- - lib/sass/importers/filesystem.rb
104
- - lib/sass/importers/rails.rb
105
+ - lib/sass/railtie.rb
105
106
  - lib/sass/selector/abstract_sequence.rb
106
107
  - lib/sass/selector/comma_sequence.rb
107
108
  - lib/sass/selector/sequence.rb
108
109
  - lib/sass/selector/simple.rb
109
110
  - lib/sass/selector/simple_sequence.rb
110
- - lib/sass/railtie.rb
111
+ - lib/sass/shared.rb
111
112
  - lib/sass/tree/charset_node.rb
112
113
  - lib/sass/tree/comment_node.rb
113
114
  - lib/sass/tree/debug_node.rb
114
115
  - lib/sass/tree/directive_node.rb
115
116
  - lib/sass/tree/extend_node.rb
116
- - lib/sass/tree/node.rb
117
- - lib/sass/tree/for_node.rb
118
117
  - lib/sass/tree/if_node.rb
118
+ - lib/sass/tree/for_node.rb
119
119
  - lib/sass/tree/import_node.rb
120
120
  - lib/sass/tree/mixin_node.rb
121
+ - lib/sass/tree/node.rb
121
122
  - lib/sass/tree/mixin_def_node.rb
122
123
  - lib/sass/tree/prop_node.rb
123
124
  - lib/sass/tree/root_node.rb
@@ -127,7 +128,11 @@ files:
127
128
  - lib/sass/tree/variable_node.rb
128
129
  - lib/sass/tree/while_node.rb
129
130
  - lib/sass/tree/media_node.rb
130
- - lib/sass/shared.rb
131
+ - lib/sass/tree/visitors/base.rb
132
+ - lib/sass/tree/visitors/convert.rb
133
+ - lib/sass/tree/visitors/cssize.rb
134
+ - lib/sass/tree/visitors/perform.rb
135
+ - lib/sass/tree/visitors/to_css.rb
131
136
  - lib/sass/util.rb
132
137
  - lib/sass/util/subset_map.rb
133
138
  - lib/sass/version.rb