]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - parser.h
Use C++ naming for structures
[xonotic/gmqcc.git] / parser.h
index 43ebe6f0b0e3902c3173e666922a88039abdf0ad..7f07bdf404c5e746bec00091421fe912bbbf617a 100644 (file)
--- a/parser.h
+++ b/parser.h
@@ -4,26 +4,26 @@
 #include "lexer.h"
 #include "ast.h"
 
-typedef struct intrin_s intrin_t;
-typedef struct parser_s parser_t;
-
-typedef struct {
-    struct parser_s *parser;
-    ast_value      **imm_float;              /* vector<ast_value*> */
-    ast_value      **imm_vector;             /* vector<ast_value*> */
-    ast_value      **imm_string;             /* vector<ast_value*> */
-    hash_table_t    *imm_string_untranslate; /* map<string, ast_value*> */
-    hash_table_t    *imm_string_dotranslate; /* map<string, ast_value*> */
-} fold_t;
-
-typedef struct {
+struct parser_t;
+struct intrin_t;
+
+struct fold_t {
+    parser_t *parser;
+    ast_value **imm_float;              /* vector<ast_value*> */
+    ast_value **imm_vector;             /* vector<ast_value*> */
+    ast_value **imm_string;             /* vector<ast_value*> */
+    hash_table_t *imm_string_untranslate; /* map<string, ast_value*> */
+    hash_table_t *imm_string_dotranslate; /* map<string, ast_value*> */
+};
+
+struct intrin_func_t {
     ast_expression *(*intrin)(intrin_t *);
-    const char       *name;
-    const char       *alias;
-    size_t            args;
-} intrin_func_t;
+    const char *name;
+    const char *alias;
+    size_t args;
+};
 
-struct intrin_s {
+struct intrin_t {
     intrin_func_t  *intrinsics;              /* vector<intrin_func_t>   */
     ast_expression **generated;              /* vector<ast_expression*> */
     parser_t       *parser;
@@ -32,7 +32,7 @@ struct intrin_s {
 
 #define parser_ctx(p) ((p)->lex->tok.ctx)
 
-struct parser_s {
+struct parser_t {
     lex_file *lex;
     int      tok;