Przeglądaj źródła

Add a reserved flag to define.json

Jens Fischer 5 lat temu
rodzic
commit
3520b3054c
2 zmienionych plików z 18 dodań i 7 usunięć
  1. 4 0
      .vscode/schemas/define.schema.json
  2. 14 7
      src-json/define.json

+ 4 - 0
.vscode/schemas/define.schema.json

@@ -57,6 +57,10 @@
 					"type": "string",
 					"format": "uri"
 				}
+			},
+			"reserved": {
+				"type": "boolean",
+				"markdownDescription": "Reserved defines may not be defined from the command line."
 			}
 		},
 		"required": [

+ 14 - 7
src-json/define.json

@@ -231,12 +231,14 @@
 	{
 		"name": "HaxeVer",
 		"define": "haxe_ver",
-		"doc": "The current Haxe version value as decimal number. E.g. 3.407 for 3.4.7."
+		"doc": "The current Haxe version value as decimal number. E.g. 3.407 for 3.4.7.",
+		"reserved": true
 	},
 	{
 		"name": "Haxe",
 		"define": "haxe",
-		"doc": "The current Haxe version value in SemVer format."
+		"doc": "The current Haxe version value in SemVer format.",
+		"reserved": true
 	},
 	{
 		"name": "HlVer",
@@ -372,7 +374,8 @@
 		"name": "Macro",
 		"define": "macro",
 		"doc": "Defined when code is compiled in the macro context.",
-		"links": ["https://haxe.org/manual/macro.html"]
+		"links": ["https://haxe.org/manual/macro.html"],
+		"reserved": true
 	},
 	{
 		"name": "MacroTimes",
@@ -566,7 +569,8 @@
 	{
 		"name": "Static",
 		"define": "static",
-		"doc": "Defined if the current target is static."
+		"doc": "Defined if the current target is static.",
+		"reserved": true
 	},
 	{
 		"name": "StdEncodingUtf8",
@@ -578,7 +582,8 @@
 		"name": "Swc",
 		"define": "swc",
 		"doc": "Output a SWC instead of a SWF.",
-		"platforms": ["flash"]
+		"platforms": ["flash"],
+		"reserved": true
 	},
 	{
 		"name": "SwfCompressLevel",
@@ -641,7 +646,8 @@
 	{
 		"name": "Sys",
 		"define": "sys",
-		"doc": "Defined for all system platforms."
+		"doc": "Defined for all system platforms.",
+		"reserved": true
 	},
 	{
 		"name": "Unsafe",
@@ -658,7 +664,8 @@
 	{
 		"name": "Utf16",
 		"define": "utf16",
-		"doc": "Defined for all platforms that use UTF-16 string encoding with UCS-2 API."
+		"doc": "Defined for all platforms that use UTF-16 string encoding with UCS-2 API.",
+		"reserved": true
 	},
 	{
 		"name": "Vcproj",