Skip to content

Commit 700af0f

Browse files
author
Cédric Belin
committed
Code formatting
1 parent 016a45f commit 700af0f

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

src/php_minifier/Macro.hx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
package php_minifier;
22

3-
#if macro
4-
import haxe.macro.Compiler;
5-
import haxe.macro.Context;
63
import sys.io.File;
74
import sys.ssl.Socket;
85

96
/** Provides initialization macros. **/
107
abstract class Macro {
118

9+
#if macro
1210
/** Adds a shebang to the compiled file. **/
13-
public static function shebang(executable: String) Context.onAfterGenerate(() -> {
14-
final path = Compiler.getOutput();
11+
public static function shebang(executable: String) haxe.macro.Context.onAfterGenerate(() -> {
12+
final path = haxe.macro.Compiler.getOutput();
1513
File.saveContent(path, '#!/usr/bin/env $executable\n${File.getContent(path)}');
1614
});
15+
#end
1716

1817
/** Enables or disables the verification of peer certificates during SSL handshake. **/
1918
public static function verifySslCerts(value: Bool): Void
2019
Socket.DEFAULT_VERIFY_CERT = value;
2120
}
22-
#end

src/php_minifier/Platform.hx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
package php_minifier;
22

3-
#if macro
4-
import haxe.Json;
5-
import haxe.macro.Context;
6-
import sys.io.File;
7-
#end
8-
93
/** Information about the environment in which the current program is running. **/
104
abstract class Platform {
115

@@ -26,13 +20,13 @@ abstract class Platform {
2620

2721
/** Gets the name of the Haxe compilation target. **/
2822
macro static function getHaxeTarget()
29-
return macro $v{Context.definedValue("target.name")};
23+
return macro $v{haxe.macro.Context.definedValue("target.name")};
3024

3125
/** Gets the version number of the Haxe compiler. **/
3226
macro static function getHaxeVersion()
33-
return macro $v{Context.definedValue("haxe")};
27+
return macro $v{haxe.macro.Context.definedValue("haxe")};
3428

3529
/** Gets the package version of this program. **/
3630
macro static function getPackageVersion()
37-
return macro $v{Json.parse(File.getContent("haxelib.json")).version};
31+
return macro $v{haxe.Json.parse(sys.io.File.getContent("haxelib.json")).version};
3832
}

0 commit comments

Comments
 (0)