### 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
AnnotationNode *last_annotation = annotation_stack.back()->get();
		if (last_annotation->applies_to(p_target)) {
			annotations.push_front(last_annotation);
			annotation_stack.pop_back();
		} else {
			push_error(vformat(R"(Annotation "%s" cannot be applied to a %s.)", last_annotation->name, p_member_kind));
			clear_unused_annotations();
		}
#ifdef TOOLS_ENABLED
		if (last_annotation->start_line == doc_comment_line) {
			doc_comment_line--;
		}
#endif 
	}
	T *member = (this->*p_parse_function)(p_is_static);
	if (member == nullptr) {
		return;
	}
	for (AnnotationNode *&annotation : annotations) {
		member->annotations.push_back(annotation);
	}
#ifdef TOOLS_ENABLED
	
	class_doc_line = MIN(class_doc_line, doc_comment_line - 1);
	
	if (has_comment(previous.start_line, true)) {
		member->doc_description = get_doc_comment(previous.start_line, true);
	} else if (has_comment(doc_comment_line, true)) {
		if constexpr (std::is_same_v<T, ClassNode>) {
			get_class_doc_comment(doc_comment_line, member->doc_brief_description, member->doc_description, member->doc_tutorials, true);