GDScript: Show error on unary operators without argument
This commit is contained in:
parent
5a612d61b9
commit
d49046938a
11 changed files with 34 additions and 0 deletions
|
|
@ -0,0 +1,2 @@
|
|||
func test():
|
||||
print(~)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_PARSER_ERROR
|
||||
Expected expression after "~" operator.
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
func test():
|
||||
print(not)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_PARSER_ERROR
|
||||
Expected expression after "not" operator.
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
func test():
|
||||
print(!)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_PARSER_ERROR
|
||||
Expected expression after "!" operator.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
func test():
|
||||
var a = 0
|
||||
print(a--)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_PARSER_ERROR
|
||||
Expected expression after "-" operator.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
func test():
|
||||
var a = 0
|
||||
print(a++)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_PARSER_ERROR
|
||||
Expected expression after "+" operator.
|
||||
Loading…
Add table
Add a link
Reference in a new issue