Skip to content

Commit

Permalink
Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Oct 27, 2024
1 parent 3dbd88c commit 38c5df0
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/nwjs/Platform.hx
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
package nwjs;

#if macro
import haxe.Json;
import haxe.macro.Context;
import sys.io.File;
#end

/** Information about the environment in which the current program is running. **/
abstract class Platform {

Expand All @@ -26,13 +20,13 @@ abstract class Platform {

/** Gets the name of the Haxe compilation target. **/
macro static function getHaxeTarget()
return macro $v{Context.definedValue("target.name")};
return macro $v{haxe.macro.Context.definedValue("target.name")};

/** Gets the version number of the Haxe compiler. **/
macro static function getHaxeVersion()
return macro $v{Context.definedValue("haxe")};
return macro $v{haxe.macro.Context.definedValue("haxe")};

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

0 comments on commit 38c5df0

Please sign in to comment.