Browse Source

[java/cs] Added missing -D java_ver description; Started to document metadatas

Caue Waneck 12 years ago
parent
commit
9da37da5b0
2 changed files with 5 additions and 3 deletions
  1. 3 3
      ast.ml
  2. 2 0
      common.ml

+ 3 - 3
ast.ml

@@ -176,7 +176,7 @@ module Meta = struct
 		| Class -> ":class",("",[Platforms [Java;Cs]])
 		| ClassCode -> ":classCode",("",[Platforms [Java;Cs]])
 		| Commutative -> ":commutative",("Declares an abstract operator as commutative",[UsedOn TAbstractField])
-		| CompilerGenerated -> ":compilerGenerated",("",[Platforms [Java;Cs]])
+		| CompilerGenerated -> ":compilerGenerated",("Marks a field as generated by the compiler. Shouldn't be used by the end user",[Platforms [Java;Cs]])
 		| CoreApi -> ":coreApi",("Identifies this class as a core api class (forces Api check)",[UsedOnEither [TClass;TEnum;TTypedef;TAbstract]])
 		| CoreType -> ":coreType",("Identifies an abstract as core type so that it requires no implementation",[UsedOn TAbstract])
 		| CppFileCode -> ":cppFileCode",("",[Platform Cpp])
@@ -204,12 +204,12 @@ module Meta = struct
 		| HeaderClassCode -> ":headerClassCode",("",[Platform Cpp])
 		| HeaderCode -> ":headerCode",("",[Platform Cpp])
 		| HeaderNamespaceCode -> ":headerNamespaceCode",("",[Platform Cpp])
-		| HxGen -> ":hxGen",("",[Platforms [Java;Cs]])
+    | HxGen -> ":hxGen",("Annotates that an extern class was generated by Haxe",[Platforms [Java;Cs]; UsedOnEither [TClass;TEnum]])
 		| IfFeature -> ":ifFeature",("Causes a field to be kept by DCE if the given feature is part of the compilation",[HasParam "Feature name";UsedOn TClassField])
 		| Impl -> ":impl",("Used internally to mark abstract implementation fields",[UsedOn TAbstractField])
 		| Include -> ":include",("",[Platform Cpp])
 		| InitPackage -> ":initPackage",("?",[])
-		| Internal -> ":internal",("",[Platforms [Java;Cs]])
+    | Internal -> ":internal",("Generates the annotated field/class with 'internal' access",[Platforms [Java;Cs]; UsedOnEither[TClass;TEnum;TClassField]])
 		| IsVar -> ":isVar",("Forces a physical field to be generated for properties that otherwise would not require one",[UsedOn TClassField])
 		| JavaNative -> ":javaNative",("",[Platforms [Java;Cs]])
 		| Keep -> ":keep",("Causes a field or type to be kept by DCE",[])

+ 2 - 0
common.ml

@@ -156,6 +156,7 @@ module Define = struct
 		| HaxeBoot
 		| HaxeVer
 		| Interp
+		| JavaVer
 		| JsClassic
 		| JsModern
 		| Macro
@@ -216,6 +217,7 @@ module Define = struct
 		| HaxeBoot -> ("haxe_boot","Given the name 'haxe' to the flash boot class instead of a generated name")
 		| HaxeVer -> ("haxe_ver","The current Haxe version value")
 		| Interp -> ("interp","The code is compiled to be run with --interp")
+		| JavaVer -> ("java_ver", "<version:5-7> Sets the Java version to be targeted:)
 		| JsClassic -> ("js_classic","Don't use a function wrapper and strict mode in JS output")
 		| JsModern -> ("js_modern","Use function wrapper and strict mode in JS output")
 		| Macro -> ("macro","Defined when we compile code in the macro context")