ソースを参照

add some documentation to haxe.macro.Context.defineModule (closes #3262)

Simon Krajewski 10 年 前
コミット
4d8cdba168
1 ファイル変更6 行追加1 行削除
  1. 6 1
      std/haxe/macro/Context.hx

+ 6 - 1
std/haxe/macro/Context.hx

@@ -443,7 +443,12 @@ class Context {
 	}
 
 	/**
-		Defines a new module with several `TypeDefinition` `types`.
+		Defines a new module as `modulePath` with several `TypeDefinition`
+		`types`. This is analogous to defining a .hx file.
+
+		The individial `types` can reference each other and any identifier
+		respects the `imports` and `usings` as usual, expect that imports are
+		not allowed to have `.*` wildcards or `in s` shorthands.
 	**/
 	public static function defineModule( modulePath : String, types : Array<TypeDefinition>, ?imports: Array<ImportExpr>, ?usings : Array<TypePath> ) : Void {
 		if (imports == null) imports = [];