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 Manual { | |
| static var pool = []; | |
| static var check = new Map<Manual, Manual>(); | |
| var count:Int = 0; | |
| function new() {} | |
| function init() {/*set up*/} | |
| function free() {/*clean up*/} |
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 ; | |
| abstract MyAbstract(Int) { | |
| public function new(v:Int) this = v; | |
| @:from static function fromString(s:String) return new MyAbstract(Std.parseInt(s)); | |
| } | |
| class Main { | |
| #if !macro | |
| static function main() { | |
| var d:Dynamic = 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
| package ; | |
| import haxe.rtti.Meta; | |
| typedef BuildInfo = { | |
| date: Date, | |
| } | |
| class Build { | |
| static public var info(get, null):BuildInfo; | |
| static function get_info() { |
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 ; | |
| abstract Animals(ExampleData) from ExampleData { | |
| public var dog(get, never):Animal; | |
| inline function get_dog():Animal return this.dog; | |
| public var cat(get, never):Animal; | |
| inline function get_cat():Animal return this.cat; | |
| public var cow(get, never):Animal; |
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 Main { | |
| static function main() test(Foo); | |
| static function test(e:MyEnum) {} | |
| static function test2():MyEnum | |
| return Foo; | |
| } |
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 ; | |
| import Map; | |
| import cpp.vm.Mutex; | |
| abstract ThreadSafeMap<K, V>({ data: IMap<K, V>, lock: Mutex }) { | |
| public function new(data:IMap<K, V>) | |
| this = { data: data, lock: new Mutex() } | |
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
| function wrapRouter(addRoute, basicFunctionality) { | |
| return { | |
| register: function (rule, handler) { | |
| require("util").inherits(handler, basicFunctionality); | |
| var factory = function (req, res) { | |
| this.request = req; | |
| this.response = res; | |
| }; | |
| factory.prototype = handler; | |
| addRoute(rule, function (req, res) { |
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 ; | |
| import haxe.macro.Type; | |
| import haxe.macro.Expr; | |
| import haxe.macro.Context; | |
| class Module { | |
| static function build(?module:String) { | |
| function isIncluded(meta:MetaAccess) |
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 ; | |
| using Main; | |
| typedef Future<T> = (T->Void)->Void; | |
| typedef Chain<T> = Future<Option<{ data: T, next: Chain<T>}>>; | |
| class Main { | |
| static function lazy<A>(g:Void->A) { | |
| var done = false, |
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.Context; | |
| import haxe.macro.Expr; | |
| #end | |
| abstract Signal<T>(Array<T>) | |
| { | |
| public inline function new() | |
| { | |
| this = []; |