Class: ParsletCSS

Inherits:
Object
  • Object
show all
Defined in:
lib/parslet-css.rb

Defined Under Namespace

Classes: Parser

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.compile(str) ⇒ Object



9
10
11
12
13
14
# File 'lib/parslet-css.rb', line 9

def self.compile(str)
  parser = ParsletCSS::Parser.new
  parser.parse(str)
rescue Parslet::ParseFailed => error
  puts parser.root.error_tree
end