Merge pull request #55574 from Chaosus/shader_fix_xor_3.x

[3.x] Fix ^= operator in shaders
This commit is contained in:
Rémi Verschelde 2021-12-03 08:57:43 +01:00 committed by GitHub
commit 868a6c2ba2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -445,6 +445,10 @@ ShaderLanguage::Token ShaderLanguage::_get_token() {
case ':':
return _make_token(TK_COLON);
case '^':
if (GETCHAR(0) == '=') {
char_idx++;
return _make_token(TK_OP_ASSIGN_BIT_XOR);
}
return _make_token(TK_OP_BIT_XOR);
case '~':
return _make_token(TK_OP_BIT_INVERT);