"Fossies" - the Fresh Open Source Software Archive

Member "ponyc-0.33.0/src/libponyc/ast/id_internal.h" (1 Nov 2019, 744 Bytes) of package /linux/misc/ponyc-0.33.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "id_internal.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef ID_INTERNAL_H
    2 #define ID_INTERNAL_H
    3 
    4 // This file exists purely to make the id checker visible to unit tests
    5 
    6 #include <platform.h>
    7 #include "ast.h"
    8 #include "../pass/pass.h"
    9 
   10 PONY_EXTERN_C_BEGIN
   11 
   12 // ID spec flags
   13 #define START_UPPER               0x01
   14 #define START_LOWER               0x02
   15 #define ALLOW_LEADING_UNDERSCORE  0x04
   16 #define ALLOW_UNDERSCORE          0x08
   17 #define ALLOW_TICK                0x10
   18 #define ALLOW_DONTCARE            0x20
   19 
   20 
   21 /* Check that the name in the given ID node meets the given spec.
   22  * If name is illegal an error will be generated.
   23  * The spec is supplied as a set of the above #defined flags.
   24  */
   25  bool check_id(pass_opt_t* opt, ast_t* id_node, const char* desc, int spec);
   26 
   27 PONY_EXTERN_C_END
   28 
   29 #endif