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
class Container<Action, State> { | |
var state:tink.state.State<State>; | |
var reducer:State->Action->State; | |
public function new(initial, reducer) { | |
this.state = new State(initial); | |
this.reducer = reducer; | |
} | |
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
class User { | |
var id:String; | |
public function new(id) | |
this.id = id; | |
@:get('/profile/') | |
public function profile() | |
return 'profile of $id'; | |
@:get('/whatever/$otherId/etc') |
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.Expr; | |
#if macro | |
using haxe.macro.Context; | |
using haxe.macro.Tools; | |
#end | |
class Entity { |
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
class Build { | |
macro static public function getEnv(s:String) | |
return macro $v{Sys.getEnv(s)}; | |
macro static public function exec(cmd:String, ?args:Array<String>) { | |
var p = new sys.io.Process(cmd, args), | |
pos = haxe.macro.Context.currentPos(); | |
return | |
switch p.exitCode() { | |
case 0: |
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>; | |
} |
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
#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
#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
//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
+-----------+----------------------+ | |
| downloads | name | | |
+-----------+----------------------+ | |
| 78260 | openfl | | |
| 57649 | lime | | |
| 50236 | openfl-samples | | |
| 49287 | hxcpp | | |
| 43047 | lime-tools | | |
| 41134 | openfl-native | | |
| 40236 | actuate | |