]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - lexer.c
Dependency consistency
[xonotic/gmqcc.git] / lexer.c
diff --git a/lexer.c b/lexer.c
index 862131e1162ecb764acdd3ae7e72d569b65f0e95..7cd7794bfaed056ffa72519a0bf0a39bfe0f843e 100644 (file)
--- a/lexer.c
+++ b/lexer.c
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#include <stdio.h>
-#include <stdlib.h>
+#include <ctype.h>
 #include <string.h>
-#include <stdarg.h>
+#include <stdlib.h>
 
 #include "gmqcc.h"
 #include "lexer.h"
-
 /*
  * List of Keywords
  */
@@ -174,7 +172,7 @@ static void lex_token_new(lex_file *lex)
 #else
     if (lex->tok.value)
         vec_shrinkto(lex->tok.value, 0);
-        
+
     lex->tok.constval.t  = 0;
     lex->tok.ctx.line    = lex->sline;
     lex->tok.ctx.file    = lex->name;
@@ -300,7 +298,7 @@ static int lex_try_trigraph(lex_file *lex, int old)
         lex->line++;
         lex->column = 0;
     }
-    
+
     if (c2 != '?') {
         lex_ungetch(lex, c2);
         return old;
@@ -311,7 +309,7 @@ static int lex_try_trigraph(lex_file *lex, int old)
         lex->line++;
         lex->column = 0;
     }
-    
+
     switch (c3) {
         case '=': return '#';
         case '/': return '\\';
@@ -1311,7 +1309,7 @@ int lex_do(lex_file *lex)
         ch == '>' || ch == '<' || /* <<, >>, <=, >=                  */
         ch == '=' || ch == '!' || /* <=>, ==, !=                     */
         ch == '&' || ch == '|' || /* &&, ||, &=, |=                  */
-        ch == '~'                 /* ~=, ~                           */
+        ch == '~' || ch == '^'    /* ~=, ~, ^                        */
     )  {
         lex_tokench(lex, ch);