anchor.diff:      ;
   
   declarations
  -    :   (versiondefine | basicdefine | enumdefine | structdefine)*
  +    :   (versiondefine | basicdefine | enumdefine | structdefine | bitflagsdefine)*
       ;
   
   versiondefine
  
positive.code:     :   { !tagMode }?=> '</option>'
      ;
  
  TAG_START_STRUCT
      :   { !tagMode }?=> ('<' ('compound'|'niobject'|'struct')) { tagMode = true; }
      ;
  
negative.code:         struct_add*
          TAG_END_STRUCT SHORTDOC*
          -> ^(CLASSDEF ^(DOC $doc) $name struct_add*);
  
  // for the time being, bitflags are converted to enums
  // TODO: implement bitstructs in the FFI grammar and use them here
  bitflagsdefine
      :   TAG_START_BITFLAGS
          ( name=attr_type_name
          | type=attr_type_storage
          )* TAG_CLOSE
      	doc=SHORTDOC?
          enum_option+
          TAG_END_BITFLAGS SHORTDOC*
          -> ^(ENUMDEF ^(DOC $doc) $name $type enum_option+);
  
  struct_add
  @init {
  