quick-enums

Shorthand for string enums
https://github.com/kevinresol/quick-enums

To install, run:

haxelib install quick-enums 0.1.1 

See using Haxelib in Haxelib documentation for more information.

README.md

Quick Enums for Haxe

Shorthand to represent string-enums. Useful for externs.

Usage

var sizes:enums.Enums<'small', 'medium', 'large'>;

Will generate this:

var sizes:Enum1;

@:enum abstract Enum1(String) {
	var Small = 'small';
	var Medium = 'medium';
	var Large = 'large';
}

Note

When generating the identifiers:

  • Dashes - and spaces will be replaced by an underscore _
  • If the string starts with a number, the identifier will be prefixed with an underscore _
Contributors
kevinresol
Version
0.1.1
Published
9 years ago
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub