github.com/tardisgo/tardisgo@v0.0.0-20161119180838-e0dd9a7e46b5/haxe/setup.go (about)

     1  // Copyright 2014 Elliott Stoneham and The TARDIS Go Authors
     2  // Use of this source code is governed by an MIT-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package haxe
     6  
     7  import "github.com/tardisgo/tardisgo/pogo"
     8  
     9  func init() {
    10  	var langVar langType
    11  	var langEntry pogo.LanguageEntry
    12  	langEntry.Language = langVar
    13  
    14  	il := 1024 // 1024 is an internal Haxe C# limit (`lvregs_len < 1024`)
    15  
    16  	langEntry.InstructionLimit = il      /* size before we make subfns */
    17  	langEntry.SubFnInstructionLimit = il /* 256 required for php */
    18  	langEntry.PackageConstVarName = "tardisgoHaxePackage"
    19  	langEntry.HeaderConstVarName = "tardisgoHaxeHeader"
    20  	langEntry.Goruntime = "haxegoruntime" // a string containing the location of the core language runtime functions delivered in Go
    21  	langEntry.PseudoPkgPaths = []string{"github.com/tardisgo/tardisgo/haxe/hx"}
    22  	langEntry.LineCommentMark = "//"
    23  	langEntry.StatementTerminator = ";"
    24  	langEntry.IgnorePrefixes = []string{"this.setPH("}
    25  	langEntry.GOROOT = "/src/github.com/tardisgo/tardisgo/goroot/haxe/go1.4"
    26  	langEntry.TgtDir = "tardis" // TODO move to the correct directory based on a command line argument
    27  
    28  	pogo.LanguageList = append(pogo.LanguageList, langEntry)
    29  }