| Class | Sass::Tree::ImportNode |
| In: |
lib/sass/tree/import_node.rb
|
| Parent: | Node |
A static node that wraps the {Sass::Tree} for an `@import`ed file. It doesn‘t have a functional purpose other than to add the `@import`ed file to the backtrace if an error occurs.
@param imported_filename [String] The name of the imported file
# File lib/sass/tree/import_node.rb, line 8
8: def initialize(imported_filename)
9: @imported_filename = imported_filename
10: super()
11: end
Parses the imported file and runs the dynamic Sass for it.
@param environment [Sass::Environment] The lexical environment containing
variable and mixin values
# File lib/sass/tree/import_node.rb, line 32
32: def perform!(environment)
33: return unless full_filename = import
34: self.children = Sass::Files.tree_for(full_filename, @options).children
35: self.children = perform_children(environment)
36: rescue Sass::SyntaxError => e
37: e.add_backtrace_entry(@filename)
38: raise e
39: end