Skip to content

Instantly share code, notes, and snippets.

@spoenemann
Created May 24, 2017 08:37
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 spoenemann/106c8441c83be3a4129c165937292a60 to your computer and use it in GitHub Desktop.
Save spoenemann/106c8441c83be3a4129c165937292a60 to your computer and use it in GitHub Desktop.
Traced method for translating a class declaration into a C struct
@Traced protected def generateHeader(ClassDeclaration it) '''
/*
* Declaration of «name» class
*/
struct _«_name»
{
«FOR p : members.filter(Property)»
/* Property «name».«p.name» */
«generateDeclaration(p)»
«ENDFOR»
};
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment