cast 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/CHANGELOG +8 -0
 - data/Rakefile +2 -0
 - data/ext/cast.h +1 -0
 - data/ext/parser.c +2 -0
 - data/ext/yylex.c +4032 -3893
 - data/ext/yylex.re +3 -0
 - data/lib/cast/c.tab.rb +2043 -1401
 - data/lib/cast/c.y +12 -4
 - data/lib/cast/node.rb +0 -14
 - data/lib/cast/node_list.rb +0 -33
 - data/lib/cast/preprocessor.rb +4 -2
 - data/lib/cast/version.rb +1 -1
 - data/lib/cast.rb +1 -0
 - data/test/parser_test.rb +60 -0
 - data/test/preprocessor_test.rb +2 -2
 - data/test/test_helper.rb +0 -6
 - metadata +7 -7
 
    
        data/ext/yylex.re
    CHANGED
    
    | 
         @@ -132,10 +132,13 @@ void yylex(VALUE self, cast_Parser *p) { 
     | 
|
| 
       132 
132 
     | 
    
         
             
                "while"      { RET(cast_sym_WHILE); }
         
     | 
| 
       133 
133 
     | 
    
         
             
                "inline"     { RET(cast_sym_INLINE); }
         
     | 
| 
       134 
134 
     | 
    
         
             
                "restrict"   { RET(cast_sym_RESTRICT); }
         
     | 
| 
      
 135 
     | 
    
         
            +
             
     | 
| 
       135 
136 
     | 
    
         
             
                "_Bool"      { RET(cast_sym_BOOL); }
         
     | 
| 
       136 
137 
     | 
    
         
             
                "_Complex"   { RET(cast_sym_COMPLEX); }
         
     | 
| 
       137 
138 
     | 
    
         
             
                "_Imaginary" { RET(cast_sym_IMAGINARY); }
         
     | 
| 
       138 
139 
     | 
    
         | 
| 
      
 140 
     | 
    
         
            +
                "__extension__" { RET(cast_sym_EXTENSION); } /* GCC extension */
         
     | 
| 
      
 141 
     | 
    
         
            +
             
     | 
| 
       139 
142 
     | 
    
         
             
                L (L|D)* {
         
     | 
| 
       140 
143 
     | 
    
         
             
                    value = rb_str_new(p->tok, cursor - p->tok);
         
     | 
| 
       141 
144 
     | 
    
         
             
                    if (rb_funcall2(rb_funcall2(self, rb_intern("type_names"), 0, NULL),
         
     |