Sfoglia il codice sorgente

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

[skip ci]
Jens Fischer 6 anni fa
parent
commit
1b5d27a80f
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  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 = [];