### 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
}
			item.index = enum_node->values.size();
			enum_node->values.push_back(item);
			if (!named) {
				
				current_class->add_member(item);
			}
		}
	} while (match(GDScriptTokenizer::Token::COMMA));
	pop_multiline();
	consume(GDScriptTokenizer::Token::BRACE_CLOSE, R"(Expected closing "}" for enum.)");
#ifdef TOOLS_ENABLED
	
	for (int i = 0; i < enum_node->values.size(); i++) {
		if (i == enum_node->values.size() - 1) {
			
			if (enum_node->values[i].line != previous.start_line && has_comment(enum_node->values[i].line)) {
				if (named) {
					enum_node->values.write[i].doc_description = get_doc_comment(enum_node->values[i].line, true);
				} else {
					current_class->set_enum_value_doc(enum_node->values[i].identifier->name, get_doc_comment(enum_node->values[i].line, true));
				}
			}
		} else {
			
			if (enum_node->values[i].line != enum_node->values[i + 1].line && has_comment(enum_node->values[i].line)) {
				if (named) {
					enum_node->values.write[i].doc_description = get_doc_comment(enum_node->values[i].line, true);
				} else {
					current_class->set_enum_value_doc(enum_node->values[i].identifier->name, get_doc_comment(enum_node->values[i].line, true));