Pretty much out of date; see https://github.com/kLabz/haxe.vim
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 fx; | |
class Dither extends flixel.system.FlxAssets.FlxShader | |
{ | |
@:glFragmentSource(' | |
#pragma header | |
const float scale = 2.0; | |
float checker(vec2 coord) |
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
using WithMacro; | |
typedef Player = { | |
final name:String; | |
final level:Int; | |
} | |
class Main { | |
static function main() { | |
var player = {name: "Dan", level: 15}; |
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
import haxe.macro.Context; | |
import haxe.macro.Expr; | |
import haxe.macro.TypeTools; | |
#if !macro | |
@:genericBuild(PartialMacro.build()) | |
#end | |
class Partial<T> {} | |
class PartialMacro { |
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 flash.geom.Rectangle; | |
import flixel.FlxSprite; | |
import flixel.text.FlxText; | |
import flixel.util.FlxColor; | |
import flixel.util.FlxDestroyUtil; | |
class CrookedText extends FlxSprite | |
{ |
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
import haxe.macro.Context; | |
import haxe.macro.Expr; | |
import haxe.macro.ExprTools; | |
class ClassBuild{ | |
//the entire contents of a class is contained in the class's fields | |
//a class-building-macro's job is to return an array of fields | |
static function saveClass():Array<Field>{ |
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
class Main { | |
static function main() { | |
var signal = new Signal<Int,String>(); | |
var conn = signal.connect(function(a, b) { | |
trace('Well done $a $b'); | |
}); | |
signal.dispatch(10, "lol"); | |
} | |
} |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!