From 015d36d18bb3f9fe21452a470aac2c3a3597b92f Mon Sep 17 00:00:00 2001 From: Andreas Haas Date: Fri, 26 May 2017 19:45:39 +0200 Subject: GDScript: Use "is" keyword for type checking. Replaces the `extends` keyword with `is` in the context of testing for type compatibility. `extends` is still used for declaring class inheritance. Example: ```gdscript extends Node2D func _input(ev): if ev is InputEventKey: print("yay, key event") ``` --- modules/gdscript/gd_tokenizer.h | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/gdscript/gd_tokenizer.h') diff --git a/modules/gdscript/gd_tokenizer.h b/modules/gdscript/gd_tokenizer.h index ea7629b661..c051176097 100644 --- a/modules/gdscript/gd_tokenizer.h +++ b/modules/gdscript/gd_tokenizer.h @@ -96,6 +96,7 @@ public: TK_PR_FUNCTION, TK_PR_CLASS, TK_PR_EXTENDS, + TK_PR_IS, TK_PR_ONREADY, TK_PR_TOOL, TK_PR_STATIC, -- cgit v1.2.3