Jelajahi Sumber

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

[skip ci]
Jens Fischer 6 tahun lalu
induk
melakukan
1b5d27a80f
2 mengubah file dengan 3 tambahan dan 3 penghapusan
  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.
 		Loose safety.
 		If an expression is checked ` != null`, then it's considered safe even if it could be modified after the check.
 		If an expression is checked ` != null`, then it's considered safe even if it could be modified after the check.
 		E.g.
 		E.g.
-		```
+		```haxe
 		function example(o:{field:Null<String>}) {
 		function example(o:{field:Null<String>}) {
 			if(o.field != null) {
 			if(o.field != null) {
 				mutate(o);
 				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
 		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
 		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
 		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 ) {
 	public static function addResource( name : String, data : haxe.io.Bytes ) {
 		load("add_resource",2)(name,data);
 		load("add_resource",2)(name,data);
@@ -486,7 +486,7 @@ class Context {
 
 
 		The individual `types` can reference each other and any identifier
 		The individual `types` can reference each other and any identifier
 		respects the `imports` and `usings` as usual, expect that imports are
 		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 {
 	public static function defineModule( modulePath : String, types : Array<TypeDefinition>, ?imports: Array<ImportExpr>, ?usings : Array<TypePath> ) : Void {
 		if( imports == null ) imports = [];
 		if( imports == null ) imports = [];