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

Method push_multiline

modules/gdscript/gdscript_parser.cpp:559–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

557}
558
559void GDScriptParser::push_multiline(bool p_state) {
560 multiline_stack.push_back(p_state);
561 tokenizer->set_multiline_mode(p_state);
562 if (p_state) {
563 // Consume potential whitespace tokens already waiting in line.
564 while (current.type == GDScriptTokenizer::Token::NEWLINE || current.type == GDScriptTokenizer::Token::INDENT || current.type == GDScriptTokenizer::Token::DEDENT) {
565 current = tokenizer->scan(); // Don't call advance() here, as we don't want to change the previous token.
566 }
567 }
568}
569
570void GDScriptParser::pop_multiline() {
571 ERR_FAIL_COND_MSG(multiline_stack.is_empty(), "Parser bug: trying to pop from multiline stack without available value.");

Callers

nothing calls this directly

Calls 3

push_backMethod · 0.45
set_multiline_modeMethod · 0.45
scanMethod · 0.45

Tested by

no test coverage detected