Class: JSCompiler

Inherits:
Object
  • Object
show all
Defined in:
lib/fwi/compilers/js/compiler.rb

Constant Summary collapse

GEN =
FWI::Generator::JS.new

Instance Method Summary collapse

Instance Method Details

#after_parseObject



10
# File 'lib/fwi/compilers/js/compiler.rb', line 10

def after_parse; end

#compile(file, lex, bitmap, options) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/fwi/compilers/js/compiler.rb', line 13

def compile file, lex, bitmap, options
    base = File.basename(file, File.extname(file))

    files = GEN.gen bitmap
    files.each do |fn, contents|
        f = File.join(options[:output], fn)
        FileUtils.mkdir_p File.expand_path("..", f)
        File.write(f, contents)
    end
end

#on_selectedObject



11
# File 'lib/fwi/compilers/js/compiler.rb', line 11

def on_selected; end

#populate_options(o) ⇒ Object



7
8
# File 'lib/fwi/compilers/js/compiler.rb', line 7

def populate_options o
end