This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef CompletionPoint = { | |
file:String, | |
offset:Int | |
} | |
interface HaxeCompletion { | |
function field(at:CompletionPoint):Array<haxe.macro.ClassField>; | |
function usage(at:CompletionPoint):Array<haxe.macro.Position>; | |
function toplevel(at:CompletionPoint):Array<TopLevel>; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package strict; | |
import StdTypes.Int in HxInt; | |
abstract Int(HxInt) from HxInt to HxInt { | |
@:op(this + b) inline function add(b:Int):Int return this + (b : HxInt); | |
@:op(this - b) inline function subtract(b:Int):Int return this - (b : HxInt); | |
@:op(this * b) inline function multiply(b:Int):Int return this * (b : HxInt); | |
@:op(this >>> b) inline function urshift(b:Int):Int return this >>> (b : HxInt); | |
@:op(this >> b) inline function rshift(b:Int):Int return this >> (b : HxInt); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ; | |
class Helper { | |
static public function indexOf<A>(i:Iterable<A>, filter:A->Bool):Int { | |
var i = 0; | |
for (x in a) { | |
i++; | |
if (filter(x)) return i; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ; | |
import haxe.macro.*; | |
import haxe.macro.Type; | |
using haxe.macro.Tools; | |
private typedef Accessor = { | |
name: String, | |
read: Bool, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract Flags(Int) { | |
public inline function new(i = 0) { | |
this = i; | |
} | |
public inline function has( index : Int ) : Bool { | |
return this & (1 << index) != 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var run = true; | |
Thread.create(function () { | |
Sys.getChar(true); | |
run = false; | |
}); | |
while (run) { | |
Sys.sleep(.5); | |
println('yay');//assume this would block until the other side reads in fact |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ; | |
#if macro | |
import haxe.macro.Compiler; | |
import haxe.macro.Context; | |
import haxe.macro.Expr; | |
using haxe.macro.Tools; | |
#end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+-----------+----------------------+ | |
| downloads | name | | |
+-----------+----------------------+ | |
| 78260 | openfl | | |
| 57649 | lime | | |
| 50236 | openfl-samples | | |
| 49287 | hxcpp | | |
| 43047 | lime-tools | | |
| 41134 | openfl-native | | |
| 40236 | actuate | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Original source code: | |
class Main { | |
#if !macro | |
static function main() { | |
test(); | |
} | |
#end | |
macro static function test() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef INCLUDED_Main | |
#define INCLUDED_Main | |
#ifndef HXCPP_H | |
#include <hxcpp.h> | |
#endif | |
HX_DECLARE_CLASS0(Main) | |
OlderNewer