MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / is_node_name

Method is_node_name

modules/gdscript/gdscript_tokenizer.cpp:221–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221bool GDScriptTokenizer::Token::is_node_name() const {
222 // This is meant to allow keywords with the $ notation, but not as general identifiers.
223 switch (type) {
224 case IDENTIFIER:
225 case AND:
226 case AS:
227 case ASSERT:
228 case AWAIT:
229 case BREAK:
230 case BREAKPOINT:
231 case CLASS_NAME:
232 case CLASS:
233 case TK_CONST:
234 case CONST_PI:
235 case CONST_INF:
236 case CONST_NAN:
237 case CONST_TAU:
238 case CONTINUE:
239 case ELIF:
240 case ELSE:
241 case ENUM:
242 case EXTENDS:
243 case FOR:
244 case FUNC:
245 case IF:
246 case TK_IN:
247 case IS:
248 case MATCH:
249 case NAMESPACE:
250 case NOT:
251 case OR:
252 case PASS:
253 case PRELOAD:
254 case RETURN:
255 case SELF:
256 case SIGNAL:
257 case STATIC:
258 case SUPER:
259 case TRAIT:
260 case UNDERSCORE:
261 case VAR:
262 case TK_VOID:
263 case WHILE:
264 case WHEN:
265 case YIELD:
266 return true;
267 default:
268 return false;
269 }
270}
271
272String GDScriptTokenizer::get_token_name(Token::Type p_token_type) {
273 ERR_FAIL_INDEX_V_MSG(p_token_type, Token::TK_MAX, "<error>", "Using token type out of the enum.");

Callers 2

parse_attributeMethod · 0.80
parse_get_nodeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected