This file contains hidden or 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
| enum Process<O> { | |
| Emit(head:O,tail:Process<O>); | |
| Held(ft:Future<Process<O>>); | |
| Halt(e:Null<Error>); | |
| } | |
| typedef InOut<In, Out> = Process<Either<Callback<In>, Out>>; |
This file contains hidden or 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 hidden or 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 hidden or 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.Context.*; | |
| using haxe.macro.Tools; | |
| #end | |
| class ClassList { | |
| static var NAME = 'ClassList';//must be the fully qualified name of this class | |
| macro static function build() { |
This file contains hidden or 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 hidden or 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 hidden or 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
| #if macro | |
| import haxe.macro.Expr; | |
| import haxe.macro.Type; | |
| import haxe.macro.Context.*; | |
| #else | |
| @:genericBuild(AnonEnum.build()) | |
| #end | |
| class AnonEnum<Const> { | |
| macro static function build():Type { |
This file contains hidden or 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) | |
This file contains hidden or 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 Forever { | |
| static function main() { | |
| var args = Sys.args(); | |
| while (true) { | |
| Sys.command(args[0], args.slice(1)); | |
| Sys.sleep(.25); | |
| } | |
| } |
This file contains hidden or 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
| import js.html.Element; | |
| interface TreeWalker<T, Cls> { | |
| function attr(target:T, name:String):String; | |
| function hasClass(target:T, cls:Cls):Bool; | |
| function parent(target:T):Null<T>; | |
| function prev(target:T):Null<T>; | |
| function next(target:T):Null<T>; | |
| function firstChild(target:T):Null<T>; | |
| } |