MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / can_precede_bin_op

Method can_precede_bin_op

bytecode/gdscript_tokenizer_compat.cpp:186–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186bool GDScriptTokenizerCompat::Token::can_precede_bin_op() const {
187 switch (type) {
188 case Type::G_TK_IDENTIFIER:
189 case Type::G_TK_CONSTANT:
190 case Type::G_TK_SELF:
191 case Type::G_TK_BRACKET_CLOSE:
192 case Type::G_TK_CURLY_BRACKET_CLOSE:
193 case Type::G_TK_PARENTHESIS_CLOSE:
194 case Type::G_TK_CONST_PI:
195 case Type::G_TK_CONST_TAU:
196 case Type::G_TK_CONST_INF:
197 case Type::G_TK_CONST_NAN:
198 return true;
199 default:
200 return false;
201 }
202}
203
204bool GDScriptTokenizerCompat::Token::is_identifier() const {
205 // Note: Most keywords should not be recognized as identifiers.

Callers 1

scanMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected