### 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
*/
					int open_bracket_pos = begin_scan, close_bracket_pos = 0;
					while (open_bracket_pos < stripped_line.length() && (stripped_line[open_bracket_pos] == ' ' || stripped_line[open_bracket_pos] == '\t')) {
						open_bracket_pos++;
					}
					if (open_bracket_pos == stripped_line.length() || stripped_line[open_bracket_pos++] != '(') {
						continue; 
					}
					close_bracket_pos = open_bracket_pos;
					while (close_bracket_pos < stripped_line.length() && stripped_line[close_bracket_pos] != ')') {
						close_bracket_pos++;
					}
					if (close_bracket_pos == stripped_line.length()) {
						continue; 
					}
					int colon_pos = close_bracket_pos + 1;
					while (colon_pos < stripped_line.length() && (stripped_line[colon_pos] == ' ' || stripped_line[colon_pos] == '\t')) {
						colon_pos++;
					}
					if (colon_pos == stripped_line.length() || stripped_line[colon_pos++] != ':') {
						continue; 
					}
					title = stripped_line.substr(open_bracket_pos, close_bracket_pos - open_bracket_pos).strip_edges();
					link = stripped_line.substr(colon_pos).strip_edges();
				}
				mode = TUTORIALS;
			} else if (mode == TUTORIALS) { 
				mode = DONE;
			}
		}