X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=lexer.c;h=8f1bcb8a46eb3eb5bd823c91267f5bae01765950;hb=0d33939b1be1b273daf462a070ea6be4c99820e4;hp=c37678ec0d0c7f1baca44e322aeb6563acbb4891;hpb=122e80cc4d3db31174ed91bfca217ed7b9a4f0c3;p=xonotic%2Fgmqcc.git diff --git a/lexer.c b/lexer.c index c37678e..8f1bcb8 100644 --- a/lexer.c +++ b/lexer.c @@ -834,7 +834,7 @@ static int GMQCC_WARN lex_finish_digit(lex_file *lex, int lastch) int lex_do(lex_file *lex) { - int ch, nextch; + int ch, nextch, thirdch; lex_token_new(lex); #if 0 @@ -1114,6 +1114,16 @@ int lex_do(lex_file *lex) lex_tokench(lex, nextch); } else if (ch == '-' && nextch == '>') { lex_tokench(lex, nextch); + } else if (ch == '&' && nextch == '~') { + thirdch = lex_getch(lex); + if (thirdch != '=') { + lex_ungetch(lex, thirdch); + lex_ungetch(lex, nextch); + } + else { + lex_tokench(lex, nextch); + lex_tokench(lex, thirdch); + } } else lex_ungetch(lex, nextch);