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 haxe.Constraints.Function; | |
| class Test { | |
| static function main() { | |
| trace("Haxe is great!"); | |
| var dispatcher = new EventDispatcher(); | |
| dispatcher.addEventListener(MouseEvent.CLICK, onClick); | |
| dispatcher.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); | |
| } | |
| static function onClick(event:MouseEvent):Void |
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 haxe.Constraints.Function; | |
| class Test { | |
| static function main() { | |
| trace("Haxe is great!"); | |
| var dispatcher = new EventDispatcher(); | |
| dispatcher.addEventListener(new Handler<MouseEvent>(MouseEvent.CLICK, onClick)); | |
| dispatcher.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); | |
| } | |
| static function onClick(event:MouseEvent):Void |
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 MyMacro{ | |
| macro public static function build(name:String):Array<Field> { | |
| var fields = Context.getBuildFields(); | |
| for (f in fields){ | |
| if (f.name == name){ | |
| var type = switch(f.kind){ | |
| case FVar(t):t; | |
| default: throw new Error("Invalid field type", f.pos); | |
| } | |
| var array:Field = { |
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
| ::::::::::::::::::::::::::::::::::::::::: | |
| :: Automatically check & get admin rights | |
| ::::::::::::::::::::::::::::::::::::::::: | |
| @echo off | |
| CLS | |
| ECHO. | |
| ECHO ============================= | |
| ECHO Running Admin shell | |
| ECHO ============================= |
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
| // Generated by Haxe 3.4.0 (git build development @ e2ed327) | |
| #pragma warning disable 109, 114, 219, 429, 168, 162 | |
| namespace haxe.lang { | |
| public class Function { | |
| public Function(int arity, int type) { | |
| this.__fn_type = type; | |
| this.__hx_arity = arity; | |
| } |
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 abstracts; | |
| #if cs | |
| import cs.system.Action_1; | |
| abstract Callback(cs.system.Action_1<String>) from Action_1<String> to Action_1<String> | |
| { | |
| function new(f) | |
| { | |
| this = f; | |
| } | |
| public function invokeIt(data:String):Void |
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 | |
| class InitMacro | |
| { | |
| public static function removeInterface(interfaceName:String):Void | |
| { | |
| Context.onAfterTyping(function (types:Array<haxe.macro.Type.ModuleType>){ | |
| trace('removing $interfaceName'); | |
| for (moduleType in types) | |
| { | |
| switch(moduleType) |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| namespace Sorcery.Collections | |
| { | |
| interface IReadOnlyList<T> | |
| { | |
| int Count { get; } |
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
| { | |
| "name":"DarkMy", | |
| "type": "dark", | |
| "colors": { | |
| "editor.background": "#282828", | |
| "editor.foreground": "#beb8b8", | |
| "editor.selectionBackground": "#30434c", | |
| "editor.lineHighlightBackground": "#2b3c44", | |
| "editorCursor.foreground": "#fdf4c1", | |
| "editorWhitespace.foreground": "#504945", |
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 haxe.macro.Expr; | |
| class FTW | |
| { | |
| public static function build() | |
| { | |
| return haxe.macro.Context.getBuildFields().map(transformField); | |
| } | |
| static function transformField(field:Field) |