]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - lexer.h
Allow unary minus in ftepp_if_value
[xonotic/gmqcc.git] / lexer.h
diff --git a/lexer.h b/lexer.h
index 45b4ad214c04c7e8e3347eb82bac3ca698d46475..919dbec1d10078a7c2a449701e34251cc42ad5fe 100644 (file)
--- a/lexer.h
+++ b/lexer.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012
+ * Copyright (C) 2012, 2013
  *     Wolfgang Bumiller
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
@@ -25,8 +25,6 @@
 
 typedef struct token_s token;
 
-#include "ast.h"
-
 struct token_s {
     int ttype;
 
@@ -76,6 +74,8 @@ enum {
     TOKEN_ATTRIBUTE_OPEN,  /* [[ */
     TOKEN_ATTRIBUTE_CLOSE, /* ]] */
 
+    TOKEN_VA_ARGS, /* for the ftepp only */
+
     TOKEN_STRINGCONST, /* not the typename but an actual "string" */
     TOKEN_CHARCONST,
     TOKEN_VECTORCONST,
@@ -109,7 +109,7 @@ typedef struct {
     size_t  line;
     size_t  sline; /* line at the start of a token */
 
-    char    peek[256];
+    int     peek[256];
     size_t  peekpos;
 
     bool    eof;
@@ -219,6 +219,7 @@ static const oper_info c_operators[] = {
     { "&=",  2, opid2('&','='),     ASSOC_RIGHT, 2,  0 },
     { "^=",  2, opid2('^','='),     ASSOC_RIGHT, 2,  0 },
     { "|=",  2, opid2('|','='),     ASSOC_RIGHT, 2,  0 },
+    { "&~=", 2, opid3('&','~','='), ASSOC_RIGHT, 2,  0 },
 
     { ":",   0, opid2(':','?'),     ASSOC_RIGHT, 1,  0 },