浏览代码

[std] mention more modern `as` instead of `in` in docs

[skip ci]
Jens Fischer 6 年之前
父节点
当前提交
1b5d27a80f
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      std/haxe/macro/Compiler.hx
  2. 2 2
      std/haxe/macro/Context.hx

+ 1 - 1
std/haxe/macro/Compiler.hx

@@ -491,7 +491,7 @@ enum abstract NullSafetyMode(String) to String {
 		Loose safety.
 		If an expression is checked ` != null`, then it's considered safe even if it could be modified after the check.
 		E.g.
-		```
+		```haxe
 		function example(o:{field:Null<String>}) {
 			if(o.field != null) {
 				mutate(o);

+ 2 - 2
std/haxe/macro/Context.hx

@@ -454,7 +454,7 @@ class Context {
 		Compilation server : when using the compilation server, the resource is bound
 		to the Haxe module which calls the macro, so it will be included again if
 		that module is reused. If this resource concerns several modules, prefix its
-		name with a $ sign, this will bind it to the macro module instead.
+		name with a `$` sign, this will bind it to the macro module instead.
 	**/
 	public static function addResource( name : String, data : haxe.io.Bytes ) {
 		load("add_resource",2)(name,data);
@@ -486,7 +486,7 @@ class Context {
 
 		The individual `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.
+		not allowed to have `.*` wildcards or `as s` shorthands.
 	**/
 	public static function defineModule( modulePath : String, types : Array<TypeDefinition>, ?imports: Array<ImportExpr>, ?usings : Array<TypePath> ) : Void {
 		if( imports == null ) imports = [];