Class: Less2Sass::Sass::Parser
- Inherits:
-
Object
- Object
- Less2Sass::Sass::Parser
- Defined in:
- lib/less2sass/sass/parser.rb
Instance Method Summary collapse
-
#initialize(input) ⇒ Parser
constructor
A new instance of Parser.
- #parse ⇒ Object
Constructor Details
#initialize(input) ⇒ Parser
4 5 6 |
# File 'lib/less2sass/sass/parser.rb', line 4 def initialize(input) @input = input end |
Instance Method Details
#parse ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/less2sass/sass/parser.rb', line 8 def parse sass_file_content = File.read(@input) sass_file_path = File.(@input) tree = ::Sass::Engine.new( sass_file_content, :syntax => :scss, :filename => sass_file_path ).to_tree ::Sass::Tree::Visitors::CheckNesting.visit(tree) ::Sass::Tree::Visitors::Perform.visit(tree) end |