cast icon indicating copy to clipboard operation
cast copied to clipboard

C parser and code generator for ruby

Results 13 cast issues
Sort by recently updated
recently updated
newest added

It might be ambitious, but I'm trying to parse `/usr/include/math.h` (on OS X) Here's what I have so far: ``` ruby f = '/usr/include/math.h' prep = C::Preprocessor.new # XXX: bug...

Some projects which are specifically written to be compiled by GCC use GCC-specific extensions to the C language, such as the `__extension__` keyword. This is an interesting extension; it has...

The following declaration ```c int f(int n, float a[restrict n]); ``` does not yield the correct AST, both the `restrict` qualifier and the length `n` are lost. This snippet parses...

Currently, as far as I can tell, there is no CI. Hence, after each non-trivial commit, it is impossible to be reasonably sure that nothing was broken for some Ruby...

The comment in `lib/cast/node.rb` states that #assert_invariants >Called by the test suite to ensure all invariants are true. but that does not seem to be the case. `git grep -n...

``` ruby require 'cast' s = ... proposed patch: ``` diff --- to_s.rb.orig 2037-08-09 14:29:46.000000000 +0200 +++ to_s.rb 2014-08-07 11:49:11.705897200 +0200 @@ -45,7 +45,7 @@ end class Declarator def to_s...

It is not actually true that 'a \* b; ' is illegal if both are types. It is actually legal to define, e.g., a structure member as the same name...

`C.parse` seems to keep state somewhere, which breaks the ability to parse more than once; ``` ruby 1.9.3p286 :001 > require 'cast' => true 1.9.3p286 :002 > C.parse("typedef int fun;")...

A simple feature request; It would be very handy to have the `C::Node::Pos`, or perhaps even the `C::Node` on ParseError exception object when it is thrown.