Module: Rockstar

Defined in:
lib/rockstar.rb,
lib/rockstar/version.rb,
lib/rockstar/rockstar_parser.rb,
lib/rockstar/rockstar_transformer.rb

Defined Under Namespace

Classes: RockstarParser, RockstarTransformer

Constant Summary collapse

VERSION =
"0.1.1"

Class Method Summary collapse

Class Method Details

.parse(input) ⇒ Object



7
8
9
10
11
# File 'lib/rockstar.rb', line 7

def self.parse(input)
  RockstarParser.new.parse(input)
rescue Parslet::ParseFailed => failure
  puts failure.parse_failure_cause.ascii_tree
end

.transform(tree) ⇒ Object



13
14
15
# File 'lib/rockstar.rb', line 13

def self.transform(tree)
  RockstarTransformer.new.apply(tree)
end

.transpile(input) ⇒ Object



17
18
19
# File 'lib/rockstar.rb', line 17

def self.transpile(input)
  transform(parse(input))
end