fwi 1.2.4 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bcc0b0bc4fcf2f752fc1b44da4ee762dca07ec41
4
- data.tar.gz: 317ee1310f3f44c71fede6fdaac16d174cc2c887
3
+ metadata.gz: b945df5e3342be78e59da287f26934c4ad3e0bde
4
+ data.tar.gz: b6494c90efd195650d7a7450d492819344c17001
5
5
  SHA512:
6
- metadata.gz: c4c80d1d4bd5708be3dc2679f29d9e5aa5b5089341df273b5c944ca8129ae9b2fd37b593d8cc07a0928a94bf51bb56e758584f22d2519685626823d5c2488088
7
- data.tar.gz: fe62cea14f6f761ca31bb143e7cdcbed6509be6041b31bf4cff546503d2fb69b5455e5b83c2dadead5411dbe14a57346a60fcc53d42d09d2c790ab5ce3eb41ba
6
+ metadata.gz: 6ce3f4bc06e565953bb14474f7a6748bd4279a3441f3a2b0cca1cc87d5587bd1badf5487186e97a9520f43b4a4c9f143a0983ae702312bfe70236cbc239b7ff6
7
+ data.tar.gz: 1d931d07ea03d6f07094214cff3d57c108f078718d42ca3922e5b3d66de6da04f8e404b26bb11fdca6b3c4e8d1555d34bf5ecae8bbb2f960f07fc220b6e10dbb
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "fwi"
6
- spec.version = "1.2.4"
6
+ spec.version = "1.2.5"
7
7
  spec.authors = ["Jaci Brunning"]
8
8
  spec.email = ["jaci.brunning@gmail.com"]
9
9
 
@@ -14,4 +14,6 @@ Gem::Specification.new do |spec|
14
14
  spec.files = Dir.glob("lib/**/*") + ['fwi.gemspec', 'Gemfile', 'LICENSE']
15
15
  spec.executables = ["fwi"]
16
16
  spec.require_paths = ["lib"]
17
+
18
+ spec.add_dependency "json"
17
19
  end
@@ -1,5 +1,6 @@
1
1
  require 'fwi/compilers/cpp/compiler.rb'
2
2
  require 'fwi/compilers/js/compiler.rb'
3
+ require 'fwi/compilers/bitmap/compiler.rb'
3
4
  # require_relative 'js/compiler.rb'
4
5
 
5
6
  require_relative 'parser.rb'
@@ -7,7 +8,8 @@ require 'optparse'
7
8
 
8
9
  COMPILERS = {
9
10
  "cpp" => CPPCompiler.new,
10
- "js" => JSCompiler.new
11
+ "js" => JSCompiler.new,
12
+ "bitmap" => BitmapCompiler.new
11
13
  };
12
14
 
13
15
  options = {
@@ -0,0 +1,19 @@
1
+ require 'fileutils'
2
+ require 'json'
3
+
4
+ class BitmapCompiler
5
+
6
+ def populate_options o
7
+ end
8
+
9
+ def after_parse; end
10
+ def on_selected; end
11
+
12
+ def compile file, lex, bitmap, options
13
+ base = File.basename(file, File.extname(file))
14
+ f = File.join(options[:output], base + ".bitmap")
15
+ FileUtils.mkdir_p File.expand_path("..", f)
16
+ File.write(f, JSON.generate(bitmap))
17
+ end
18
+
19
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fwi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaci Brunning
@@ -9,7 +9,21 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2016-08-06 00:00:00.000000000 Z
12
- dependencies: []
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: json
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  description:
14
28
  email:
15
29
  - jaci.brunning@gmail.com
@@ -23,6 +37,7 @@ files:
23
37
  - bin/fwi
24
38
  - fwi.gemspec
25
39
  - lib/fwi/compiler.rb
40
+ - lib/fwi/compilers/bitmap/compiler.rb
26
41
  - lib/fwi/compilers/cpp/compiler.rb
27
42
  - lib/fwi/compilers/cpp/gen.rb
28
43
  - lib/fwi/compilers/js/compiler.rb