### Godot version

4.0.rc1

### System information

windows 10

### Issue description

When assigning a lambda to a variable right after an if statement, the parser seems to understand that a ternary expression is happening when in fact it is not.

![image](https://user-images.githubusercontent.com/5783414/218691792-a27619cd-f17c-4d1e-9121-197c22aeec09.png)

### Steps to reproduce

Put the code bellow on a script on an empty project
```gdscript
func test():
	var v
	if true: v = (func(): test())
	if true: v = (func(): test())
	if true: v = (func(): test())

	if true: v = func(): test()
	if true: v = func(): test()
```

### Minimal reproduction project

N/A
push_error(R"(Cannot use "extends" more than once in the same class.)");
		}
		parse_extends();
		end_statement("superclass");
	}
	parse_class_body(multiline);
	complete_extents(n_class);
	if (multiline) {
		consume(GDScriptTokenizer::Token::DEDENT, R"(Missing unindent at the end of the class body.)");
	}
	current_class = previous_class;
	return n_class;
}
void GDScriptParser::parse_class_name() {
	if (consume(GDScriptTokenizer::Token::IDENTIFIER, R"(Expected identifier for the global class name after "class_name".)")) {
		current_class->identifier = parse_identifier();
		current_class->fqcn = String(current_class->identifier->name);
	}
	if (match(GDScriptTokenizer::Token::EXTENDS)) {
		
		parse_extends();
		end_statement("superclass");
	} else {
		end_statement("class_name statement");
	}
}
void GDScriptParser::parse_extends() {
	current_class->extends_used = true;
	int chain_index = 0;
	if (match(GDScriptTokenizer::Token::LITERAL)) {