hxlanguageservices

Haxe Language Services
https://github.com/soywiz/hxlanguageservices

To install, run:

haxelib install hxlanguageservices 0.0.4 

See using Haxelib in Haxelib documentation for more information.

README.md

Haxe Language Services

Build Status

Live sample haxe editor using this project (ALPHA) Thread at haxe google groups

The aim for this project is to provide haxe language services completely written in haxe that are able to work anywhere without a server or even an haxe compiler providing completion, refactoring, references services and providing unified code to debug the haxe compiled code for several languages like flash, cpp or javascript.

These services will allow to create a proper IDE with proper tooling (completion, renaming, organizing imports, debugging, unittesting...) easily.

Services provided at this point:

class HaxeLanguageServices {
    public function new(vfs:Vfs);

    function updateHaxeFile(path:String):Void;
    
    function getFileTypes(path:String):Array<CompType>;
    function getTypeMembers(fqName:String):Array<String>;
    
    function getReferencesAt(path:String, offset:Int):CompReferences;
    
    // Get a list of possible identifiers used in an offset with type information
    function getCompletionAt(path:String, offset:Int):CompletionList;
    
    function getIdAt(path:String, offset:Int):{ pos: CompPosition, name: String };
    
    // Get information about a calling function, with parameters information and current parameter index
    function getCallInfoAt(path:String, offset:Int):CCompletion;
    
    // Get a list of syntax/parser/semantic errors
    function getErrors(path:String):ErrorContext
}

Haxe Sdk + Libraries (get sdk version and libraries information, available versions, haxelib.json information...):

class HaxeSdk {
    // Haxe Version of the defined SDK
    function getVersion():String;
    
    function getLibrary(name:String):HaxeLibrary;
    // ...
}

Projects (hxml and lime.xml projects):

class HaxeProject {
    function setBaseDefines(base:Array<String>);
    function getDefines():Array<String>;
    function getClassPaths():Array<String>;
}

class HxmlHaxeProject extends HaxeProject;
class LimeXmlHaxeProject extends HaxeProject;

Debugger (not implemented yet):

interface DebugInterface {
    function execute(type:ExecType):Void;
    function evaluate(expr:String):Dynamic;
    function backtrace();
    function scripts():Array<String>;
    function gc():Void;
    function listBreakpoints():Array<Breakpoint>;
    var onStop:Signal;
}
Contributors
soywiz
Version
0.0.4
Published
3 years ago
License
MIT

All libraries are free

Every month, more than 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