Skip to content

Instantly share code, notes, and snippets.

Jason O'Neil jasononeil

Block or report user

Report or block jasononeil

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jasononeil
jasononeil / JS Callback to Future
Last active Nov 10, 2015 — forked from kevinresol/ JS Callback to Future
Convert js-style callback to Future, with macro
View JS Callback to Future
Convert js-style callback to Future, with macro
View Builder.hx
import haxe.macro.Context;
import haxe.macro.Expr;
class Builder {
// Build macros are called using @:build() or @:autoBuild() metadata
// They must return an array containing all of the fields of the new type
macro static function build():Array<Field> {
// Create expression representing the test() function
var funcExpr = macro function():String {
return "test";
You can’t perform that action at this time.