Skip to content

bytetalking/ClsCreator

Repository files navigation

ClsCreator

An ActionScript3 code generate lib,you can use as3 generate as3

hello world

var cls:Cls = new Cls("HelloWorld", new Pack(""));
cls.setSuperClass(new SuperCls(Sprite));

var v:Var = new Var("tea", String);
cls.addPropertys(v);

var m:Method = new Method("hi", Method.VOID, Property.PUBLIC);
m.addStatement(new Statement("trace(\"hello, world\")"));
cls.addPropertys(m);

trace(cls.toString());

output

package 
{
	import flash.display.Sprite;
	public class HelloWorld extends Sprite
	{
		public var tea:String;
		public function hi():void
		{
			trace("hello, world")
		}
	}
}

cases

image

About

An ActionScript code generate lib

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published