Skip to content

Instantly share code, notes, and snippets.

@andydude
Created March 30, 2013 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andydude/5278826 to your computer and use it in GitHub Desktop.
Save andydude/5278826 to your computer and use it in GitHub Desktop.
use v6;
module C::CAST;
class TranslationUnit {
has ExternalDeclaration @decls;
}
class ExternalDeclaration {
}
class Declaration is ExternalDeclaration {
has DeclarationSpecifier @modifiers;
has InitDeclarator @inits;
}
class FunctionDecl is ExternalDeclaration {
has DeclarationSpecifier @modifiers;
has Declarator $head;
has Declaration @ancients;
has Statement $body;
}
class AssemblyDecl is ExternalDeclaration {
has Str $literal;
}
class InitDeclarator {
has Declarator $decl;
has Initializer $init;
has Expression $expr;
}
class DeclarationSpecifier {}
class StorageSpecifier is DeclarationSpecifier {
}
class TypeSpecifier is DeclarationSpecifier {
}
class TypeQualifier is DeclarationSpecifier {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment