casty 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 54f46dcb749092e2664a207c638c5b505b4b84db
4
+ data.tar.gz: decbbeea4e3ca38c2b48be0ceef22d25f83b3996
5
+ SHA512:
6
+ metadata.gz: 6f43335fe41a83b2c59a6c985ac1c6393821a331030d676937e976fb6b0dd5fcb6302999f721fae693454d9f3a643dfe96317295d20ec5c631e9ec6e658deb4f
7
+ data.tar.gz: e83641c9a73cf307bb4ada99a6aa55353fcc29235bd0955dcf65a493b4386cbf1efdd2f2078dba6563f16affee0cee52c2d8e51bd2eee4d25204e8e9233414e8
@@ -2,6 +2,8 @@
2
2
 
3
3
  Casty is a fork of CAST, a C parser and abstract syntax tree for Ruby.
4
4
 
5
+ It does not choke on #-sequences (source map etc.) left in by preprocessor. `#line`-support may be coming, also `C::Preprocessor` has more options.
6
+
5
7
  ## Example
6
8
 
7
9
  require 'casty'
data/Rakefile CHANGED
@@ -34,6 +34,7 @@ end
34
34
 
35
35
  generated_files = 'ext/casty/yylex.c', 'lib/casty/c.tab.rb'
36
36
 
37
+ desc "generate_files"
37
38
  task :generate_files => generated_files
38
39
 
39
40
  file 'ext/casty/extconf.rb' => :generate_files
@@ -1,6 +1,6 @@
1
1
  #include "cast.h"
2
2
 
3
- void Init_casty_ext(void) {
3
+ void Init_casty(void) {
4
4
  cast_mC = rb_define_module("C");
5
5
  cast_init_parser();
6
6
  }
@@ -4,4 +4,4 @@ if ENV['DEBUG']
4
4
  CONFIG['debugflags'] << ' -ggdb3 -O0'
5
5
  end
6
6
 
7
- create_makefile 'casty_ext'
7
+ create_makefile 'casty'
@@ -1,4 +1,5 @@
1
- require File.expand_path('../casty_ext', __FILE__)
1
+ require 'rbconfig'
2
+ require File.expand_path("../casty.#{RbConfig::CONFIG['DLEXT']}", __FILE__)
2
3
 
3
4
  %w{ tempfile preprocessor node node_list c_nodes c.tab parse to_s inspect version}.each{|f|
4
5
  require "casty/#{f}"
@@ -256,7 +256,7 @@ module C
256
256
  node.parent.equal? self or
257
257
  raise ArgumentError, "node is not a child"
258
258
  index = node.instance_variable_get(:@parent_index)
259
- index.instance_variable_set(:@parent_index, nil)
259
+ node.instance_variable_set(:@parent_index, nil)
260
260
  removed_(@array[index])
261
261
  @array.delete_at(index)
262
262
  adjust_indices_(index)
@@ -1,5 +1,5 @@
1
1
  module C
2
- VERSION = [0, 3, 1]
2
+ VERSION = [0, 3, 2]
3
3
 
4
4
  class << VERSION
5
5
  include Comparable
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: casty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
5
- prerelease:
4
+ version: 0.3.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - George Ogata
@@ -10,28 +9,25 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2012-12-19 00:00:00.000000000 Z
12
+ date: 2013-04-10 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: rake-compiler
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ! '>='
18
+ - - '>='
21
19
  - !ruby/object:Gem::Version
22
20
  version: '0'
23
21
  type: :development
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ! '>='
25
+ - - '>='
29
26
  - !ruby/object:Gem::Version
30
27
  version: '0'
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: racc
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
32
  - - ~>
37
33
  - !ruby/object:Gem::Version
@@ -39,7 +35,6 @@ dependencies:
39
35
  type: :development
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
39
  - - ~>
45
40
  - !ruby/object:Gem::Version
@@ -91,27 +86,26 @@ files:
91
86
  homepage: http://github.com/Vasfed/cast
92
87
  licenses:
93
88
  - MIT
89
+ metadata: {}
94
90
  post_install_message:
95
91
  rdoc_options: []
96
92
  require_paths:
97
93
  - lib
98
94
  required_ruby_version: !ruby/object:Gem::Requirement
99
- none: false
100
95
  requirements:
101
- - - ! '>='
96
+ - - '>='
102
97
  - !ruby/object:Gem::Version
103
98
  version: '0'
104
99
  required_rubygems_version: !ruby/object:Gem::Requirement
105
- none: false
106
100
  requirements:
107
- - - ! '>='
101
+ - - '>='
108
102
  - !ruby/object:Gem::Version
109
103
  version: '0'
110
104
  requirements: []
111
105
  rubyforge_project:
112
- rubygems_version: 1.8.24
106
+ rubygems_version: 2.0.3
113
107
  signing_key:
114
- specification_version: 3
108
+ specification_version: 4
115
109
  summary: C parser and AST constructor.
116
110
  test_files:
117
111
  - test/all.rb
@@ -124,4 +118,3 @@ test_files:
124
118
  - test/preprocessor_test.rb
125
119
  - test/render_test.rb
126
120
  - test/test_helper.rb
127
- has_rdoc: