Explorar el Código

Reorder reserved words by categories

They were previously kind of sorted with a mix between alphabetical and logical ordering, which made it hard to spot duplicates or missing words.
Rémi Verschelde hace 9 años
padre
commit
8151110002
Se han modificado 1 ficheros con 33 adiciones y 28 borrados
  1. 33 28
      modules/gdscript/gd_script.cpp

+ 33 - 28
modules/gdscript/gd_script.cpp

@@ -2677,40 +2677,45 @@ void GDScriptLanguage::frame() {
 void GDScriptLanguage::get_reserved_words(List<String> *p_words) const  {
 
 	static const char *_reserved_words[]={
-		"break",
-		"class",
-		"continue",
-		"const",
-		"else",
-		"elif",
-		"enum",
-		"extends"	,
-		"onready",
-		"for"	,
-		"func"	,
-		"if"	,
-		"in"	,
-		"null"	,
-		"not"	,
-		"return"	,
-		"self"	,
-		"while"	,
-		"true"	,
-		"false"	,
-		"tool",
-		"var",
-		"setget",
-		"pass",
+		// operators
 		"and",
+		"in",
+		"not",
 		"or",
-		"export",
+		// types and values
+		"false",
+		"float",
+		"int",
+		"null",
+		"self",
+		"true",
+		// functions
 		"assert",
 		"breakpoint",
+		"class",
+		"extends",
+		"func",
+		"setget",
+		"signal",
+		"tool",
 		"yield",
+		// var
+		"const",
+		"enum",
+		"export",
+		"onready",
 		"static",
-		"float",
-		"int",
-		"signal",
+		"var",
+		// control flow
+		"break",
+		"continue",
+		"if",
+		"elif",
+		"else",
+		"for",
+		"pass",
+		"return",
+		"while",
 	0};