---input---
//
// Copyright (c) 2008, Brian Frank and Andy Frank
// Licensed under the Academic Free License version 3.0
//
// History:
//   17 Nov 08  Brian Frank  Creation
//

using compiler

**
** JavaBridge is the compiler plugin for bringing Java
** classes into the Fantom type system.
**
class JavaBridge : CBridge
{

//////////////////////////////////////////////////////////////////////////
// Constructor
//////////////////////////////////////////////////////////////////////////

  **
  ** Construct a JavaBridge for current environment
  **
  new make(Compiler c, ClassPath cp := ClassPath.makeForCurrent)
    : super(c)
  {
    this.cp = cp
  }

//////////////////////////////////////////////////////////////////////////
// Namespace
//////////////////////////////////////////////////////////////////////////

  **
  ** Map a FFI "podName" to a Java package.
  **
  override CPod resolvePod(Str name, Loc? loc)
  {
    // the empty package is used to represent primitives
    if (name == "") return primitives

    // look for package name in classpatch
    classes := cp.classes[name]
    if (classes == null)
      throw CompilerErr("Java package '$name' not found", loc)

    // map package to JavaPod
    return JavaPod(this, name, classes)
  }

  **
  ** Map class meta-data and Java members to Fantom slots
  ** for the specified JavaType.
  **
  virtual Void loadType(JavaType type, Str:CSlot slots)
  {
    JavaReflect.loadType(type, slots)
  }

//////////////////////////////////////////////////////////////////////////
// Call Resolution
//////////////////////////////////////////////////////////////////////////

  **
  ** Resolve a construction call to a Java constructor.
  **
  override Expr resolveConstruction(CallExpr call)
  {
    // if the last argument is an it-block, then we know
    // right away that we will not be passing it thru to Java,
    // so strip it off to be appended as call to Obj.with
    itBlock := call.args.last as ClosureExpr
    if (itBlock != null && itBlock.isItBlock)
      call.args.removeAt(-1)
    else
      itBlock = null

    // if this is an interop array like IntArray/int[] use make
    // factory otherwise look for Java constructor called <init>
    JavaType base := call.target.ctype
    if (base.isInteropArray)
      call.method = base.method("make")
    else
      call.method = base.method("<init>")

    // call resolution to deal with overloading
    call = resolveCall(call)

    // we need to create an implicit target for the Java runtime
    // to perform the new opcode to ensure it is on the stack
    // before the args (we don't do this for interop Array classes)
    if (!base.isInteropArray)
    {
      loc := call.loc
      call.target = CallExpr.makeWithMethod(loc, null, base.newMethod) { synthetic=true }
    }

    // if we stripped an it-block argument,
    // add it as trailing call to Obj.with
    if (itBlock != null) return itBlock.toWith(call)
    return call
  }

  **
  ** Resolve a construction chain call where a Fantom constructor
  ** calls the super-class constructor.  Type check the arguments
  ** and insert any conversions needed.
  **
  override Expr resolveConstructorChain(CallExpr call)
  {
    // we don't allow chaining to a this ctor for Java FFI
    if (call.target.id !== ExprId.superExpr)
      throw err("Must use super constructor call in Java FFI", call.loc)

    // route to a superclass constructor
    JavaType base := call.target.ctype.deref
    call.method = base.method("<init>")

    // call resolution to deal with overloading
    return resolveCall(call)
  }

  **
  ** Given a dot operator slot access on the given foreign
  ** base type, determine the appopriate slot to use based on
  ** whether parens were used
  **   base.name    =>  noParens = true
  **   base.name()  =>  noParens = false
  **
  ** In Java a given name could be bound to both a field and
  ** a method.  In this case we only resolve the field if
  ** no parens are used.  We also handle the special case of
  ** Java annotations here because their element methods are
  ** also mapped as Fantom fields (instance based mixin field).
  **
  override CSlot? resolveSlotAccess(CType base, Str name, Bool noParens)
  {
    // first try to resolve as a field
    field := base.field(name)
    if (field != null)
    {
      // if no () we used and this isn't an annotation field
      if (noParens && (field.isStatic || !base.isMixin))
        return field

      // if we did find a field, then make sure we use that
      // field's parent type to resolve a method (becuase the
      // base type might be a sub-class of a Java type in which
      // case it is unware of field/method overloads)
      return field.parent.method(name)
    }

    // lookup method
    return base.method(name)
  }

  **
  ** Resolve a method call: try to find the best match
  ** and apply any coercions needed.
  **
  override CallExpr resolveCall(CallExpr call)
  {
    // try to match against all the overloaded methods
    matches := CallMatch[,]
    CMethod? m := call.method
    while (m != null)
    {
      match := matchCall(call, m)
      if (match != null) matches.add(match)
      m = m is JavaMethod ? ((JavaMethod)m).next : null
    }

    // if we have exactly one match use then use that one
    if (matches.size == 1) return matches[0].apply(call)

    // if we have multiple matches; resolve to
    // most specific match according to JLS rules
    // TODO: this does not correct resolve when using Fantom implicit casting
    if (matches.size > 1)
    {
      best := resolveMostSpecific(matches)
      if (best != null) return best.apply(call)
    }

    // zero or multiple ambiguous matches is a compiler error
    s := StrBuf()
    s.add(matches.isEmpty ? "Invalid args " : "Ambiguous call ")
    s.add(call.name).add("(")
    s.add(call.args.join(", ") |Expr arg->Str| { return arg.toTypeStr })
    s.add(")")
    throw err(s.toStr, call.loc)
  }

  **
  ** Check if the call matches the specified overload method.
  ** If so return method and coerced args otherwise return null.
  **
  internal CallMatch? matchCall(CallExpr call, CMethod m)
  {
    // first check if have matching numbers of args and params
    args := call.args
    if (m.params.size < args.size) return null

    // check if each argument is ok or can be coerced
    isErr := false
    newArgs := args.dup
    m.params.each |CParam p, Int i|
    {
      if (i >= args.size)
      {
        // param has a default value, then that is ok
        if (!p.hasDefault) isErr = true
      }
      else
      {
        // ensure arg fits parameter type (or auto-cast)
        newArgs[i] = coerce(args[i], p.paramType) |->| { isErr = true }
      }
    }
    if (isErr) return null
    return CallMatch { it.method = m; it.args = newArgs }
  }

  **
  ** Given a list of overloaed methods find the most specific method
  ** according to Java Language Specification 15.11.2.2.  The "informal
  ** intuition" rule is that a method is more specific than another
  ** if the first could be could be passed onto the second one.
  **
  internal static CallMatch? resolveMostSpecific(CallMatch[] matches)
  {
    CallMatch? best := matches[0]
    for (i:=1; i<matches.size; ++i)
    {
      x := matches[i]
      if (isMoreSpecific(best, x)) { continue }
      if (isMoreSpecific(x, best)) { best = x; continue }
      return null
    }
    return best
  }

  **
  ** Is 'a' more specific than 'b' such that 'a' could be used
  ** passed to 'b' without a compile time error.
  **
  internal static Bool isMoreSpecific(CallMatch a, CallMatch b)
  {
    return a.method.params.all |CParam ap, Int i->Bool|
    {
      bp := b.method.params[i]
      return ap.paramType.fits(bp.paramType)
    }
  }

//////////////////////////////////////////////////////////////////////////
// Overrides
//////////////////////////////////////////////////////////////////////////

  **
  ** Called during Inherit step when a Fantom slot overrides a FFI slot.
  ** Log and throw compiler error if there is a problem.
  **
  override Void checkOverride(TypeDef t, CSlot base, SlotDef def)
  {
    // we don't allow Fantom to override Java methods with multiple
    // overloaded versions since the Fantom type system can't actually
    // override all the overloaded versions
    jslot := base as JavaSlot
    if (jslot?.next != null)
      throw err("Cannot override Java overloaded method: '$jslot.name'", def.loc)

    // route to method override checking
    if (base is JavaMethod && def is MethodDef)
      checkMethodOverride(t, base, def)
  }

  **
  ** Called on method/method overrides in the checkOverride callback.
  **
  private Void checkMethodOverride(TypeDef t, JavaMethod base, MethodDef def)
  {
    // bail early if we know things aren't going to work out
    if (base.params.size != def.params.size) return

    // if the return type is primitive or Java array and the
    // Fantom declaration matches how it is inferred into the Fan
    // type system, then just change the return type - the compiler
    // will impliclty do all the return coercions
    if (isOverrideInferredType(base.returnType, def.returnType))
    {
      def.ret = def.inheritedRet = base.returnType
    }

    // if any of the parameters is a primitive or Java array
    // and the Fantom declaration matches how it is inferred into
    // the Fantom type type, then change the parameter type to
    // the Java override type and make the Fantom type a local
    // variable:
    //   Java:   void foo(int a) { ... }
    //   Fantom: Void foo(Int a) { ... }
    //   Result: Void foo(int a_$J) { Int a := a_$J; ... }
    //
    base.params.eachr |CParam bp, Int i|
    {
      dp := def.paramDefs[i]
      if (!isOverrideInferredType(bp.paramType, dp.paramType)) return

      // add local variable: Int bar := bar_$J
      local := LocalDefStmt(def.loc)
      local.ctype = dp.paramType
      local.name  = dp.name
      local.init  = UnknownVarExpr(def.loc, null, dp.name + "_\$J")
      def.code.stmts.insert(0, local)

      // rename parameter Int bar -> int bar_$J
      dp.name = dp.name + "_\$J"
      dp.paramType = bp.paramType
    }
  }

  **
  ** When overriding a Java method check if the base type is
  ** is a Java primitive or array and the override definition is
  ** matches how the Java type is inferred in the Fantom type system.
  ** If we have a match return true and we'll swizzle things in
  ** checkMethodOverride.
  **
  static private Bool isOverrideInferredType(CType base, CType def)
  {
    // check if base class slot is a JavaType
    java := base.toNonNullable as JavaType
    if (java != null)
    {
      // allow primitives is it matches the inferred type
      if (java.isPrimitive) return java.inferredAs == def

      // allow arrays if mapped as Foo[] -> Foo?[]?
      if (java.isArray) return java.inferredAs == def.toNonNullable && def.isNullable
    }
    return false
  }

//////////////////////////////////////////////////////////////////////////
// CheckErrors
//////////////////////////////////////////////////////////////////////////

  **
  ** Called during CheckErrors step for a type which extends
  ** a FFI class or implements any FFI mixins.
  **
  override Void checkType(TypeDef def)
  {
    // can't subclass a primitive array like ByteArray/byte[]
    if (def.base.deref is JavaType && def.base.deref->isInteropArray)
    {
      err("Cannot subclass from Java interop array: $def.base", def.loc)
      return
    }

    // we don't allow deep inheritance of Java classes because
    // the Fantom constructor and Java constructor model don't match
    // up past one level of inheritance
    // NOTE: that that when we remove this restriction we need to
    // test how field initialization works because instance$init
    // is almost certain to break with the current emit design
    javaBase := def.base
    while (javaBase != null && !javaBase.isForeign) javaBase = javaBase.base
    if (javaBase != null && javaBase !== def.base)
    {
      err("Cannot subclass Java class more than one level: $javaBase", def.loc)
      return
    }

    // ensure that when we map Fantom constructors to Java
    // constructors that we don't have duplicate signatures
    ctors := def.ctorDefs
    ctors.each |MethodDef a, Int i|
    {
      ctors.each |MethodDef b, Int j|
      {
        if (i > j && areParamsSame(a, b))
          err("Duplicate Java FFI constructor signatures: '$b.name' and '$a.name'", a.loc)
      }
    }
  }

  **
  ** Do the two methods have the exact same parameter types.
  **
  static Bool areParamsSame(CMethod a, CMethod b)
  {
    if (a.params.size != b.params.size) return false
    for (i:=0; i<a.params.size; ++i)
    {
      if (a.params[i].paramType != b.params[i].paramType)
        return false
    }
    return true
  }

//////////////////////////////////////////////////////////////////////////
// Coercion
//////////////////////////////////////////////////////////////////////////

  **
  ** Return if we can make the actual type fit the expected
  ** type, potentially using a coercion.
  **
  Bool fits(CType actual, CType expected)
  {
    // use dummy expression and route to coerce code
    dummy := UnknownVarExpr(Loc("dummy"), null, "dummy") { ctype = actual }
    fits := true
    coerce(dummy, expected) |->| { fits=false }
    return fits
  }

  **
  ** Coerce expression to expected type.  If not a type match
  ** then run the onErr function.
  **
  override Expr coerce(Expr expr, CType expected, |->| onErr)
  {
    // handle easy case
    actual := expr.ctype
    expected = expected.deref
    if (actual == expected) return expr

    // handle null literal
    if (expr.id === ExprId.nullLiteral && expected.isNullable)
      return expr

    // handle Fantom to Java primitives
    if (expected.pod == primitives)
      return coerceToPrimitive(expr, expected, onErr)

    // handle Java primitives to Fan
    if (actual.pod == primitives)
      return coerceFromPrimitive(expr, expected, onErr)

    // handle Java array to Fantom list
    if (actual.name[0] == '[')
      return coerceFromArray(expr, expected, onErr)

    // handle Fantom list to Java array
    if (expected.name[0] == '[')
      return coerceToArray(expr, expected, onErr)

    // handle sys::Func -> Java interface
    if (actual is FuncType && expected.isMixin && expected.toNonNullable is JavaType)
      return coerceFuncToInterface(expr, expected.toNonNullable, onErr)

    // handle special classes and interfaces for built-in Fantom
    // classes which actually map directly to Java built-in types
    if (actual.isBool    && boolTypes.contains(expected.toNonNullable.signature)) return box(expr)
    if (actual.isInt     && intTypes.contains(expected.toNonNullable.signature)) return box(expr)
    if (actual.isFloat   && floatTypes.contains(expected.toNonNullable.signature)) return box(expr)
    if (actual.isDecimal && decimalTypes.contains(expected.toNonNullable.signature)) return expr
    if (actual.isStr     && strTypes.contains(expected.toNonNullable.signature)) return expr

     // use normal Fantom coercion behavior
    return super.coerce(expr, expected, onErr)
  }

  **
  ** Ensure value type is boxed.
  **
  private Expr box(Expr expr)
  {
    if (expr.ctype.isVal)
      return TypeCheckExpr.coerce(expr, expr.ctype.toNullable)
    else
      return expr
  }

  **
  ** Coerce a fan expression to a Java primitive (other
  ** than the ones we support natively)
  **
  Expr coerceToPrimitive(Expr expr, JavaType expected, |->| onErr)
  {
    actual := expr.ctype

    // sys::Int (long) -> int, short, byte
    if (actual.isInt && expected.isPrimitiveIntLike)
      return TypeCheckExpr.coerce(expr, expected)

    // sys::Float (double) -> float
    if (actual.isFloat && expected.isPrimitiveFloat)
      return TypeCheckExpr.coerce(expr, expected)

    // no coercion - type error
    onErr()
    return expr
  }

  **
  ** Coerce a Java primitive to a Fantom type.
  **
  Expr coerceFromPrimitive(Expr expr, CType expected, |->| onErr)
  {
    actual := (JavaType)expr.ctype

    // int, short, byte -> sys::Int (long)
    if (actual.isPrimitiveIntLike)
    {
      if (expected.isInt || expected.isObj)
        return TypeCheckExpr.coerce(expr, expected)
    }

    // float -> sys::Float (float)
    if (actual.isPrimitiveFloat)
    {
      if (expected.isFloat || expected.isObj)
        return TypeCheckExpr.coerce(expr, expected)
    }

    // no coercion - type error
    onErr()
    return expr
  }

  **
  ** Coerce a Java array to a Fantom list.
  **
  Expr coerceFromArray(Expr expr, CType expected, |->| onErr)
  {
    actual := (JavaType)expr.ctype.toNonNullable

    // if expected is array type
    if (expected is JavaType && ((JavaType)expected).isArray)
      if (actual.arrayOf.fits(((JavaType)expected).arrayOf)) return expr

    // if expected is Obj
    if (expected.isObj) return arrayToList(expr, actual.inferredArrayOf)

    // if expected is list type
    if (expected.toNonNullable is ListType)
    {
      expectedOf := ((ListType)expected.toNonNullable).v
      if (actual.inferredArrayOf.fits(expectedOf)) return arrayToList(expr, expectedOf)
    }

    // no coercion available
    onErr()
    return expr
  }

  **
  ** Generate List.make(of, expr) where expr is Object[]
  **
  private Expr arrayToList(Expr expr, CType of)
  {
    loc := expr.loc
    ofExpr := LiteralExpr(loc, ExprId.typeLiteral, ns.typeType, of)
    call := CallExpr.makeWithMethod(loc, null, listMakeFromArray, [ofExpr, expr])
    call.synthetic = true
    return call
  }

  **
  ** Coerce a Fantom list to Java array.
  **
  Expr coerceToArray(Expr expr, CType expected, |->| onErr)
  {
    loc := expr.loc
    expectedOf := ((JavaType)expected.toNonNullable).inferredArrayOf
    actual := expr.ctype

    // if actual is list type
    if (actual.toNonNullable is ListType)
    {
      actualOf := ((ListType)actual.toNonNullable).v
      if (actualOf.fits(expectedOf))
      {
        // (Foo[])list.asArray(cls)
        clsLiteral := CallExpr.makeWithMethod(loc, null, JavaType.classLiteral(this, expectedOf))
        asArray := CallExpr.makeWithMethod(loc, expr, listAsArray, [clsLiteral])
        return TypeCheckExpr.coerce(asArray, expected)
      }
    }

    // no coercion available
    onErr()
    return expr
  }

  **
  ** Attempt to coerce a parameterized sys::Func expr to a Java
  ** interface if the interface supports exactly one matching method.
  **
  Expr coerceFuncToInterface(Expr expr, JavaType expected, |->| onErr)
  {
    // check if we have exactly one abstract method in the expected type
    loc := expr.loc
    abstracts := expected.methods.findAll |CMethod m->Bool| { return m.isAbstract }
    if (abstracts.size != 1) { onErr(); return expr }
    method := abstracts.first

    // check if we have a match
    FuncType funcType := (FuncType)expr.ctype
    if (!isFuncToInterfaceMatch(funcType, method)) { onErr(); return expr }

    // check if we've already generated a wrapper for this combo
    key := "${funcType.signature}+${method.qname}"
    ctor := funcWrappers[key]
    if (ctor == null)
    {
      ctor = generateFuncToInterfaceWrapper(expr.loc, funcType, expected, method)
      funcWrappers[key] = ctor
    }

    // replace expr with FuncWrapperX(expr)
    call := CallExpr.makeWithMethod(loc, null, ctor, [expr])
    call.synthetic = true
    return call
  }

  **
  ** Return if the specified function type can be used to implement
  ** the specified interface method.
  **
  Bool isFuncToInterfaceMatch(FuncType funcType, CMethod method)
  {
    // sanity check to map to callX method - can't handle more than 8 args
    if (method.params.size > 8) return false

    // check if method is match for function; first check is that
    // method must supply all the arguments required by the function
    if (funcType.params.size > method.params.size) return false

    // check that func return type fits method return
    retOk := method.returnType.isVoid || fits(funcType.ret, method.returnType)
    if (!retOk) return false

    // check all the method parameters fit the function parameters
    paramsOk := funcType.params.all |CType f, Int i->Bool| { return fits(f, method.params[i].paramType) }
    if (!paramsOk) return false

    return true
  }

  **
  ** Generate the wrapper which implements the specified expected interface
  ** and overrides the specified method which calls the function.
  **
  CMethod generateFuncToInterfaceWrapper(Loc loc, FuncType funcType, CType expected, CMethod method)
  {
    //   Fantom: func typed as |Str|
    //   Java:   interface Foo { void bar(String) }
    //   Result: FuncWrapperX(func)
    //
    //   class FuncWrapperX : Foo
    //   {
    //     new make(Func f) { _func = f }
    //     override Void bar(Str a) { _func.call(a) }
    //     Func _func
    //   }

    // generate FuncWrapper class
    name := "FuncWrapper" + funcWrappers.size
    cls := TypeDef(ns, loc, compiler.types[0].unit, name, FConst.Internal + FConst.Synthetic)
    cls.base = ns.objType
    cls.mixins = [expected]
    addTypeDef(cls)

    // generate FuncWrapper._func field
    field := FieldDef(loc, cls)
    ((SlotDef)field).name = "_func"
    ((DefNode)field).flags = FConst.Private + FConst.Storage + FConst.Synthetic
    field.fieldType = funcType
    cls.addSlot(field)

    // generate FuncWrapper.make constructor
    ctor := MethodDef(loc, cls, "make", FConst.Internal + FConst.Ctor + FConst.Synthetic)
    ctor.ret  = ns.voidType
    ctor.paramDefs = [ParamDef(loc, funcType, "f")]
    ctor.code = Block.make(loc)
    ctor.code.stmts.add(BinaryExpr.makeAssign(
      FieldExpr(loc, ThisExpr(loc), field),
      UnknownVarExpr(loc, null, "f")).toStmt)
    ctor.code.stmts.add(ReturnStmt.make(loc))
    cls.addSlot(ctor)

    // generate FuncWrapper override of abstract method
    over := MethodDef(loc, cls, method.name, FConst.Public + FConst.Override + FConst.Synthetic)
    over.ret = method.returnType
    over.paramDefs = ParamDef[,]
    over.code = Block.make(loc)
    callArity := "call"
    call := CallExpr.makeWithMethod(loc, FieldExpr(loc, ThisExpr(loc), field), funcType.method(callArity))
    method.params.each |CParam param, Int i|
    {
      paramName := "p$i"
      over.params.add(ParamDef(loc, param.paramType, paramName))
      if (i < funcType.params.size)
        call.args.add(UnknownVarExpr(loc, null, paramName))
    }
    if (method.returnType.isVoid)
      over.code.stmts.add(call.toStmt).add(ReturnStmt(loc))
    else
      over.code.stmts.add(ReturnStmt(loc, call))
    cls.addSlot(over)

    // return the ctor which we use for coercion
    return ctor
  }

//////////////////////////////////////////////////////////////////////////
// Reflection
//////////////////////////////////////////////////////////////////////////

  **
  ** Get a CMethod representation for 'List.make(Type, Object[])'
  **
  once CMethod listMakeFromArray()
  {
    return JavaMethod(
      this.ns.listType,
      "make",
      FConst.Public + FConst.Static,
      this.ns.listType.toNullable,
      [
        JavaParam("of", this.ns.typeType),
        JavaParam("array", objectArrayType)
      ])
  }

  **
  ** Get a CMethod representation for 'Object[] List.asArray()'
  **
  once CMethod listAsArray()
  {
    return JavaMethod(
      this.ns.listType,
      "asArray",
      FConst.Public,
      objectArrayType,
      [JavaParam("cls", classType)])
  }

  **
  ** Get a CType representation for 'java.lang.Class'
  **
  once JavaType classType()
  {
    return ns.resolveType("[java]java.lang::Class")
  }

  **
  ** Get a CType representation for 'java.lang.Object[]'
  **
  once JavaType objectArrayType()
  {
    return ns.resolveType("[java]java.lang::[Object")
  }

//////////////////////////////////////////////////////////////////////////
// Fields
//////////////////////////////////////////////////////////////////////////

  const static Str[] boolTypes := Str[
    "[java]java.io::Serializable",
    "[java]java.lang::Comparable",
  ]

  const static Str[] intTypes := Str[
    "[java]java.lang::Number",
    "[java]java.io::Serializable",
    "[java]java.lang::Comparable",
  ]

  const static Str[] floatTypes := Str[
    "[java]java.lang::Number",
    "[java]java.io::Serializable",
    "[java]java.lang::Comparable",
  ]

  const static Str[] decimalTypes := Str[
    "[java]java.lang::Number",
    "[java]java.io::Serializable",
    "[java]java.lang::Comparable",
  ]

  const static Str[] strTypes := Str[
    "[java]java.io::Serializable",
    "[java]java.lang::CharSequence",
    "[java]java.lang::Comparable",
  ]

  JavaPrimitives primitives := JavaPrimitives(this)
  ClassPath cp

  private Str:CMethod funcWrappers := Str:CMethod[:]  // funcType+method:ctor

}

**************************************************************************
** CallMatch
**************************************************************************

internal class CallMatch
{
  CallExpr apply(CallExpr call)
  {
    call.args   = args
    call.method = method
    call.ctype  = method.isCtor ? method.parent : method.returnType
    return call
  }

  override Str toStr() { return method.signature }

  CMethod? method    // matched method
  Expr[]? args       // coerced arguments
}

---tokens---
'//\n'        Comment.Single

'// Copyright (c) 2008, Brian Frank and Andy Frank\n' Comment.Single

'// Licensed under the Academic Free License version 3.0\n' Comment.Single

'//\n'        Comment.Single

'// History:\n' Comment.Single

'//   17 Nov 08  Brian Frank  Creation\n' Comment.Single

'//\n'        Comment.Single

'\n'          Text

'using'       Keyword.Namespace
' '           Text
'compiler'    Name.Namespace
'\n'          Text

'\n'          Text

'**\n'        Comment.Special

'** JavaBridge is the compiler plugin for bringing Java\n' Comment.Special

'** classes into the Fantom type system.\n' Comment.Special

'**\n'        Comment.Special

'class'       Keyword
' '           Text
'JavaBridge'  Name.Class
' '           Text
':'           Punctuation
' '           Text
'CBridge'     Name.Class
'\n'          Text

'{'           Punctuation
'\n'          Text

'\n'          Text

'//////////////////////////////////////////////////////////////////////////\n' Comment.Single

'// Constructor\n' Comment.Single

'//////////////////////////////////////////////////////////////////////////\n' Comment.Single

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Construct a JavaBridge for current environment\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'new'         Keyword
' '           Text
'make'        Name.Function
'('           Punctuation
'Compiler'    Name.Class
' '           Text
'c'           Name.Variable
','           Punctuation
' '           Text
'ClassPath'   Name.Class
' '           Text
'cp'          Name.Variable
' '           Text
':='          Operator
' '           Text
'C'           Text
'l'           Text
'a'           Text
's'           Text
's'           Text
'P'           Text
'a'           Text
't'           Text
'h'           Text
'.'           Operator
'makeForCurrent' Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
':'           Text
' '           Text
'super'       Name.Builtin.Pseudo
'('           Punctuation
'c'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'this'        Name.Builtin.Pseudo
'.'           Operator
'cp'          Name.Function
' '           Text
'='           Operator
' '           Text
'c'           Text
'p'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

'//////////////////////////////////////////////////////////////////////////\n' Comment.Single

'// Namespace\n' Comment.Single

'//////////////////////////////////////////////////////////////////////////\n' Comment.Single

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Map a FFI "podName" to a Java package.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'override'    Keyword
' '           Text
'CPod'        Name.Class
' '           Text
'resolvePod'  Name.Function
'('           Punctuation
'Str'         Name.Class
' '           Text
'name'        Name.Variable
','           Punctuation
' '           Text
'Loc'         Name.Class
'?'           Punctuation
' '           Text
'loc'         Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// the empty package is used to represent primitives\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'n'           Text
'a'           Text
'm'           Text
'e'           Text
' '           Text
'='           Operator
'='           Operator
' '           Text
'"'           Punctuation
'"'           Punctuation
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'p'           Text
'r'           Text
'i'           Text
'm'           Text
'i'           Text
't'           Text
'i'           Text
'v'           Text
'e'           Text
's'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// look for package name in classpatch\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'classes'     Name.Variable
' '           Text
':='          Operator
' '           Text
'c'           Text
'p'           Text
'.'           Operator
'classes'     Name.Function
'['           Operator
'n'           Text
'a'           Text
'm'           Text
'e'           Text
']'           Operator
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'c'           Text
'l'           Text
'a'           Text
's'           Text
's'           Text
'e'           Text
's'           Text
' '           Text
'='           Operator
'='           Operator
' '           Text
'null'        Keyword.Constant
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'throw'       Keyword
' '           Text
'C'           Text
'o'           Text
'm'           Text
'p'           Text
'i'           Text
'l'           Text
'e'           Text
'r'           Text
'E'           Text
'r'           Text
'r'           Text
'('           Punctuation
'"'           Punctuation
'J'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
' '           Literal.String
'p'           Literal.String
'a'           Literal.String
'c'           Literal.String
'k'           Literal.String
'a'           Literal.String
'g'           Literal.String
'e'           Literal.String
' '           Literal.String
"'"           Literal.String
'$name'       Literal.String.Interpol
"'"           Literal.String
' '           Literal.String
'n'           Literal.String
'o'           Literal.String
't'           Literal.String
' '           Literal.String
'f'           Literal.String
'o'           Literal.String
'u'           Literal.String
'n'           Literal.String
'd'           Literal.String
'"'           Punctuation
','           Text
' '           Text
'l'           Text
'o'           Text
'c'           Text
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// map package to JavaPod\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'P'           Text
'o'           Text
'd'           Text
'('           Punctuation
'this'        Name.Builtin.Pseudo
','           Text
' '           Text
'n'           Text
'a'           Text
'm'           Text
'e'           Text
','           Text
' '           Text
'c'           Text
'l'           Text
'a'           Text
's'           Text
's'           Text
'e'           Text
's'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Map class meta-data and Java members to Fantom slots\n' Comment.Special

' '           Text
' '           Text
'** for the specified JavaType.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'virtual'     Keyword
' '           Text
'Void'        Name.Class
' '           Text
'loadType'    Name.Function
'('           Punctuation
'JavaType'    Name.Class
' '           Text
'type'        Name.Variable
','           Punctuation
' '           Text
'Str'         Name.Class
':'           Punctuation
'CSlot'       Name.Class
' '           Text
'slots'       Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'R'           Text
'e'           Text
'f'           Text
'l'           Text
'e'           Text
'c'           Text
't'           Text
'.'           Operator
'loadType'    Name.Function
'('           Punctuation
't'           Text
'y'           Text
'p'           Text
'e'           Text
','           Text
' '           Text
's'           Text
'l'           Text
'o'           Text
't'           Text
's'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

'//////////////////////////////////////////////////////////////////////////\n' Comment.Single

'// Call Resolution\n' Comment.Single

'//////////////////////////////////////////////////////////////////////////\n' Comment.Single

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Resolve a construction call to a Java constructor.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'override'    Keyword
' '           Text
'Expr'        Name.Class
' '           Text
'resolveConstruction' Name.Function
'('           Punctuation
'CallExpr'    Name.Class
' '           Text
'call'        Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// if the last argument is an it-block, then we know\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// right away that we will not be passing it thru to Java,\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// so strip it off to be appended as call to Obj.with\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'itBlock'     Name.Variable
' '           Text
':='          Operator
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'args'        Name.Function
'.'           Operator
'last'        Name.Function
' '           Text
'as'          Keyword
' '           Text
'C'           Text
'l'           Text
'o'           Text
's'           Text
'u'           Text
'r'           Text
'e'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'i'           Text
't'           Text
'B'           Text
'l'           Text
'o'           Text
'c'           Text
'k'           Text
' '           Text
'!'           Operator
'='           Operator
' '           Text
'null'        Keyword.Constant
' '           Text
'&&'          Operator
' '           Text
'i'           Text
't'           Text
'B'           Text
'l'           Text
'o'           Text
'c'           Text
'k'           Text
'.'           Operator
'isItBlock'   Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'args'        Name.Function
'.'           Operator
'removeAt'    Name.Function
'('           Punctuation
'-'           Operator
'1'           Literal.Number.Integer
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'else'        Keyword
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'i'           Text
't'           Text
'B'           Text
'l'           Text
'o'           Text
'c'           Text
'k'           Text
' '           Text
'='           Operator
' '           Text
'null'        Keyword.Constant
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// if this is an interop array like IntArray/int[] use make\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// factory otherwise look for Java constructor called <init>\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'JavaType'    Name.Class
' '           Text
'base'        Name.Variable
' '           Text
':='          Operator
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'target'      Name.Function
'.'           Operator
'ctype'       Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'b'           Text
'a'           Text
's'           Text
'e'           Text
'.'           Operator
'isInteropArray' Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'method'      Name.Function
' '           Text
'='           Operator
' '           Text
'b'           Text
'a'           Text
's'           Text
'e'           Text
'.'           Operator
'method'      Name.Function
'('           Punctuation
'"'           Punctuation
'm'           Literal.String
'a'           Literal.String
'k'           Literal.String
'e'           Literal.String
'"'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'else'        Keyword
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'method'      Name.Function
' '           Text
'='           Operator
' '           Text
'b'           Text
'a'           Text
's'           Text
'e'           Text
'.'           Operator
'method'      Name.Function
'('           Punctuation
'"'           Punctuation
'<'           Literal.String
'i'           Literal.String
'n'           Literal.String
'i'           Literal.String
't'           Literal.String
'>'           Literal.String
'"'           Punctuation
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// call resolution to deal with overloading\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
' '           Text
'='           Operator
' '           Text
'r'           Text
'e'           Text
's'           Text
'o'           Text
'l'           Text
'v'           Text
'e'           Text
'C'           Text
'a'           Text
'l'           Text
'l'           Text
'('           Punctuation
'c'           Text
'a'           Text
'l'           Text
'l'           Text
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// we need to create an implicit target for the Java runtime\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// to perform the new opcode to ensure it is on the stack\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
"// before the args (we don't do this for interop Array classes)\n" Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'b'           Text
'a'           Text
's'           Text
'e'           Text
'.'           Operator
'isInteropArray' Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'loc'         Name.Variable
' '           Text
':='          Operator
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'loc'         Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'target'      Name.Function
' '           Text
'='           Operator
' '           Text
'C'           Text
'a'           Text
'l'           Text
'l'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'makeWithMethod' Name.Function
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'null'        Keyword.Constant
','           Text
' '           Text
'b'           Text
'a'           Text
's'           Text
'e'           Text
'.'           Operator
'newMethod'   Name.Function
')'           Punctuation
' '           Text
'{'           Punctuation
' '           Text
's'           Text
'y'           Text
'n'           Text
't'           Text
'h'           Text
'e'           Text
't'           Text
'i'           Text
'c'           Text
'='           Operator
'true'        Keyword.Constant
' '           Text
'}'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// if we stripped an it-block argument,\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// add it as trailing call to Obj.with\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'i'           Text
't'           Text
'B'           Text
'l'           Text
'o'           Text
'c'           Text
'k'           Text
' '           Text
'!'           Operator
'='           Operator
' '           Text
'null'        Keyword.Constant
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'i'           Text
't'           Text
'B'           Text
'l'           Text
'o'           Text
'c'           Text
'k'           Text
'.'           Operator
'toWith'      Name.Function
'('           Punctuation
'c'           Text
'a'           Text
'l'           Text
'l'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Resolve a construction chain call where a Fantom constructor\n' Comment.Special

' '           Text
' '           Text
'** calls the super-class constructor.  Type check the arguments\n' Comment.Special

' '           Text
' '           Text
'** and insert any conversions needed.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'override'    Keyword
' '           Text
'Expr'        Name.Class
' '           Text
'resolveConstructorChain' Name.Function
'('           Punctuation
'CallExpr'    Name.Class
' '           Text
'call'        Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
"// we don't allow chaining to a this ctor for Java FFI\n" Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'target'      Name.Function
'.'           Operator
'id'          Name.Function
' '           Text
'!'           Operator
'='           Operator
'='           Operator
' '           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'I'           Text
'd'           Text
'.'           Operator
'superExpr'   Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'throw'       Keyword
' '           Text
'e'           Text
'r'           Text
'r'           Text
'('           Punctuation
'"'           Punctuation
'M'           Literal.String
'u'           Literal.String
's'           Literal.String
't'           Literal.String
' '           Literal.String
'u'           Literal.String
's'           Literal.String
'e'           Literal.String
' '           Literal.String
's'           Literal.String
'u'           Literal.String
'p'           Literal.String
'e'           Literal.String
'r'           Literal.String
' '           Literal.String
'c'           Literal.String
'o'           Literal.String
'n'           Literal.String
's'           Literal.String
't'           Literal.String
'r'           Literal.String
'u'           Literal.String
'c'           Literal.String
't'           Literal.String
'o'           Literal.String
'r'           Literal.String
' '           Literal.String
'c'           Literal.String
'a'           Literal.String
'l'           Literal.String
'l'           Literal.String
' '           Literal.String
'i'           Literal.String
'n'           Literal.String
' '           Literal.String
'J'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
' '           Literal.String
'F'           Literal.String
'F'           Literal.String
'I'           Literal.String
'"'           Punctuation
','           Text
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'loc'         Name.Function
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// route to a superclass constructor\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'JavaType'    Name.Class
' '           Text
'base'        Name.Variable
' '           Text
':='          Operator
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'target'      Name.Function
'.'           Operator
'ctype'       Name.Function
'.'           Operator
'deref'       Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'method'      Name.Function
' '           Text
'='           Operator
' '           Text
'b'           Text
'a'           Text
's'           Text
'e'           Text
'.'           Operator
'method'      Name.Function
'('           Punctuation
'"'           Punctuation
'<'           Literal.String
'i'           Literal.String
'n'           Literal.String
'i'           Literal.String
't'           Literal.String
'>'           Literal.String
'"'           Punctuation
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// call resolution to deal with overloading\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'r'           Text
'e'           Text
's'           Text
'o'           Text
'l'           Text
'v'           Text
'e'           Text
'C'           Text
'a'           Text
'l'           Text
'l'           Text
'('           Punctuation
'c'           Text
'a'           Text
'l'           Text
'l'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Given a dot operator slot access on the given foreign\n' Comment.Special

' '           Text
' '           Text
'** base type, determine the appopriate slot to use based on\n' Comment.Special

' '           Text
' '           Text
'** whether parens were used\n' Comment.Special

' '           Text
' '           Text
'**   base.name    =>  noParens = true\n' Comment.Special

' '           Text
' '           Text
'**   base.name()  =>  noParens = false\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** In Java a given name could be bound to both a field and\n' Comment.Special

' '           Text
' '           Text
'** a method.  In this case we only resolve the field if\n' Comment.Special

' '           Text
' '           Text
'** no parens are used.  We also handle the special case of\n' Comment.Special

' '           Text
' '           Text
'** Java annotations here because their element methods are\n' Comment.Special

' '           Text
' '           Text
'** also mapped as Fantom fields (instance based mixin field).\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'override'    Keyword
' '           Text
'CSlot'       Name.Class
'?'           Punctuation
' '           Text
'resolveSlotAccess' Name.Function
'('           Punctuation
'CType'       Name.Class
' '           Text
'base'        Name.Variable
','           Punctuation
' '           Text
'Str'         Name.Class
' '           Text
'name'        Name.Variable
','           Punctuation
' '           Text
'Bool'        Name.Class
' '           Text
'noParens'    Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// first try to resolve as a field\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'field'       Name.Variable
' '           Text
':='          Operator
' '           Text
'b'           Text
'a'           Text
's'           Text
'e'           Text
'.'           Operator
'field'       Name.Function
'('           Punctuation
'n'           Text
'a'           Text
'm'           Text
'e'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'f'           Text
'i'           Text
'e'           Text
'l'           Text
'd'           Text
' '           Text
'!'           Operator
'='           Operator
' '           Text
'null'        Keyword.Constant
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
"// if no () we used and this isn't an annotation field\n" Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'n'           Text
'o'           Text
'P'           Text
'a'           Text
'r'           Text
'e'           Text
'n'           Text
's'           Text
' '           Text
'&&'          Operator
' '           Text
'('           Punctuation
'f'           Text
'i'           Text
'e'           Text
'l'           Text
'd'           Text
'.'           Operator
'isStatic'    Name.Function
' '           Text
'||'          Operator
' '           Text
'!'           Operator
'b'           Text
'a'           Text
's'           Text
'e'           Text
'.'           Operator
'isMixin'     Name.Function
')'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'f'           Text
'i'           Text
'e'           Text
'l'           Text
'd'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'// if we did find a field, then make sure we use that\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
"// field's parent type to resolve a method (becuase the\n" Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'// base type might be a sub-class of a Java type in which\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'// case it is unware of field/method overloads)\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'f'           Text
'i'           Text
'e'           Text
'l'           Text
'd'           Text
'.'           Operator
'parent'      Name.Function
'.'           Operator
'method'      Name.Function
'('           Punctuation
'n'           Text
'a'           Text
'm'           Text
'e'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// lookup method\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'b'           Text
'a'           Text
's'           Text
'e'           Text
'.'           Operator
'method'      Name.Function
'('           Punctuation
'n'           Text
'a'           Text
'm'           Text
'e'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Resolve a method call: try to find the best match\n' Comment.Special

' '           Text
' '           Text
'** and apply any coercions needed.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'override'    Keyword
' '           Text
'CallExpr'    Name.Class
' '           Text
'resolveCall' Name.Function
'('           Punctuation
'CallExpr'    Name.Class
' '           Text
'call'        Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// try to match against all the overloaded methods\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'matches'     Name.Variable
' '           Text
':='          Operator
' '           Text
'CallMatch'   Name.Class
'[,]'         Literal
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'CMethod'     Name.Class
'?'           Punctuation
' '           Text
'm'           Name.Variable
' '           Text
':='          Operator
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'method'      Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'while'       Keyword
' '           Text
'('           Punctuation
'm'           Text
' '           Text
'!'           Operator
'='           Operator
' '           Text
'null'        Keyword.Constant
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'match'       Name.Variable
' '           Text
':='          Operator
' '           Text
'm'           Text
'a'           Text
't'           Text
'c'           Text
'h'           Text
'C'           Text
'a'           Text
'l'           Text
'l'           Text
'('           Punctuation
'c'           Text
'a'           Text
'l'           Text
'l'           Text
','           Text
' '           Text
'm'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'm'           Text
'a'           Text
't'           Text
'c'           Text
'h'           Text
' '           Text
'!'           Operator
'='           Operator
' '           Text
'null'        Keyword.Constant
')'           Punctuation
' '           Text
'm'           Text
'a'           Text
't'           Text
'c'           Text
'h'           Text
'e'           Text
's'           Text
'.'           Operator
'add'         Name.Function
'('           Punctuation
'm'           Text
'a'           Text
't'           Text
'c'           Text
'h'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'm'           Text
' '           Text
'='           Operator
' '           Text
'm'           Name.Class
' '           Text
'is'          Name.Variable
' '           Text
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'M'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
' '           Text
'?'           Text
' '           Text
'('           Punctuation
'('           Punctuation
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'M'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
')'           Punctuation
'm'           Text
')'           Punctuation
'.'           Operator
'next'        Name.Function
' '           Text
':'           Text
' '           Text
'null'        Keyword.Constant
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// if we have exactly one match use then use that one\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'm'           Text
'a'           Text
't'           Text
'c'           Text
'h'           Text
'e'           Text
's'           Text
'.'           Operator
'size'        Name.Function
' '           Text
'='           Operator
'='           Operator
' '           Text
'1'           Literal.Number.Integer
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'm'           Text
'a'           Text
't'           Text
'c'           Text
'h'           Text
'e'           Text
's'           Text
'['           Operator
'0'           Literal.Number.Integer
']'           Operator
'.'           Operator
'apply'       Name.Function
'('           Punctuation
'c'           Text
'a'           Text
'l'           Text
'l'           Text
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// if we have multiple matches; resolve to\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// most specific match according to JLS rules\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// TODO: this does not correct resolve when using Fantom implicit casting\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'm'           Text
'a'           Text
't'           Text
'c'           Text
'h'           Text
'e'           Text
's'           Text
'.'           Operator
'size'        Name.Function
' '           Text
'>'           Operator
' '           Text
'1'           Literal.Number.Integer
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'best'        Name.Variable
' '           Text
':='          Operator
' '           Text
'r'           Text
'e'           Text
's'           Text
'o'           Text
'l'           Text
'v'           Text
'e'           Text
'M'           Text
'o'           Text
's'           Text
't'           Text
'S'           Text
'p'           Text
'e'           Text
'c'           Text
'i'           Text
'f'           Text
'i'           Text
'c'           Text
'('           Punctuation
'm'           Text
'a'           Text
't'           Text
'c'           Text
'h'           Text
'e'           Text
's'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'b'           Text
'e'           Text
's'           Text
't'           Text
' '           Text
'!'           Operator
'='           Operator
' '           Text
'null'        Keyword.Constant
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'b'           Text
'e'           Text
's'           Text
't'           Text
'.'           Operator
'apply'       Name.Function
'('           Punctuation
'c'           Text
'a'           Text
'l'           Text
'l'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// zero or multiple ambiguous matches is a compiler error\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
's'           Name.Variable
' '           Text
':='          Operator
' '           Text
'S'           Text
't'           Text
'r'           Text
'B'           Text
'u'           Text
'f'           Text
'('           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
's'           Text
'.'           Operator
'add'         Name.Function
'('           Punctuation
'm'           Text
'a'           Text
't'           Text
'c'           Text
'h'           Text
'e'           Text
's'           Text
'.'           Operator
'isEmpty'     Name.Function
' '           Text
'?'           Text
' '           Text
'"'           Punctuation
'I'           Literal.String
'n'           Literal.String
'v'           Literal.String
'a'           Literal.String
'l'           Literal.String
'i'           Literal.String
'd'           Literal.String
' '           Literal.String
'a'           Literal.String
'r'           Literal.String
'g'           Literal.String
's'           Literal.String
' '           Literal.String
'"'           Punctuation
' '           Text
':'           Text
' '           Text
'"'           Punctuation
'A'           Literal.String
'm'           Literal.String
'b'           Literal.String
'i'           Literal.String
'g'           Literal.String
'u'           Literal.String
'o'           Literal.String
'u'           Literal.String
's'           Literal.String
' '           Literal.String
'c'           Literal.String
'a'           Literal.String
'l'           Literal.String
'l'           Literal.String
' '           Literal.String
'"'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
's'           Text
'.'           Operator
'add'         Name.Function
'('           Punctuation
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'name'        Name.Function
')'           Punctuation
'.'           Operator
'add'         Name.Function
'('           Punctuation
'"'           Punctuation
'('           Literal.String
'"'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
's'           Text
'.'           Operator
'add'         Name.Function
'('           Punctuation
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'args'        Name.Function
'.'           Operator
'join'        Name.Function
'('           Punctuation
'"'           Punctuation
','           Literal.String
' '           Literal.String
'"'           Punctuation
')'           Punctuation
' '           Text
'|'           Punctuation
'Expr'        Name.Class
' '           Text
'arg'         Name.Variable
'->'          Punctuation
'Str'         Name.Class
'|'           Punctuation
' '           Text
'{'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'a'           Text
'r'           Text
'g'           Text
'.'           Operator
'toTypeStr'   Name.Function
' '           Text
'}'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
's'           Text
'.'           Operator
'add'         Name.Function
'('           Punctuation
'"'           Punctuation
')'           Literal.String
'"'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'throw'       Keyword
' '           Text
'e'           Text
'r'           Text
'r'           Text
'('           Punctuation
's'           Text
'.'           Operator
'toStr'       Name.Function
','           Text
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'loc'         Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Check if the call matches the specified overload method.\n' Comment.Special

' '           Text
' '           Text
'** If so return method and coerced args otherwise return null.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'internal'    Keyword
' '           Text
'CallMatch'   Name.Class
'?'           Punctuation
' '           Text
'matchCall'   Name.Function
'('           Punctuation
'CallExpr'    Name.Class
' '           Text
'call'        Name.Variable
','           Punctuation
' '           Text
'CMethod'     Name.Class
' '           Text
'm'           Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// first check if have matching numbers of args and params\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'args'        Name.Variable
' '           Text
':='          Operator
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'args'        Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'm'           Text
'.'           Operator
'params'      Name.Function
'.'           Operator
'size'        Name.Function
' '           Text
'<'           Operator
' '           Text
'a'           Text
'r'           Text
'g'           Text
's'           Text
'.'           Operator
'size'        Name.Function
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'null'        Keyword.Constant
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// check if each argument is ok or can be coerced\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'isErr'       Name.Variable
' '           Text
':='          Operator
' '           Text
'false'       Keyword.Constant
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'newArgs'     Name.Variable
' '           Text
':='          Operator
' '           Text
'a'           Text
'r'           Text
'g'           Text
's'           Text
'.'           Operator
'dup'         Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'm'           Text
'.'           Operator
'params'      Name.Function
'.'           Operator
'each'        Name.Function
' '           Text
'|'           Punctuation
'CParam'      Name.Class
' '           Text
'p'           Name.Variable
','           Punctuation
' '           Text
'Int'         Name.Class
' '           Text
'i'           Name.Variable
'|'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'i'           Text
' '           Text
'>='          Operator
' '           Text
'a'           Text
'r'           Text
'g'           Text
's'           Text
'.'           Operator
'size'        Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'// param has a default value, then that is ok\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'p'           Text
'.'           Operator
'hasDefault'  Name.Function
')'           Punctuation
' '           Text
'i'           Text
's'           Text
'E'           Text
'r'           Text
'r'           Text
' '           Text
'='           Operator
' '           Text
'true'        Keyword.Constant
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'else'        Keyword
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'// ensure arg fits parameter type (or auto-cast)\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'n'           Text
'e'           Text
'w'           Text
'A'           Text
'r'           Text
'g'           Text
's'           Text
'['           Operator
'i'           Text
']'           Operator
' '           Text
'='           Operator
' '           Text
'c'           Text
'o'           Text
'e'           Text
'r'           Text
'c'           Text
'e'           Text
'('           Punctuation
'a'           Text
'r'           Text
'g'           Text
's'           Text
'['           Operator
'i'           Text
']'           Operator
','           Text
' '           Text
'p'           Text
'.'           Operator
'paramType'   Name.Function
')'           Punctuation
' '           Text
'|'           Text
'-'           Operator
'>'           Operator
'|'           Text
' '           Text
'{'           Punctuation
' '           Text
'i'           Text
's'           Text
'E'           Text
'r'           Text
'r'           Text
' '           Text
'='           Operator
' '           Text
'true'        Keyword.Constant
' '           Text
'}'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'i'           Text
's'           Text
'E'           Text
'r'           Text
'r'           Text
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'null'        Keyword.Constant
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'C'           Text
'a'           Text
'l'           Text
'l'           Text
'M'           Text
'a'           Text
't'           Text
'c'           Text
'h'           Text
' '           Text
'{'           Punctuation
' '           Text
'it'          Name.Builtin.Pseudo
'.'           Operator
'method'      Name.Function
' '           Text
'='           Operator
' '           Text
'm'           Text
';'           Text
' '           Text
'it'          Name.Builtin.Pseudo
'.'           Operator
'args'        Name.Function
' '           Text
'='           Operator
' '           Text
'n'           Text
'e'           Text
'w'           Text
'A'           Text
'r'           Text
'g'           Text
's'           Text
' '           Text
'}'           Punctuation
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Given a list of overloaed methods find the most specific method\n' Comment.Special

' '           Text
' '           Text
'** according to Java Language Specification 15.11.2.2.  The "informal\n' Comment.Special

' '           Text
' '           Text
'** intuition" rule is that a method is more specific than another\n' Comment.Special

' '           Text
' '           Text
'** if the first could be could be passed onto the second one.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'internal'    Keyword
' '           Text
'static'      Keyword
' '           Text
'CallMatch'   Name.Class
'?'           Punctuation
' '           Text
'resolveMostSpecific' Name.Function
'('           Punctuation
'CallMatch'   Name.Class
'['           Punctuation
']'           Punctuation
' '           Text
'matches'     Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'CallMatch'   Name.Class
'?'           Punctuation
' '           Text
'best'        Name.Variable
' '           Text
':='          Operator
' '           Text
'm'           Text
'a'           Text
't'           Text
'c'           Text
'h'           Text
'e'           Text
's'           Text
'['           Operator
'0'           Literal.Number.Integer
']'           Operator
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'for'         Keyword
' '           Text
'('           Punctuation
'i'           Name.Variable
':='          Operator
'1'           Literal.Number.Integer
';'           Text
' '           Text
'i'           Text
'<'           Operator
'm'           Text
'a'           Text
't'           Text
'c'           Text
'h'           Text
'e'           Text
's'           Text
'.'           Operator
'size'        Name.Function
';'           Text
' '           Text
'++'          Operator
'i'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'x'           Name.Variable
' '           Text
':='          Operator
' '           Text
'm'           Text
'a'           Text
't'           Text
'c'           Text
'h'           Text
'e'           Text
's'           Text
'['           Operator
'i'           Text
']'           Operator
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'i'           Text
's'           Text
'M'           Text
'o'           Text
'r'           Text
'e'           Text
'S'           Text
'p'           Text
'e'           Text
'c'           Text
'i'           Text
'f'           Text
'i'           Text
'c'           Text
'('           Punctuation
'b'           Text
'e'           Text
's'           Text
't'           Text
','           Text
' '           Text
'x'           Text
')'           Punctuation
')'           Punctuation
' '           Text
'{'           Punctuation
' '           Text
'continue'    Keyword
' '           Text
'}'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'i'           Text
's'           Text
'M'           Text
'o'           Text
'r'           Text
'e'           Text
'S'           Text
'p'           Text
'e'           Text
'c'           Text
'i'           Text
'f'           Text
'i'           Text
'c'           Text
'('           Punctuation
'x'           Text
','           Text
' '           Text
'b'           Text
'e'           Text
's'           Text
't'           Text
')'           Punctuation
')'           Punctuation
' '           Text
'{'           Punctuation
' '           Text
'b'           Text
'e'           Text
's'           Text
't'           Text
' '           Text
'='           Operator
' '           Text
'x'           Text
';'           Text
' '           Text
'continue'    Keyword
' '           Text
'}'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'null'        Keyword.Constant
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'b'           Text
'e'           Text
's'           Text
't'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
"** Is 'a' more specific than 'b' such that 'a' could be used\n" Comment.Special

' '           Text
' '           Text
"** passed to 'b' without a compile time error.\n" Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'internal'    Keyword
' '           Text
'static'      Keyword
' '           Text
'Bool'        Name.Class
' '           Text
'isMoreSpecific' Name.Function
'('           Punctuation
'CallMatch'   Name.Class
' '           Text
'a'           Name.Variable
','           Punctuation
' '           Text
'CallMatch'   Name.Class
' '           Text
'b'           Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'a'           Text
'.'           Operator
'method'      Name.Function
'.'           Operator
'params'      Name.Function
'.'           Operator
'all'         Name.Function
' '           Text
'|'           Punctuation
'CParam'      Name.Class
' '           Text
'ap'          Name.Variable
','           Punctuation
' '           Text
'Int'         Name.Class
' '           Text
'i'           Name.Variable
'->'          Punctuation
'Bool'        Name.Class
'|'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'bp'          Name.Variable
' '           Text
':='          Operator
' '           Text
'b'           Text
'.'           Operator
'method'      Name.Function
'.'           Operator
'params'      Name.Function
'['           Operator
'i'           Text
']'           Operator
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'a'           Text
'p'           Text
'.'           Operator
'paramType'   Name.Function
'.'           Operator
'fits'        Name.Function
'('           Punctuation
'b'           Text
'p'           Text
'.'           Operator
'paramType'   Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

'//////////////////////////////////////////////////////////////////////////\n' Comment.Single

'// Overrides\n' Comment.Single

'//////////////////////////////////////////////////////////////////////////\n' Comment.Single

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Called during Inherit step when a Fantom slot overrides a FFI slot.\n' Comment.Special

' '           Text
' '           Text
'** Log and throw compiler error if there is a problem.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'override'    Keyword
' '           Text
'Void'        Name.Class
' '           Text
'checkOverride' Name.Function
'('           Punctuation
'TypeDef'     Name.Class
' '           Text
't'           Name.Variable
','           Punctuation
' '           Text
'CSlot'       Name.Class
' '           Text
'base'        Name.Variable
','           Punctuation
' '           Text
'SlotDef'     Name.Class
' '           Text
'def'         Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
"// we don't allow Fantom to override Java methods with multiple\n" Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
"// overloaded versions since the Fantom type system can't actually\n" Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// override all the overloaded versions\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'jslot'       Name.Variable
' '           Text
':='          Operator
' '           Text
'base'        Name.Class
' '           Text
'as'          Name.Variable
' '           Text
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'S'           Text
'l'           Text
'o'           Text
't'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'j'           Text
's'           Text
'l'           Text
'o'           Text
't'           Text
'?'           Text
'.'           Operator
'next'        Name.Function
' '           Text
'!'           Operator
'='           Operator
' '           Text
'null'        Keyword.Constant
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'throw'       Keyword
' '           Text
'e'           Text
'r'           Text
'r'           Text
'('           Punctuation
'"'           Punctuation
'C'           Literal.String
'a'           Literal.String
'n'           Literal.String
'n'           Literal.String
'o'           Literal.String
't'           Literal.String
' '           Literal.String
'o'           Literal.String
'v'           Literal.String
'e'           Literal.String
'r'           Literal.String
'r'           Literal.String
'i'           Literal.String
'd'           Literal.String
'e'           Literal.String
' '           Literal.String
'J'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
' '           Literal.String
'o'           Literal.String
'v'           Literal.String
'e'           Literal.String
'r'           Literal.String
'l'           Literal.String
'o'           Literal.String
'a'           Literal.String
'd'           Literal.String
'e'           Literal.String
'd'           Literal.String
' '           Literal.String
'm'           Literal.String
'e'           Literal.String
't'           Literal.String
'h'           Literal.String
'o'           Literal.String
'd'           Literal.String
':'           Literal.String
' '           Literal.String
"'"           Literal.String
'$jslot'      Literal.String.Interpol
'.'           Literal.String
'n'           Literal.String
'a'           Literal.String
'm'           Literal.String
'e'           Literal.String
"'"           Literal.String
'"'           Punctuation
','           Text
' '           Text
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'loc'         Name.Function
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// route to method override checking\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'base'        Name.Class
' '           Text
'is'          Name.Variable
' '           Text
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'M'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
' '           Text
'&&'          Operator
' '           Text
'def'         Name.Class
' '           Text
'is'          Name.Variable
' '           Text
'M'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'D'           Text
'e'           Text
'f'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'h'           Text
'e'           Text
'c'           Text
'k'           Text
'M'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'O'           Text
'v'           Text
'e'           Text
'r'           Text
'r'           Text
'i'           Text
'd'           Text
'e'           Text
'('           Punctuation
't'           Text
','           Text
' '           Text
'b'           Text
'a'           Text
's'           Text
'e'           Text
','           Text
' '           Text
'd'           Text
'e'           Text
'f'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Called on method/method overrides in the checkOverride callback.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'private'     Keyword
' '           Text
'Void'        Name.Class
' '           Text
'checkMethodOverride' Name.Function
'('           Punctuation
'TypeDef'     Name.Class
' '           Text
't'           Name.Variable
','           Punctuation
' '           Text
'JavaMethod'  Name.Class
' '           Text
'base'        Name.Variable
','           Punctuation
' '           Text
'MethodDef'   Name.Class
' '           Text
'def'         Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
"// bail early if we know things aren't going to work out\n" Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'b'           Text
'a'           Text
's'           Text
'e'           Text
'.'           Operator
'params'      Name.Function
'.'           Operator
'size'        Name.Function
' '           Text
'!'           Operator
'='           Operator
' '           Text
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'params'      Name.Function
'.'           Operator
'size'        Name.Function
')'           Punctuation
' '           Text
'return'      Keyword
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// if the return type is primitive or Java array and the\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// Fantom declaration matches how it is inferred into the Fan\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// type system, then just change the return type - the compiler\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// will impliclty do all the return coercions\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'i'           Text
's'           Text
'O'           Text
'v'           Text
'e'           Text
'r'           Text
'r'           Text
'i'           Text
'd'           Text
'e'           Text
'I'           Text
'n'           Text
'f'           Text
'e'           Text
'r'           Text
'r'           Text
'e'           Text
'd'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'('           Punctuation
'b'           Text
'a'           Text
's'           Text
'e'           Text
'.'           Operator
'returnType'  Name.Function
','           Text
' '           Text
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'returnType'  Name.Function
')'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'ret'         Name.Function
' '           Text
'='           Operator
' '           Text
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'inheritedRet' Name.Function
' '           Text
'='           Operator
' '           Text
'b'           Text
'a'           Text
's'           Text
'e'           Text
'.'           Operator
'returnType'  Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// if any of the parameters is a primitive or Java array\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// and the Fantom declaration matches how it is inferred into\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// the Fantom type type, then change the parameter type to\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// the Java override type and make the Fantom type a local\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// variable:\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'//   Java:   void foo(int a) { ... }\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'//   Fantom: Void foo(Int a) { ... }\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'//   Result: Void foo(int a_$J) { Int a := a_$J; ... }\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'//\n'        Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'b'           Text
'a'           Text
's'           Text
'e'           Text
'.'           Operator
'params'      Name.Function
'.'           Operator
'eachr'       Name.Function
' '           Text
'|'           Punctuation
'CParam'      Name.Class
' '           Text
'bp'          Name.Variable
','           Punctuation
' '           Text
'Int'         Name.Class
' '           Text
'i'           Name.Variable
'|'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'dp'          Name.Variable
' '           Text
':='          Operator
' '           Text
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'paramDefs'   Name.Function
'['           Operator
'i'           Text
']'           Operator
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'i'           Text
's'           Text
'O'           Text
'v'           Text
'e'           Text
'r'           Text
'r'           Text
'i'           Text
'd'           Text
'e'           Text
'I'           Text
'n'           Text
'f'           Text
'e'           Text
'r'           Text
'r'           Text
'e'           Text
'd'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'('           Punctuation
'b'           Text
'p'           Text
'.'           Operator
'paramType'   Name.Function
','           Text
' '           Text
'd'           Text
'p'           Text
'.'           Operator
'paramType'   Name.Function
')'           Punctuation
')'           Punctuation
' '           Text
'return'      Keyword
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'// add local variable: Int bar := bar_$J\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'local'       Name.Variable
' '           Text
':='          Operator
' '           Text
'L'           Text
'o'           Text
'c'           Text
'a'           Text
'l'           Text
'D'           Text
'e'           Text
'f'           Text
'S'           Text
't'           Text
'm'           Text
't'           Text
'('           Punctuation
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'loc'         Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'l'           Text
'o'           Text
'c'           Text
'a'           Text
'l'           Text
'.'           Operator
'ctype'       Name.Function
' '           Text
'='           Operator
' '           Text
'd'           Text
'p'           Text
'.'           Operator
'paramType'   Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'l'           Text
'o'           Text
'c'           Text
'a'           Text
'l'           Text
'.'           Operator
'name'        Name.Function
' '           Text
' '           Text
'='           Operator
' '           Text
'd'           Text
'p'           Text
'.'           Operator
'name'        Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'l'           Text
'o'           Text
'c'           Text
'a'           Text
'l'           Text
'.'           Operator
'init'        Name.Function
' '           Text
' '           Text
'='           Operator
' '           Text
'U'           Text
'n'           Text
'k'           Text
'n'           Text
'o'           Text
'w'           Text
'n'           Text
'V'           Text
'a'           Text
'r'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'('           Punctuation
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'loc'         Name.Function
','           Text
' '           Text
'null'        Keyword.Constant
','           Text
' '           Text
'd'           Text
'p'           Text
'.'           Operator
'name'        Name.Function
' '           Text
'+'           Operator
' '           Text
'"'           Punctuation
'_'           Literal.String
'\\'          Literal.String
'$J'          Literal.String.Interpol
'"'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'code'        Name.Function
'.'           Operator
'stmts'       Name.Function
'.'           Operator
'insert'      Name.Function
'('           Punctuation
'0'           Literal.Number.Integer
','           Text
' '           Text
'l'           Text
'o'           Text
'c'           Text
'a'           Text
'l'           Text
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'// rename parameter Int bar -> int bar_$J\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'd'           Text
'p'           Text
'.'           Operator
'name'        Name.Function
' '           Text
'='           Operator
' '           Text
'd'           Text
'p'           Text
'.'           Operator
'name'        Name.Function
' '           Text
'+'           Operator
' '           Text
'"'           Punctuation
'_'           Literal.String
'\\'          Literal.String
'$J'          Literal.String.Interpol
'"'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'd'           Text
'p'           Text
'.'           Operator
'paramType'   Name.Function
' '           Text
'='           Operator
' '           Text
'b'           Text
'p'           Text
'.'           Operator
'paramType'   Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** When overriding a Java method check if the base type is\n' Comment.Special

' '           Text
' '           Text
'** is a Java primitive or array and the override definition is\n' Comment.Special

' '           Text
' '           Text
'** matches how the Java type is inferred in the Fantom type system.\n' Comment.Special

' '           Text
' '           Text
"** If we have a match return true and we'll swizzle things in\n" Comment.Special

' '           Text
' '           Text
'** checkMethodOverride.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'static'      Keyword
' '           Text
'private'     Keyword
' '           Text
'Bool'        Name.Class
' '           Text
'isOverrideInferredType' Name.Function
'('           Punctuation
'CType'       Name.Class
' '           Text
'base'        Name.Variable
','           Punctuation
' '           Text
'CType'       Name.Class
' '           Text
'def'         Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// check if base class slot is a JavaType\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'java'        Name.Variable
' '           Text
':='          Operator
' '           Text
'b'           Text
'a'           Text
's'           Text
'e'           Text
'.'           Operator
'toNonNullable' Name.Function
' '           Text
'as'          Keyword
' '           Text
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'j'           Text
'a'           Text
'v'           Text
'a'           Text
' '           Text
'!'           Operator
'='           Operator
' '           Text
'null'        Keyword.Constant
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'// allow primitives is it matches the inferred type\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'j'           Text
'a'           Text
'v'           Text
'a'           Text
'.'           Operator
'isPrimitive' Name.Function
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'j'           Text
'a'           Text
'v'           Text
'a'           Text
'.'           Operator
'inferredAs'  Name.Function
' '           Text
'='           Operator
'='           Operator
' '           Text
'd'           Text
'e'           Text
'f'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'// allow arrays if mapped as Foo[] -> Foo?[]?\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'j'           Text
'a'           Text
'v'           Text
'a'           Text
'.'           Operator
'isArray'     Name.Function
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'j'           Text
'a'           Text
'v'           Text
'a'           Text
'.'           Operator
'inferredAs'  Name.Function
' '           Text
'='           Operator
'='           Operator
' '           Text
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'toNonNullable' Name.Function
' '           Text
'&&'          Operator
' '           Text
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'isNullable'  Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'false'       Keyword.Constant
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

'//////////////////////////////////////////////////////////////////////////\n' Comment.Single

'// CheckErrors\n' Comment.Single

'//////////////////////////////////////////////////////////////////////////\n' Comment.Single

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Called during CheckErrors step for a type which extends\n' Comment.Special

' '           Text
' '           Text
'** a FFI class or implements any FFI mixins.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'override'    Keyword
' '           Text
'Void'        Name.Class
' '           Text
'checkType'   Name.Function
'('           Punctuation
'TypeDef'     Name.Class
' '           Text
'def'         Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
"// can't subclass a primitive array like ByteArray/byte[]\n" Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'base'        Name.Function
'.'           Operator
'deref'       Name.Function
' '           Text
'is'          Keyword
' '           Text
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
' '           Text
'&&'          Operator
' '           Text
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'base'        Name.Function
'.'           Operator
'deref'       Name.Function
'-'           Operator
'>'           Operator
'i'           Text
's'           Text
'I'           Text
'n'           Text
't'           Text
'e'           Text
'r'           Text
'o'           Text
'p'           Text
'A'           Text
'r'           Text
'r'           Text
'a'           Text
'y'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'e'           Text
'r'           Text
'r'           Text
'('           Punctuation
'"'           Punctuation
'C'           Literal.String
'a'           Literal.String
'n'           Literal.String
'n'           Literal.String
'o'           Literal.String
't'           Literal.String
' '           Literal.String
's'           Literal.String
'u'           Literal.String
'b'           Literal.String
'c'           Literal.String
'l'           Literal.String
'a'           Literal.String
's'           Literal.String
's'           Literal.String
' '           Literal.String
'f'           Literal.String
'r'           Literal.String
'o'           Literal.String
'm'           Literal.String
' '           Literal.String
'J'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
' '           Literal.String
'i'           Literal.String
'n'           Literal.String
't'           Literal.String
'e'           Literal.String
'r'           Literal.String
'o'           Literal.String
'p'           Literal.String
' '           Literal.String
'a'           Literal.String
'r'           Literal.String
'r'           Literal.String
'a'           Literal.String
'y'           Literal.String
':'           Literal.String
' '           Literal.String
'$def'        Literal.String.Interpol
'.'           Literal.String
'b'           Literal.String
'a'           Literal.String
's'           Literal.String
'e'           Literal.String
'"'           Punctuation
','           Text
' '           Text
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'loc'         Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
"// we don't allow deep inheritance of Java classes because\n" Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
"// the Fantom constructor and Java constructor model don't match\n" Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// up past one level of inheritance\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// NOTE: that that when we remove this restriction we need to\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// test how field initialization works because instance$init\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// is almost certain to break with the current emit design\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'javaBase'    Name.Variable
' '           Text
':='          Operator
' '           Text
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'base'        Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'while'       Keyword
' '           Text
'('           Punctuation
'j'           Text
'a'           Text
'v'           Text
'a'           Text
'B'           Text
'a'           Text
's'           Text
'e'           Text
' '           Text
'!'           Operator
'='           Operator
' '           Text
'null'        Keyword.Constant
' '           Text
'&&'          Operator
' '           Text
'!'           Operator
'j'           Text
'a'           Text
'v'           Text
'a'           Text
'B'           Text
'a'           Text
's'           Text
'e'           Text
'.'           Operator
'isForeign'   Name.Function
')'           Punctuation
' '           Text
'j'           Text
'a'           Text
'v'           Text
'a'           Text
'B'           Text
'a'           Text
's'           Text
'e'           Text
' '           Text
'='           Operator
' '           Text
'j'           Text
'a'           Text
'v'           Text
'a'           Text
'B'           Text
'a'           Text
's'           Text
'e'           Text
'.'           Operator
'base'        Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'j'           Text
'a'           Text
'v'           Text
'a'           Text
'B'           Text
'a'           Text
's'           Text
'e'           Text
' '           Text
'!'           Operator
'='           Operator
' '           Text
'null'        Keyword.Constant
' '           Text
'&&'          Operator
' '           Text
'j'           Text
'a'           Text
'v'           Text
'a'           Text
'B'           Text
'a'           Text
's'           Text
'e'           Text
' '           Text
'!'           Operator
'='           Operator
'='           Operator
' '           Text
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'base'        Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'e'           Text
'r'           Text
'r'           Text
'('           Punctuation
'"'           Punctuation
'C'           Literal.String
'a'           Literal.String
'n'           Literal.String
'n'           Literal.String
'o'           Literal.String
't'           Literal.String
' '           Literal.String
's'           Literal.String
'u'           Literal.String
'b'           Literal.String
'c'           Literal.String
'l'           Literal.String
'a'           Literal.String
's'           Literal.String
's'           Literal.String
' '           Literal.String
'J'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
' '           Literal.String
'c'           Literal.String
'l'           Literal.String
'a'           Literal.String
's'           Literal.String
's'           Literal.String
' '           Literal.String
'm'           Literal.String
'o'           Literal.String
'r'           Literal.String
'e'           Literal.String
' '           Literal.String
't'           Literal.String
'h'           Literal.String
'a'           Literal.String
'n'           Literal.String
' '           Literal.String
'o'           Literal.String
'n'           Literal.String
'e'           Literal.String
' '           Literal.String
'l'           Literal.String
'e'           Literal.String
'v'           Literal.String
'e'           Literal.String
'l'           Literal.String
':'           Literal.String
' '           Literal.String
'$javaBase'   Literal.String.Interpol
'"'           Punctuation
','           Text
' '           Text
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'loc'         Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// ensure that when we map Fantom constructors to Java\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
"// constructors that we don't have duplicate signatures\n" Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'ctors'       Name.Variable
' '           Text
':='          Operator
' '           Text
'd'           Text
'e'           Text
'f'           Text
'.'           Operator
'ctorDefs'    Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
't'           Text
'o'           Text
'r'           Text
's'           Text
'.'           Operator
'each'        Name.Function
' '           Text
'|'           Punctuation
'MethodDef'   Name.Class
' '           Text
'a'           Name.Variable
','           Punctuation
' '           Text
'Int'         Name.Class
' '           Text
'i'           Name.Variable
'|'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
't'           Text
'o'           Text
'r'           Text
's'           Text
'.'           Operator
'each'        Name.Function
' '           Text
'|'           Punctuation
'MethodDef'   Name.Class
' '           Text
'b'           Name.Variable
','           Punctuation
' '           Text
'Int'         Name.Class
' '           Text
'j'           Name.Variable
'|'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'i'           Text
' '           Text
'>'           Operator
' '           Text
'j'           Text
' '           Text
'&&'          Operator
' '           Text
'a'           Text
'r'           Text
'e'           Text
'P'           Text
'a'           Text
'r'           Text
'a'           Text
'm'           Text
's'           Text
'S'           Text
'a'           Text
'm'           Text
'e'           Text
'('           Punctuation
'a'           Text
','           Text
' '           Text
'b'           Text
')'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'e'           Text
'r'           Text
'r'           Text
'('           Punctuation
'"'           Punctuation
'D'           Literal.String
'u'           Literal.String
'p'           Literal.String
'l'           Literal.String
'i'           Literal.String
'c'           Literal.String
'a'           Literal.String
't'           Literal.String
'e'           Literal.String
' '           Literal.String
'J'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
' '           Literal.String
'F'           Literal.String
'F'           Literal.String
'I'           Literal.String
' '           Literal.String
'c'           Literal.String
'o'           Literal.String
'n'           Literal.String
's'           Literal.String
't'           Literal.String
'r'           Literal.String
'u'           Literal.String
'c'           Literal.String
't'           Literal.String
'o'           Literal.String
'r'           Literal.String
' '           Literal.String
's'           Literal.String
'i'           Literal.String
'g'           Literal.String
'n'           Literal.String
'a'           Literal.String
't'           Literal.String
'u'           Literal.String
'r'           Literal.String
'e'           Literal.String
's'           Literal.String
':'           Literal.String
' '           Literal.String
"'"           Literal.String
'$b'          Literal.String.Interpol
'.'           Literal.String
'n'           Literal.String
'a'           Literal.String
'm'           Literal.String
'e'           Literal.String
"'"           Literal.String
' '           Literal.String
'a'           Literal.String
'n'           Literal.String
'd'           Literal.String
' '           Literal.String
"'"           Literal.String
'$a'          Literal.String.Interpol
'.'           Literal.String
'n'           Literal.String
'a'           Literal.String
'm'           Literal.String
'e'           Literal.String
"'"           Literal.String
'"'           Punctuation
','           Text
' '           Text
'a'           Text
'.'           Operator
'loc'         Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Do the two methods have the exact same parameter types.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'static'      Keyword
' '           Text
'Bool'        Name.Class
' '           Text
'areParamsSame' Name.Function
'('           Punctuation
'CMethod'     Name.Class
' '           Text
'a'           Name.Variable
','           Punctuation
' '           Text
'CMethod'     Name.Class
' '           Text
'b'           Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'.'           Operator
'params'      Name.Function
'.'           Operator
'size'        Name.Function
' '           Text
'!'           Operator
'='           Operator
' '           Text
'b'           Text
'.'           Operator
'params'      Name.Function
'.'           Operator
'size'        Name.Function
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'false'       Keyword.Constant
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'for'         Keyword
' '           Text
'('           Punctuation
'i'           Name.Variable
':='          Operator
'0'           Literal.Number.Integer
';'           Text
' '           Text
'i'           Text
'<'           Operator
'a'           Text
'.'           Operator
'params'      Name.Function
'.'           Operator
'size'        Name.Function
';'           Text
' '           Text
'++'          Operator
'i'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'.'           Operator
'params'      Name.Function
'['           Operator
'i'           Text
']'           Operator
'.'           Operator
'paramType'   Name.Function
' '           Text
'!'           Operator
'='           Operator
' '           Text
'b'           Text
'.'           Operator
'params'      Name.Function
'['           Operator
'i'           Text
']'           Operator
'.'           Operator
'paramType'   Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'false'       Keyword.Constant
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'true'        Keyword.Constant
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

'//////////////////////////////////////////////////////////////////////////\n' Comment.Single

'// Coercion\n' Comment.Single

'//////////////////////////////////////////////////////////////////////////\n' Comment.Single

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Return if we can make the actual type fit the expected\n' Comment.Special

' '           Text
' '           Text
'** type, potentially using a coercion.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'Bool'        Name.Class
' '           Text
'fits'        Name.Function
'('           Punctuation
'CType'       Name.Class
' '           Text
'actual'      Name.Variable
','           Punctuation
' '           Text
'CType'       Name.Class
' '           Text
'expected'    Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// use dummy expression and route to coerce code\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'dummy'       Name.Variable
' '           Text
':='          Operator
' '           Text
'U'           Text
'n'           Text
'k'           Text
'n'           Text
'o'           Text
'w'           Text
'n'           Text
'V'           Text
'a'           Text
'r'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'('           Punctuation
'L'           Text
'o'           Text
'c'           Text
'('           Punctuation
'"'           Punctuation
'd'           Literal.String
'u'           Literal.String
'm'           Literal.String
'm'           Literal.String
'y'           Literal.String
'"'           Punctuation
')'           Punctuation
','           Text
' '           Text
'null'        Keyword.Constant
','           Text
' '           Text
'"'           Punctuation
'd'           Literal.String
'u'           Literal.String
'm'           Literal.String
'm'           Literal.String
'y'           Literal.String
'"'           Punctuation
')'           Punctuation
' '           Text
'{'           Punctuation
' '           Text
'c'           Text
't'           Text
'y'           Text
'p'           Text
'e'           Text
' '           Text
'='           Operator
' '           Text
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
' '           Text
'}'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'fits'        Name.Variable
' '           Text
':='          Operator
' '           Text
'true'        Keyword.Constant
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'o'           Text
'e'           Text
'r'           Text
'c'           Text
'e'           Text
'('           Punctuation
'd'           Text
'u'           Text
'm'           Text
'm'           Text
'y'           Text
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
')'           Punctuation
' '           Text
'|'           Text
'-'           Operator
'>'           Operator
'|'           Text
' '           Text
'{'           Punctuation
' '           Text
'f'           Text
'i'           Text
't'           Text
's'           Text
'='           Operator
'false'       Keyword.Constant
' '           Text
'}'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'f'           Text
'i'           Text
't'           Text
's'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Coerce expression to expected type.  If not a type match\n' Comment.Special

' '           Text
' '           Text
'** then run the onErr function.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'override'    Keyword
' '           Text
'Expr'        Name.Class
' '           Text
'coerce'      Name.Function
'('           Punctuation
'Expr'        Name.Class
' '           Text
'expr'        Name.Variable
','           Punctuation
' '           Text
'CType'       Name.Class
' '           Text
'expected'    Name.Variable
','           Punctuation
' '           Text
'|'           Punctuation
'-'           Punctuation
'>'           Punctuation
'|'           Punctuation
' '           Text
'onErr'       Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// handle easy case\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'actual'      Name.Variable
' '           Text
':='          Operator
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'ctype'       Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
' '           Text
'='           Operator
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'deref'       Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
' '           Text
'='           Operator
'='           Operator
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// handle null literal\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'id'          Name.Function
' '           Text
'='           Operator
'='           Operator
'='           Operator
' '           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'I'           Text
'd'           Text
'.'           Operator
'nullLiteral' Name.Function
' '           Text
'&&'          Operator
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'isNullable'  Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// handle Fantom to Java primitives\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'pod'         Name.Function
' '           Text
'='           Operator
'='           Operator
' '           Text
'p'           Text
'r'           Text
'i'           Text
'm'           Text
'i'           Text
't'           Text
'i'           Text
'v'           Text
'e'           Text
's'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'c'           Text
'o'           Text
'e'           Text
'r'           Text
'c'           Text
'e'           Text
'T'           Text
'o'           Text
'P'           Text
'r'           Text
'i'           Text
'm'           Text
'i'           Text
't'           Text
'i'           Text
'v'           Text
'e'           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
','           Text
' '           Text
'o'           Text
'n'           Text
'E'           Text
'r'           Text
'r'           Text
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// handle Java primitives to Fan\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
'.'           Operator
'pod'         Name.Function
' '           Text
'='           Operator
'='           Operator
' '           Text
'p'           Text
'r'           Text
'i'           Text
'm'           Text
'i'           Text
't'           Text
'i'           Text
'v'           Text
'e'           Text
's'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'c'           Text
'o'           Text
'e'           Text
'r'           Text
'c'           Text
'e'           Text
'F'           Text
'r'           Text
'o'           Text
'm'           Text
'P'           Text
'r'           Text
'i'           Text
'm'           Text
'i'           Text
't'           Text
'i'           Text
'v'           Text
'e'           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
','           Text
' '           Text
'o'           Text
'n'           Text
'E'           Text
'r'           Text
'r'           Text
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// handle Java array to Fantom list\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
'.'           Operator
'name'        Name.Function
'['           Operator
'0'           Literal.Number.Integer
']'           Operator
' '           Text
'='           Operator
'='           Operator
' '           Text
"'['"         Literal.String.Char
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'c'           Text
'o'           Text
'e'           Text
'r'           Text
'c'           Text
'e'           Text
'F'           Text
'r'           Text
'o'           Text
'm'           Text
'A'           Text
'r'           Text
'r'           Text
'a'           Text
'y'           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
','           Text
' '           Text
'o'           Text
'n'           Text
'E'           Text
'r'           Text
'r'           Text
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// handle Fantom list to Java array\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'name'        Name.Function
'['           Operator
'0'           Literal.Number.Integer
']'           Operator
' '           Text
'='           Operator
'='           Operator
' '           Text
"'['"         Literal.String.Char
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'c'           Text
'o'           Text
'e'           Text
'r'           Text
'c'           Text
'e'           Text
'T'           Text
'o'           Text
'A'           Text
'r'           Text
'r'           Text
'a'           Text
'y'           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
','           Text
' '           Text
'o'           Text
'n'           Text
'E'           Text
'r'           Text
'r'           Text
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// handle sys::Func -> Java interface\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'actual'      Name.Class
' '           Text
'is'          Name.Variable
' '           Text
'F'           Text
'u'           Text
'n'           Text
'c'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
' '           Text
'&&'          Operator
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'isMixin'     Name.Function
' '           Text
'&&'          Operator
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'toNonNullable' Name.Function
' '           Text
'is'          Keyword
' '           Text
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'c'           Text
'o'           Text
'e'           Text
'r'           Text
'c'           Text
'e'           Text
'F'           Text
'u'           Text
'n'           Text
'c'           Text
'T'           Text
'o'           Text
'I'           Text
'n'           Text
't'           Text
'e'           Text
'r'           Text
'f'           Text
'a'           Text
'c'           Text
'e'           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'toNonNullable' Name.Function
','           Text
' '           Text
'o'           Text
'n'           Text
'E'           Text
'r'           Text
'r'           Text
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// handle special classes and interfaces for built-in Fantom\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// classes which actually map directly to Java built-in types\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
'.'           Operator
'isBool'      Name.Function
' '           Text
' '           Text
' '           Text
' '           Text
'&&'          Operator
' '           Text
'b'           Text
'o'           Text
'o'           Text
'l'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
's'           Text
'.'           Operator
'contains'    Name.Function
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'toNonNullable' Name.Function
'.'           Operator
'signature'   Name.Function
')'           Punctuation
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'b'           Text
'o'           Text
'x'           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
'.'           Operator
'isInt'       Name.Function
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'&&'          Operator
' '           Text
'i'           Text
'n'           Text
't'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
's'           Text
'.'           Operator
'contains'    Name.Function
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'toNonNullable' Name.Function
'.'           Operator
'signature'   Name.Function
')'           Punctuation
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'b'           Text
'o'           Text
'x'           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
'.'           Operator
'isFloat'     Name.Function
' '           Text
' '           Text
' '           Text
'&&'          Operator
' '           Text
'f'           Text
'l'           Text
'o'           Text
'a'           Text
't'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
's'           Text
'.'           Operator
'contains'    Name.Function
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'toNonNullable' Name.Function
'.'           Operator
'signature'   Name.Function
')'           Punctuation
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'b'           Text
'o'           Text
'x'           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
'.'           Operator
'isDecimal'   Name.Function
' '           Text
'&&'          Operator
' '           Text
'd'           Text
'e'           Text
'c'           Text
'i'           Text
'm'           Text
'a'           Text
'l'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
's'           Text
'.'           Operator
'contains'    Name.Function
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'toNonNullable' Name.Function
'.'           Operator
'signature'   Name.Function
')'           Punctuation
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
'.'           Operator
'isStr'       Name.Function
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'&&'          Operator
' '           Text
's'           Text
't'           Text
'r'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
's'           Text
'.'           Operator
'contains'    Name.Function
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'toNonNullable' Name.Function
'.'           Operator
'signature'   Name.Function
')'           Punctuation
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'// use normal Fantom coercion behavior\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'super'       Name.Builtin.Pseudo
'.'           Operator
'coerce'      Name.Function
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
','           Text
' '           Text
'o'           Text
'n'           Text
'E'           Text
'r'           Text
'r'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Ensure value type is boxed.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'private'     Keyword
' '           Text
'Expr'        Name.Class
' '           Text
'box'         Name.Function
'('           Punctuation
'Expr'        Name.Class
' '           Text
'expr'        Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'ctype'       Name.Function
'.'           Operator
'isVal'       Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'C'           Text
'h'           Text
'e'           Text
'c'           Text
'k'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'coerce'      Name.Function
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'ctype'       Name.Function
'.'           Operator
'toNullable'  Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'else'        Keyword
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Coerce a fan expression to a Java primitive (other\n' Comment.Special

' '           Text
' '           Text
'** than the ones we support natively)\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'Expr'        Name.Class
' '           Text
'coerceToPrimitive' Name.Function
'('           Punctuation
'Expr'        Name.Class
' '           Text
'expr'        Name.Variable
','           Punctuation
' '           Text
'JavaType'    Name.Class
' '           Text
'expected'    Name.Variable
','           Punctuation
' '           Text
'|'           Punctuation
'-'           Punctuation
'>'           Punctuation
'|'           Punctuation
' '           Text
'onErr'       Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'actual'      Name.Variable
' '           Text
':='          Operator
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'ctype'       Name.Function
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// sys::Int (long) -> int, short, byte\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
'.'           Operator
'isInt'       Name.Function
' '           Text
'&&'          Operator
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'isPrimitiveIntLike' Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'C'           Text
'h'           Text
'e'           Text
'c'           Text
'k'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'coerce'      Name.Function
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// sys::Float (double) -> float\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
'.'           Operator
'isFloat'     Name.Function
' '           Text
'&&'          Operator
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'isPrimitiveFloat' Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'C'           Text
'h'           Text
'e'           Text
'c'           Text
'k'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'coerce'      Name.Function
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// no coercion - type error\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'o'           Text
'n'           Text
'E'           Text
'r'           Text
'r'           Text
'('           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Coerce a Java primitive to a Fantom type.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'Expr'        Name.Class
' '           Text
'coerceFromPrimitive' Name.Function
'('           Punctuation
'Expr'        Name.Class
' '           Text
'expr'        Name.Variable
','           Punctuation
' '           Text
'CType'       Name.Class
' '           Text
'expected'    Name.Variable
','           Punctuation
' '           Text
'|'           Punctuation
'-'           Punctuation
'>'           Punctuation
'|'           Punctuation
' '           Text
'onErr'       Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'actual'      Name.Variable
' '           Text
':='          Operator
' '           Text
'('           Punctuation
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
')'           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'ctype'       Name.Function
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// int, short, byte -> sys::Int (long)\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
'.'           Operator
'isPrimitiveIntLike' Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'isInt'       Name.Function
' '           Text
'||'          Operator
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'isObj'       Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'C'           Text
'h'           Text
'e'           Text
'c'           Text
'k'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'coerce'      Name.Function
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// float -> sys::Float (float)\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
'.'           Operator
'isPrimitiveFloat' Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'isFloat'     Name.Function
' '           Text
'||'          Operator
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'isObj'       Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'C'           Text
'h'           Text
'e'           Text
'c'           Text
'k'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'coerce'      Name.Function
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// no coercion - type error\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'o'           Text
'n'           Text
'E'           Text
'r'           Text
'r'           Text
'('           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Coerce a Java array to a Fantom list.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'Expr'        Name.Class
' '           Text
'coerceFromArray' Name.Function
'('           Punctuation
'Expr'        Name.Class
' '           Text
'expr'        Name.Variable
','           Punctuation
' '           Text
'CType'       Name.Class
' '           Text
'expected'    Name.Variable
','           Punctuation
' '           Text
'|'           Punctuation
'-'           Punctuation
'>'           Punctuation
'|'           Punctuation
' '           Text
'onErr'       Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'actual'      Name.Variable
' '           Text
':='          Operator
' '           Text
'('           Punctuation
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
')'           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'ctype'       Name.Function
'.'           Operator
'toNonNullable' Name.Function
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// if expected is array type\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'expected'    Name.Class
' '           Text
'is'          Name.Variable
' '           Text
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
' '           Text
'&&'          Operator
' '           Text
'('           Punctuation
'('           Punctuation
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
')'           Punctuation
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
')'           Punctuation
'.'           Operator
'isArray'     Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
'.'           Operator
'arrayOf'     Name.Function
'.'           Operator
'fits'        Name.Function
'('           Punctuation
'('           Punctuation
'('           Punctuation
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
')'           Punctuation
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
')'           Punctuation
'.'           Operator
'arrayOf'     Name.Function
')'           Punctuation
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// if expected is Obj\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'isObj'       Name.Function
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'a'           Text
'r'           Text
'r'           Text
'a'           Text
'y'           Text
'T'           Text
'o'           Text
'L'           Text
'i'           Text
's'           Text
't'           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
','           Text
' '           Text
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
'.'           Operator
'inferredArrayOf' Name.Function
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// if expected is list type\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'toNonNullable' Name.Function
' '           Text
'is'          Keyword
' '           Text
'L'           Text
'i'           Text
's'           Text
't'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'expectedOf'  Name.Variable
' '           Text
':='          Operator
' '           Text
'('           Punctuation
'('           Punctuation
'L'           Text
'i'           Text
's'           Text
't'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
')'           Punctuation
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'toNonNullable' Name.Function
')'           Punctuation
'.'           Operator
'v'           Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
'.'           Operator
'inferredArrayOf' Name.Function
'.'           Operator
'fits'        Name.Function
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'O'           Text
'f'           Text
')'           Punctuation
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'a'           Text
'r'           Text
'r'           Text
'a'           Text
'y'           Text
'T'           Text
'o'           Text
'L'           Text
'i'           Text
's'           Text
't'           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'O'           Text
'f'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// no coercion available\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'o'           Text
'n'           Text
'E'           Text
'r'           Text
'r'           Text
'('           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Generate List.make(of, expr) where expr is Object[]\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'private'     Keyword
' '           Text
'Expr'        Name.Class
' '           Text
'arrayToList' Name.Function
'('           Punctuation
'Expr'        Name.Class
' '           Text
'expr'        Name.Variable
','           Punctuation
' '           Text
'CType'       Name.Class
' '           Text
'of'          Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'loc'         Name.Variable
' '           Text
':='          Operator
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'loc'         Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'ofExpr'      Name.Variable
' '           Text
':='          Operator
' '           Text
'L'           Text
'i'           Text
't'           Text
'e'           Text
'r'           Text
'a'           Text
'l'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'I'           Text
'd'           Text
'.'           Operator
'typeLiteral' Name.Function
','           Text
' '           Text
'n'           Text
's'           Text
'.'           Operator
'typeType'    Name.Function
','           Text
' '           Text
'o'           Text
'f'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'call'        Name.Variable
' '           Text
':='          Operator
' '           Text
'C'           Text
'a'           Text
'l'           Text
'l'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'makeWithMethod' Name.Function
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'null'        Keyword.Constant
','           Text
' '           Text
'l'           Text
'i'           Text
's'           Text
't'           Text
'M'           Text
'a'           Text
'k'           Text
'e'           Text
'F'           Text
'r'           Text
'o'           Text
'm'           Text
'A'           Text
'r'           Text
'r'           Text
'a'           Text
'y'           Text
','           Text
' '           Text
'['           Operator
'o'           Text
'f'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
']'           Operator
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'synthetic'   Name.Function
' '           Text
'='           Operator
' '           Text
'true'        Keyword.Constant
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Coerce a Fantom list to Java array.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'Expr'        Name.Class
' '           Text
'coerceToArray' Name.Function
'('           Punctuation
'Expr'        Name.Class
' '           Text
'expr'        Name.Variable
','           Punctuation
' '           Text
'CType'       Name.Class
' '           Text
'expected'    Name.Variable
','           Punctuation
' '           Text
'|'           Punctuation
'-'           Punctuation
'>'           Punctuation
'|'           Punctuation
' '           Text
'onErr'       Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'loc'         Name.Variable
' '           Text
':='          Operator
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'loc'         Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'expectedOf'  Name.Variable
' '           Text
':='          Operator
' '           Text
'('           Punctuation
'('           Punctuation
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
')'           Punctuation
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'toNonNullable' Name.Function
')'           Punctuation
'.'           Operator
'inferredArrayOf' Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'actual'      Name.Variable
' '           Text
':='          Operator
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'ctype'       Name.Function
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// if actual is list type\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
'.'           Operator
'toNonNullable' Name.Function
' '           Text
'is'          Keyword
' '           Text
'L'           Text
'i'           Text
's'           Text
't'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'actualOf'    Name.Variable
' '           Text
':='          Operator
' '           Text
'('           Punctuation
'('           Punctuation
'L'           Text
'i'           Text
's'           Text
't'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
')'           Punctuation
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
'.'           Operator
'toNonNullable' Name.Function
')'           Punctuation
'.'           Operator
'v'           Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'c'           Text
't'           Text
'u'           Text
'a'           Text
'l'           Text
'O'           Text
'f'           Text
'.'           Operator
'fits'        Name.Function
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'O'           Text
'f'           Text
')'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'// (Foo[])list.asArray(cls)\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'clsLiteral'  Name.Variable
' '           Text
':='          Operator
' '           Text
'C'           Text
'a'           Text
'l'           Text
'l'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'makeWithMethod' Name.Function
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'null'        Keyword.Constant
','           Text
' '           Text
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'.'           Operator
'classLiteral' Name.Function
'('           Punctuation
'this'        Name.Builtin.Pseudo
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'O'           Text
'f'           Text
')'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'asArray'     Name.Variable
' '           Text
':='          Operator
' '           Text
'C'           Text
'a'           Text
'l'           Text
'l'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'makeWithMethod' Name.Function
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
','           Text
' '           Text
'l'           Text
'i'           Text
's'           Text
't'           Text
'A'           Text
's'           Text
'A'           Text
'r'           Text
'r'           Text
'a'           Text
'y'           Text
','           Text
' '           Text
'['           Operator
'c'           Text
'l'           Text
's'           Text
'L'           Text
'i'           Text
't'           Text
'e'           Text
'r'           Text
'a'           Text
'l'           Text
']'           Operator
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'C'           Text
'h'           Text
'e'           Text
'c'           Text
'k'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'coerce'      Name.Function
'('           Punctuation
'a'           Text
's'           Text
'A'           Text
'r'           Text
'r'           Text
'a'           Text
'y'           Text
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// no coercion available\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'o'           Text
'n'           Text
'E'           Text
'r'           Text
'r'           Text
'('           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Attempt to coerce a parameterized sys::Func expr to a Java\n' Comment.Special

' '           Text
' '           Text
'** interface if the interface supports exactly one matching method.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'Expr'        Name.Class
' '           Text
'coerceFuncToInterface' Name.Function
'('           Punctuation
'Expr'        Name.Class
' '           Text
'expr'        Name.Variable
','           Punctuation
' '           Text
'JavaType'    Name.Class
' '           Text
'expected'    Name.Variable
','           Punctuation
' '           Text
'|'           Punctuation
'-'           Punctuation
'>'           Punctuation
'|'           Punctuation
' '           Text
'onErr'       Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// check if we have exactly one abstract method in the expected type\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'loc'         Name.Variable
' '           Text
':='          Operator
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'loc'         Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'abstracts'   Name.Variable
' '           Text
':='          Operator
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
'.'           Operator
'methods'     Name.Function
'.'           Operator
'findAll'     Name.Function
' '           Text
'|'           Punctuation
'CMethod'     Name.Class
' '           Text
'm'           Name.Variable
'->'          Punctuation
'Bool'        Name.Class
'|'           Punctuation
' '           Text
'{'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'm'           Text
'.'           Operator
'isAbstract'  Name.Function
' '           Text
'}'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'a'           Text
'b'           Text
's'           Text
't'           Text
'r'           Text
'a'           Text
'c'           Text
't'           Text
's'           Text
'.'           Operator
'size'        Name.Function
' '           Text
'!'           Operator
'='           Operator
' '           Text
'1'           Literal.Number.Integer
')'           Punctuation
' '           Text
'{'           Punctuation
' '           Text
'o'           Text
'n'           Text
'E'           Text
'r'           Text
'r'           Text
'('           Punctuation
')'           Punctuation
';'           Text
' '           Text
'return'      Keyword
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
' '           Text
'}'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'method'      Name.Variable
' '           Text
':='          Operator
' '           Text
'a'           Text
'b'           Text
's'           Text
't'           Text
'r'           Text
'a'           Text
'c'           Text
't'           Text
's'           Text
'.'           Operator
'first'       Name.Function
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// check if we have a match\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'FuncType'    Name.Class
' '           Text
'funcType'    Name.Variable
' '           Text
':='          Operator
' '           Text
'('           Punctuation
'F'           Text
'u'           Text
'n'           Text
'c'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
')'           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'ctype'       Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'i'           Text
's'           Text
'F'           Text
'u'           Text
'n'           Text
'c'           Text
'T'           Text
'o'           Text
'I'           Text
'n'           Text
't'           Text
'e'           Text
'r'           Text
'f'           Text
'a'           Text
'c'           Text
'e'           Text
'M'           Text
'a'           Text
't'           Text
'c'           Text
'h'           Text
'('           Punctuation
'f'           Text
'u'           Text
'n'           Text
'c'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
','           Text
' '           Text
'm'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
')'           Punctuation
')'           Punctuation
' '           Text
'{'           Punctuation
' '           Text
'o'           Text
'n'           Text
'E'           Text
'r'           Text
'r'           Text
'('           Punctuation
')'           Punctuation
';'           Text
' '           Text
'return'      Keyword
' '           Text
'e'           Text
'x'           Text
'p'           Text
'r'           Text
' '           Text
'}'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
"// check if we've already generated a wrapper for this combo\n" Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'key'         Name.Variable
' '           Text
':='          Operator
' '           Text
'"'           Punctuation
'${funcType.signature}' Literal.String.Interpol
'+'           Literal.String
'${method.qname}' Literal.String.Interpol
'"'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'ctor'        Name.Variable
' '           Text
':='          Operator
' '           Text
'f'           Text
'u'           Text
'n'           Text
'c'           Text
'W'           Text
'r'           Text
'a'           Text
'p'           Text
'p'           Text
'e'           Text
'r'           Text
's'           Text
'['           Operator
'k'           Text
'e'           Text
'y'           Text
']'           Operator
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'c'           Text
't'           Text
'o'           Text
'r'           Text
' '           Text
'='           Operator
'='           Operator
' '           Text
'null'        Keyword.Constant
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
't'           Text
'o'           Text
'r'           Text
' '           Text
'='           Operator
' '           Text
'g'           Text
'e'           Text
'n'           Text
'e'           Text
'r'           Text
'a'           Text
't'           Text
'e'           Text
'F'           Text
'u'           Text
'n'           Text
'c'           Text
'T'           Text
'o'           Text
'I'           Text
'n'           Text
't'           Text
'e'           Text
'r'           Text
'f'           Text
'a'           Text
'c'           Text
'e'           Text
'W'           Text
'r'           Text
'a'           Text
'p'           Text
'p'           Text
'e'           Text
'r'           Text
'('           Punctuation
'e'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'loc'         Name.Function
','           Text
' '           Text
'f'           Text
'u'           Text
'n'           Text
'c'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
','           Text
' '           Text
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
','           Text
' '           Text
'm'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'f'           Text
'u'           Text
'n'           Text
'c'           Text
'W'           Text
'r'           Text
'a'           Text
'p'           Text
'p'           Text
'e'           Text
'r'           Text
's'           Text
'['           Operator
'k'           Text
'e'           Text
'y'           Text
']'           Operator
' '           Text
'='           Operator
' '           Text
'c'           Text
't'           Text
'o'           Text
'r'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// replace expr with FuncWrapperX(expr)\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'call'        Name.Variable
' '           Text
':='          Operator
' '           Text
'C'           Text
'a'           Text
'l'           Text
'l'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'makeWithMethod' Name.Function
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'null'        Keyword.Constant
','           Text
' '           Text
'c'           Text
't'           Text
'o'           Text
'r'           Text
','           Text
' '           Text
'['           Operator
'e'           Text
'x'           Text
'p'           Text
'r'           Text
']'           Operator
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'synthetic'   Name.Function
' '           Text
'='           Operator
' '           Text
'true'        Keyword.Constant
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Return if the specified function type can be used to implement\n' Comment.Special

' '           Text
' '           Text
'** the specified interface method.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'Bool'        Name.Class
' '           Text
'isFuncToInterfaceMatch' Name.Function
'('           Punctuation
'FuncType'    Name.Class
' '           Text
'funcType'    Name.Variable
','           Punctuation
' '           Text
'CMethod'     Name.Class
' '           Text
'method'      Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
"// sanity check to map to callX method - can't handle more than 8 args\n" Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'm'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'.'           Operator
'params'      Name.Function
'.'           Operator
'size'        Name.Function
' '           Text
'>'           Operator
' '           Text
'8'           Literal.Number.Integer
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'false'       Keyword.Constant
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// check if method is match for function; first check is that\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'// method must supply all the arguments required by the function\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'f'           Text
'u'           Text
'n'           Text
'c'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'.'           Operator
'params'      Name.Function
'.'           Operator
'size'        Name.Function
' '           Text
'>'           Operator
' '           Text
'm'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'.'           Operator
'params'      Name.Function
'.'           Operator
'size'        Name.Function
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'false'       Keyword.Constant
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// check that func return type fits method return\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'retOk'       Name.Variable
' '           Text
':='          Operator
' '           Text
'm'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'.'           Operator
'returnType'  Name.Function
'.'           Operator
'isVoid'      Name.Function
' '           Text
'||'          Operator
' '           Text
'f'           Text
'i'           Text
't'           Text
's'           Text
'('           Punctuation
'f'           Text
'u'           Text
'n'           Text
'c'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'.'           Operator
'ret'         Name.Function
','           Text
' '           Text
'm'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'.'           Operator
'returnType'  Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'r'           Text
'e'           Text
't'           Text
'O'           Text
'k'           Text
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'false'       Keyword.Constant
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// check all the method parameters fit the function parameters\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'paramsOk'    Name.Variable
' '           Text
':='          Operator
' '           Text
'f'           Text
'u'           Text
'n'           Text
'c'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'.'           Operator
'params'      Name.Function
'.'           Operator
'all'         Name.Function
' '           Text
'|'           Punctuation
'CType'       Name.Class
' '           Text
'f'           Name.Variable
','           Punctuation
' '           Text
'Int'         Name.Class
' '           Text
'i'           Name.Variable
'->'          Punctuation
'Bool'        Name.Class
'|'           Punctuation
' '           Text
'{'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'f'           Text
'i'           Text
't'           Text
's'           Text
'('           Punctuation
'f'           Text
','           Text
' '           Text
'm'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'.'           Operator
'params'      Name.Function
'['           Operator
'i'           Text
']'           Operator
'.'           Operator
'paramType'   Name.Function
')'           Punctuation
' '           Text
'}'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'p'           Text
'a'           Text
'r'           Text
'a'           Text
'm'           Text
's'           Text
'O'           Text
'k'           Text
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'false'       Keyword.Constant
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'true'        Keyword.Constant
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'** Generate the wrapper which implements the specified expected interface\n' Comment.Special

' '           Text
' '           Text
'** and overrides the specified method which calls the function.\n' Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'CMethod'     Name.Class
' '           Text
'generateFuncToInterfaceWrapper' Name.Function
'('           Punctuation
'Loc'         Name.Class
' '           Text
'loc'         Name.Variable
','           Punctuation
' '           Text
'FuncType'    Name.Class
' '           Text
'funcType'    Name.Variable
','           Punctuation
' '           Text
'CType'       Name.Class
' '           Text
'expected'    Name.Variable
','           Punctuation
' '           Text
'CMethod'     Name.Class
' '           Text
'method'      Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'//   Fantom: func typed as |Str|\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'//   Java:   interface Foo { void bar(String) }\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'//   Result: FuncWrapperX(func)\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'//\n'        Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'//   class FuncWrapperX : Foo\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'//   {\n'    Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'//     new make(Func f) { _func = f }\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'//     override Void bar(Str a) { _func.call(a) }\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'//     Func _func\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'//   }\n'    Comment.Single

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// generate FuncWrapper class\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'name'        Name.Variable
' '           Text
':='          Operator
' '           Text
'"'           Punctuation
'F'           Literal.String
'u'           Literal.String
'n'           Literal.String
'c'           Literal.String
'W'           Literal.String
'r'           Literal.String
'a'           Literal.String
'p'           Literal.String
'p'           Literal.String
'e'           Literal.String
'r'           Literal.String
'"'           Punctuation
' '           Text
'+'           Operator
' '           Text
'f'           Text
'u'           Text
'n'           Text
'c'           Text
'W'           Text
'r'           Text
'a'           Text
'p'           Text
'p'           Text
'e'           Text
'r'           Text
's'           Text
'.'           Operator
'size'        Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'cls'         Name.Variable
' '           Text
':='          Operator
' '           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'D'           Text
'e'           Text
'f'           Text
'('           Punctuation
'n'           Text
's'           Text
','           Text
' '           Text
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'c'           Text
'o'           Text
'm'           Text
'p'           Text
'i'           Text
'l'           Text
'e'           Text
'r'           Text
'.'           Operator
'types'       Name.Function
'['           Operator
'0'           Literal.Number.Integer
']'           Operator
'.'           Operator
'unit'        Name.Function
','           Text
' '           Text
'n'           Text
'a'           Text
'm'           Text
'e'           Text
','           Text
' '           Text
'F'           Text
'C'           Text
'o'           Text
'n'           Text
's'           Text
't'           Text
'.'           Operator
'Internal'    Name.Function
' '           Text
'+'           Operator
' '           Text
'F'           Text
'C'           Text
'o'           Text
'n'           Text
's'           Text
't'           Text
'.'           Operator
'Synthetic'   Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'l'           Text
's'           Text
'.'           Operator
'base'        Name.Function
' '           Text
'='           Operator
' '           Text
'n'           Text
's'           Text
'.'           Operator
'objType'     Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'l'           Text
's'           Text
'.'           Operator
'mixins'      Name.Function
' '           Text
'='           Operator
' '           Text
'['           Operator
'e'           Text
'x'           Text
'p'           Text
'e'           Text
'c'           Text
't'           Text
'e'           Text
'd'           Text
']'           Operator
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'a'           Text
'd'           Text
'd'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'D'           Text
'e'           Text
'f'           Text
'('           Punctuation
'c'           Text
'l'           Text
's'           Text
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// generate FuncWrapper._func field\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'field'       Name.Variable
' '           Text
':='          Operator
' '           Text
'F'           Text
'i'           Text
'e'           Text
'l'           Text
'd'           Text
'D'           Text
'e'           Text
'f'           Text
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'c'           Text
'l'           Text
's'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'('           Punctuation
'('           Punctuation
'S'           Text
'l'           Text
'o'           Text
't'           Text
'D'           Text
'e'           Text
'f'           Text
')'           Punctuation
'f'           Text
'i'           Text
'e'           Text
'l'           Text
'd'           Text
')'           Punctuation
'.'           Operator
'name'        Name.Function
' '           Text
'='           Operator
' '           Text
'"'           Punctuation
'_'           Literal.String
'f'           Literal.String
'u'           Literal.String
'n'           Literal.String
'c'           Literal.String
'"'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'('           Punctuation
'('           Punctuation
'D'           Text
'e'           Text
'f'           Text
'N'           Text
'o'           Text
'd'           Text
'e'           Text
')'           Punctuation
'f'           Text
'i'           Text
'e'           Text
'l'           Text
'd'           Text
')'           Punctuation
'.'           Operator
'flags'       Name.Function
' '           Text
'='           Operator
' '           Text
'F'           Text
'C'           Text
'o'           Text
'n'           Text
's'           Text
't'           Text
'.'           Operator
'Private'     Name.Function
' '           Text
'+'           Operator
' '           Text
'F'           Text
'C'           Text
'o'           Text
'n'           Text
's'           Text
't'           Text
'.'           Operator
'Storage'     Name.Function
' '           Text
'+'           Operator
' '           Text
'F'           Text
'C'           Text
'o'           Text
'n'           Text
's'           Text
't'           Text
'.'           Operator
'Synthetic'   Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'f'           Text
'i'           Text
'e'           Text
'l'           Text
'd'           Text
'.'           Operator
'fieldType'   Name.Function
' '           Text
'='           Operator
' '           Text
'f'           Text
'u'           Text
'n'           Text
'c'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'l'           Text
's'           Text
'.'           Operator
'addSlot'     Name.Function
'('           Punctuation
'f'           Text
'i'           Text
'e'           Text
'l'           Text
'd'           Text
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// generate FuncWrapper.make constructor\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'ctor'        Name.Variable
' '           Text
':='          Operator
' '           Text
'M'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'D'           Text
'e'           Text
'f'           Text
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'c'           Text
'l'           Text
's'           Text
','           Text
' '           Text
'"'           Punctuation
'm'           Literal.String
'a'           Literal.String
'k'           Literal.String
'e'           Literal.String
'"'           Punctuation
','           Text
' '           Text
'F'           Text
'C'           Text
'o'           Text
'n'           Text
's'           Text
't'           Text
'.'           Operator
'Internal'    Name.Function
' '           Text
'+'           Operator
' '           Text
'F'           Text
'C'           Text
'o'           Text
'n'           Text
's'           Text
't'           Text
'.'           Operator
'Ctor'        Name.Function
' '           Text
'+'           Operator
' '           Text
'F'           Text
'C'           Text
'o'           Text
'n'           Text
's'           Text
't'           Text
'.'           Operator
'Synthetic'   Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
't'           Text
'o'           Text
'r'           Text
'.'           Operator
'ret'         Name.Function
' '           Text
' '           Text
'='           Operator
' '           Text
'n'           Text
's'           Text
'.'           Operator
'voidType'    Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
't'           Text
'o'           Text
'r'           Text
'.'           Operator
'paramDefs'   Name.Function
' '           Text
'='           Operator
' '           Text
'['           Operator
'P'           Text
'a'           Text
'r'           Text
'a'           Text
'm'           Text
'D'           Text
'e'           Text
'f'           Text
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'f'           Text
'u'           Text
'n'           Text
'c'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
','           Text
' '           Text
'"'           Punctuation
'f'           Literal.String
'"'           Punctuation
')'           Punctuation
']'           Operator
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
't'           Text
'o'           Text
'r'           Text
'.'           Operator
'code'        Name.Function
' '           Text
'='           Operator
' '           Text
'B'           Text
'l'           Text
'o'           Text
'c'           Text
'k'           Text
'.'           Operator
'make'        Name.Function
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
't'           Text
'o'           Text
'r'           Text
'.'           Operator
'code'        Name.Function
'.'           Operator
'stmts'       Name.Function
'.'           Operator
'add'         Name.Function
'('           Punctuation
'B'           Text
'i'           Text
'n'           Text
'a'           Text
'r'           Text
'y'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'makeAssign'  Name.Function
'('           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'F'           Text
'i'           Text
'e'           Text
'l'           Text
'd'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'T'           Text
'h'           Text
'i'           Text
's'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
')'           Punctuation
','           Text
' '           Text
'f'           Text
'i'           Text
'e'           Text
'l'           Text
'd'           Text
')'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'U'           Text
'n'           Text
'k'           Text
'n'           Text
'o'           Text
'w'           Text
'n'           Text
'V'           Text
'a'           Text
'r'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'null'        Keyword.Constant
','           Text
' '           Text
'"'           Punctuation
'f'           Literal.String
'"'           Punctuation
')'           Punctuation
')'           Text
'.'           Operator
'toStmt'      Name.Function
')'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
't'           Text
'o'           Text
'r'           Text
'.'           Operator
'code'        Name.Function
'.'           Operator
'stmts'       Name.Function
'.'           Operator
'add'         Name.Function
'('           Punctuation
'R'           Text
'e'           Text
't'           Text
'u'           Text
'r'           Text
'n'           Text
'S'           Text
't'           Text
'm'           Text
't'           Text
'.'           Operator
'make'        Name.Function
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
')'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'l'           Text
's'           Text
'.'           Operator
'addSlot'     Name.Function
'('           Punctuation
'c'           Text
't'           Text
'o'           Text
'r'           Text
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// generate FuncWrapper override of abstract method\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'over'        Name.Variable
' '           Text
':='          Operator
' '           Text
'M'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'D'           Text
'e'           Text
'f'           Text
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'c'           Text
'l'           Text
's'           Text
','           Text
' '           Text
'm'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'.'           Operator
'name'        Name.Function
','           Text
' '           Text
'F'           Text
'C'           Text
'o'           Text
'n'           Text
's'           Text
't'           Text
'.'           Operator
'Public'      Name.Function
' '           Text
'+'           Operator
' '           Text
'F'           Text
'C'           Text
'o'           Text
'n'           Text
's'           Text
't'           Text
'.'           Operator
'Override'    Name.Function
' '           Text
'+'           Operator
' '           Text
'F'           Text
'C'           Text
'o'           Text
'n'           Text
's'           Text
't'           Text
'.'           Operator
'Synthetic'   Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'o'           Text
'v'           Text
'e'           Text
'r'           Text
'.'           Operator
'ret'         Name.Function
' '           Text
'='           Operator
' '           Text
'm'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'.'           Operator
'returnType'  Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'o'           Text
'v'           Text
'e'           Text
'r'           Text
'.'           Operator
'paramDefs'   Name.Function
' '           Text
'='           Operator
' '           Text
'ParamDef'    Name.Class
'[,]'         Literal
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'o'           Text
'v'           Text
'e'           Text
'r'           Text
'.'           Operator
'code'        Name.Function
' '           Text
'='           Operator
' '           Text
'B'           Text
'l'           Text
'o'           Text
'c'           Text
'k'           Text
'.'           Operator
'make'        Name.Function
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'callArity'   Name.Variable
' '           Text
':='          Operator
' '           Text
'"'           Punctuation
'c'           Literal.String
'a'           Literal.String
'l'           Literal.String
'l'           Literal.String
'"'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'call'        Name.Variable
' '           Text
':='          Operator
' '           Text
'C'           Text
'a'           Text
'l'           Text
'l'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'.'           Operator
'makeWithMethod' Name.Function
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'F'           Text
'i'           Text
'e'           Text
'l'           Text
'd'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'T'           Text
'h'           Text
'i'           Text
's'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
')'           Punctuation
','           Text
' '           Text
'f'           Text
'i'           Text
'e'           Text
'l'           Text
'd'           Text
')'           Punctuation
','           Text
' '           Text
'f'           Text
'u'           Text
'n'           Text
'c'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'.'           Operator
'method'      Name.Function
'('           Punctuation
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'A'           Text
'r'           Text
'i'           Text
't'           Text
'y'           Text
')'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'm'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'.'           Operator
'params'      Name.Function
'.'           Operator
'each'        Name.Function
' '           Text
'|'           Punctuation
'CParam'      Name.Class
' '           Text
'param'       Name.Variable
','           Punctuation
' '           Text
'Int'         Name.Class
' '           Text
'i'           Name.Variable
'|'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'paramName'   Name.Variable
' '           Text
':='          Operator
' '           Text
'"'           Punctuation
'p'           Literal.String
'$i'          Literal.String.Interpol
'"'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'o'           Text
'v'           Text
'e'           Text
'r'           Text
'.'           Operator
'params'      Name.Function
'.'           Operator
'add'         Name.Function
'('           Punctuation
'P'           Text
'a'           Text
'r'           Text
'a'           Text
'm'           Text
'D'           Text
'e'           Text
'f'           Text
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'p'           Text
'a'           Text
'r'           Text
'a'           Text
'm'           Text
'.'           Operator
'paramType'   Name.Function
','           Text
' '           Text
'p'           Text
'a'           Text
'r'           Text
'a'           Text
'm'           Text
'N'           Text
'a'           Text
'm'           Text
'e'           Text
')'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'i'           Text
' '           Text
'<'           Operator
' '           Text
'f'           Text
'u'           Text
'n'           Text
'c'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
'.'           Operator
'params'      Name.Function
'.'           Operator
'size'        Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'args'        Name.Function
'.'           Operator
'add'         Name.Function
'('           Punctuation
'U'           Text
'n'           Text
'k'           Text
'n'           Text
'o'           Text
'w'           Text
'n'           Text
'V'           Text
'a'           Text
'r'           Text
'E'           Text
'x'           Text
'p'           Text
'r'           Text
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'null'        Keyword.Constant
','           Text
' '           Text
'p'           Text
'a'           Text
'r'           Text
'a'           Text
'm'           Text
'N'           Text
'a'           Text
'm'           Text
'e'           Text
')'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'}'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'm'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'.'           Operator
'returnType'  Name.Function
'.'           Operator
'isVoid'      Name.Function
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'o'           Text
'v'           Text
'e'           Text
'r'           Text
'.'           Operator
'code'        Name.Function
'.'           Operator
'stmts'       Name.Function
'.'           Operator
'add'         Name.Function
'('           Punctuation
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'toStmt'      Name.Function
')'           Punctuation
'.'           Operator
'add'         Name.Function
'('           Punctuation
'R'           Text
'e'           Text
't'           Text
'u'           Text
'r'           Text
'n'           Text
'S'           Text
't'           Text
'm'           Text
't'           Text
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
')'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'else'        Keyword
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'o'           Text
'v'           Text
'e'           Text
'r'           Text
'.'           Operator
'code'        Name.Function
'.'           Operator
'stmts'       Name.Function
'.'           Operator
'add'         Name.Function
'('           Punctuation
'R'           Text
'e'           Text
't'           Text
'u'           Text
'r'           Text
'n'           Text
'S'           Text
't'           Text
'm'           Text
't'           Text
'('           Punctuation
'l'           Text
'o'           Text
'c'           Text
','           Text
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
')'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'l'           Text
's'           Text
'.'           Operator
'addSlot'     Name.Function
'('           Punctuation
'o'           Text
'v'           Text
'e'           Text
'r'           Text
')'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'// return the ctor which we use for coercion\n' Comment.Single

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'c'           Text
't'           Text
'o'           Text
'r'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

'//////////////////////////////////////////////////////////////////////////\n' Comment.Single

'// Reflection\n' Comment.Single

'//////////////////////////////////////////////////////////////////////////\n' Comment.Single

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
"** Get a CMethod representation for 'List.make(Type, Object[])'\n" Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'once'        Keyword
' '           Text
'CMethod'     Name.Class
' '           Text
'listMakeFromArray' Name.Function
'('           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'M'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'('           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'this'        Name.Builtin.Pseudo
'.'           Operator
'ns'          Name.Function
'.'           Operator
'listType'    Name.Function
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'"'           Punctuation
'm'           Literal.String
'a'           Literal.String
'k'           Literal.String
'e'           Literal.String
'"'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'F'           Text
'C'           Text
'o'           Text
'n'           Text
's'           Text
't'           Text
'.'           Operator
'Public'      Name.Function
' '           Text
'+'           Operator
' '           Text
'F'           Text
'C'           Text
'o'           Text
'n'           Text
's'           Text
't'           Text
'.'           Operator
'Static'      Name.Function
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'this'        Name.Builtin.Pseudo
'.'           Operator
'ns'          Name.Function
'.'           Operator
'listType'    Name.Function
'.'           Operator
'toNullable'  Name.Function
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'['           Operator
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'P'           Text
'a'           Text
'r'           Text
'a'           Text
'm'           Text
'('           Punctuation
'"'           Punctuation
'o'           Literal.String
'f'           Literal.String
'"'           Punctuation
','           Text
' '           Text
'this'        Name.Builtin.Pseudo
'.'           Operator
'ns'          Name.Function
'.'           Operator
'typeType'    Name.Function
')'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'P'           Text
'a'           Text
'r'           Text
'a'           Text
'm'           Text
'('           Punctuation
'"'           Punctuation
'a'           Literal.String
'r'           Literal.String
'r'           Literal.String
'a'           Literal.String
'y'           Literal.String
'"'           Punctuation
','           Text
' '           Text
'o'           Text
'b'           Text
'j'           Text
'e'           Text
'c'           Text
't'           Text
'A'           Text
'r'           Text
'r'           Text
'a'           Text
'y'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
']'           Operator
')'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
"** Get a CMethod representation for 'Object[] List.asArray()'\n" Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'once'        Keyword
' '           Text
'CMethod'     Name.Class
' '           Text
'listAsArray' Name.Function
'('           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'M'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'('           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'this'        Name.Builtin.Pseudo
'.'           Operator
'ns'          Name.Function
'.'           Operator
'listType'    Name.Function
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'"'           Punctuation
'a'           Literal.String
's'           Literal.String
'A'           Literal.String
'r'           Literal.String
'r'           Literal.String
'a'           Literal.String
'y'           Literal.String
'"'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'F'           Text
'C'           Text
'o'           Text
'n'           Text
's'           Text
't'           Text
'.'           Operator
'Public'      Name.Function
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'o'           Text
'b'           Text
'j'           Text
'e'           Text
'c'           Text
't'           Text
'A'           Text
'r'           Text
'r'           Text
'a'           Text
'y'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'['           Operator
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'P'           Text
'a'           Text
'r'           Text
'a'           Text
'm'           Text
'('           Punctuation
'"'           Punctuation
'c'           Literal.String
'l'           Literal.String
's'           Literal.String
'"'           Punctuation
','           Text
' '           Text
'c'           Text
'l'           Text
'a'           Text
's'           Text
's'           Text
'T'           Text
'y'           Text
'p'           Text
'e'           Text
')'           Punctuation
']'           Operator
')'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
"** Get a CType representation for 'java.lang.Class'\n" Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'once'        Keyword
' '           Text
'JavaType'    Name.Class
' '           Text
'classType'   Name.Function
'('           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'n'           Text
's'           Text
'.'           Operator
'resolveType' Name.Function
'('           Punctuation
'"'           Punctuation
'['           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
']'           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
'.'           Literal.String
'l'           Literal.String
'a'           Literal.String
'n'           Literal.String
'g'           Literal.String
':'           Literal.String
':'           Literal.String
'C'           Literal.String
'l'           Literal.String
'a'           Literal.String
's'           Literal.String
's'           Literal.String
'"'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
"** Get a CType representation for 'java.lang.Object[]'\n" Comment.Special

' '           Text
' '           Text
'**\n'        Comment.Special

' '           Text
' '           Text
'once'        Keyword
' '           Text
'JavaType'    Name.Class
' '           Text
'objectArrayType' Name.Function
'('           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'n'           Text
's'           Text
'.'           Operator
'resolveType' Name.Function
'('           Punctuation
'"'           Punctuation
'['           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
']'           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
'.'           Literal.String
'l'           Literal.String
'a'           Literal.String
'n'           Literal.String
'g'           Literal.String
':'           Literal.String
':'           Literal.String
'['           Literal.String
'O'           Literal.String
'b'           Literal.String
'j'           Literal.String
'e'           Literal.String
'c'           Literal.String
't'           Literal.String
'"'           Punctuation
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

'//////////////////////////////////////////////////////////////////////////\n' Comment.Single

'// Fields\n' Comment.Single

'//////////////////////////////////////////////////////////////////////////\n' Comment.Single

'\n'          Text

' '           Text
' '           Text
'const'       Keyword
' '           Text
'static'      Keyword
' '           Text
'Str'         Name.Class
'['           Punctuation
']'           Punctuation
' '           Text
'boolTypes'   Name.Variable
' '           Text
':='          Operator
' '           Text
'S'           Text
't'           Text
'r'           Text
'['           Operator
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'"'           Punctuation
'['           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
']'           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
'.'           Literal.String
'i'           Literal.String
'o'           Literal.String
':'           Literal.String
':'           Literal.String
'S'           Literal.String
'e'           Literal.String
'r'           Literal.String
'i'           Literal.String
'a'           Literal.String
'l'           Literal.String
'i'           Literal.String
'z'           Literal.String
'a'           Literal.String
'b'           Literal.String
'l'           Literal.String
'e'           Literal.String
'"'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'"'           Punctuation
'['           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
']'           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
'.'           Literal.String
'l'           Literal.String
'a'           Literal.String
'n'           Literal.String
'g'           Literal.String
':'           Literal.String
':'           Literal.String
'C'           Literal.String
'o'           Literal.String
'm'           Literal.String
'p'           Literal.String
'a'           Literal.String
'r'           Literal.String
'a'           Literal.String
'b'           Literal.String
'l'           Literal.String
'e'           Literal.String
'"'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
']'           Operator
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'const'       Keyword
' '           Text
'static'      Keyword
' '           Text
'Str'         Name.Class
'['           Punctuation
']'           Punctuation
' '           Text
'intTypes'    Name.Variable
' '           Text
':='          Operator
' '           Text
'S'           Text
't'           Text
'r'           Text
'['           Operator
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'"'           Punctuation
'['           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
']'           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
'.'           Literal.String
'l'           Literal.String
'a'           Literal.String
'n'           Literal.String
'g'           Literal.String
':'           Literal.String
':'           Literal.String
'N'           Literal.String
'u'           Literal.String
'm'           Literal.String
'b'           Literal.String
'e'           Literal.String
'r'           Literal.String
'"'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'"'           Punctuation
'['           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
']'           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
'.'           Literal.String
'i'           Literal.String
'o'           Literal.String
':'           Literal.String
':'           Literal.String
'S'           Literal.String
'e'           Literal.String
'r'           Literal.String
'i'           Literal.String
'a'           Literal.String
'l'           Literal.String
'i'           Literal.String
'z'           Literal.String
'a'           Literal.String
'b'           Literal.String
'l'           Literal.String
'e'           Literal.String
'"'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'"'           Punctuation
'['           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
']'           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
'.'           Literal.String
'l'           Literal.String
'a'           Literal.String
'n'           Literal.String
'g'           Literal.String
':'           Literal.String
':'           Literal.String
'C'           Literal.String
'o'           Literal.String
'm'           Literal.String
'p'           Literal.String
'a'           Literal.String
'r'           Literal.String
'a'           Literal.String
'b'           Literal.String
'l'           Literal.String
'e'           Literal.String
'"'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
']'           Operator
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'const'       Keyword
' '           Text
'static'      Keyword
' '           Text
'Str'         Name.Class
'['           Punctuation
']'           Punctuation
' '           Text
'floatTypes'  Name.Variable
' '           Text
':='          Operator
' '           Text
'S'           Text
't'           Text
'r'           Text
'['           Operator
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'"'           Punctuation
'['           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
']'           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
'.'           Literal.String
'l'           Literal.String
'a'           Literal.String
'n'           Literal.String
'g'           Literal.String
':'           Literal.String
':'           Literal.String
'N'           Literal.String
'u'           Literal.String
'm'           Literal.String
'b'           Literal.String
'e'           Literal.String
'r'           Literal.String
'"'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'"'           Punctuation
'['           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
']'           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
'.'           Literal.String
'i'           Literal.String
'o'           Literal.String
':'           Literal.String
':'           Literal.String
'S'           Literal.String
'e'           Literal.String
'r'           Literal.String
'i'           Literal.String
'a'           Literal.String
'l'           Literal.String
'i'           Literal.String
'z'           Literal.String
'a'           Literal.String
'b'           Literal.String
'l'           Literal.String
'e'           Literal.String
'"'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'"'           Punctuation
'['           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
']'           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
'.'           Literal.String
'l'           Literal.String
'a'           Literal.String
'n'           Literal.String
'g'           Literal.String
':'           Literal.String
':'           Literal.String
'C'           Literal.String
'o'           Literal.String
'm'           Literal.String
'p'           Literal.String
'a'           Literal.String
'r'           Literal.String
'a'           Literal.String
'b'           Literal.String
'l'           Literal.String
'e'           Literal.String
'"'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
']'           Operator
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'const'       Keyword
' '           Text
'static'      Keyword
' '           Text
'Str'         Name.Class
'['           Punctuation
']'           Punctuation
' '           Text
'decimalTypes' Name.Variable
' '           Text
':='          Operator
' '           Text
'S'           Text
't'           Text
'r'           Text
'['           Operator
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'"'           Punctuation
'['           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
']'           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
'.'           Literal.String
'l'           Literal.String
'a'           Literal.String
'n'           Literal.String
'g'           Literal.String
':'           Literal.String
':'           Literal.String
'N'           Literal.String
'u'           Literal.String
'm'           Literal.String
'b'           Literal.String
'e'           Literal.String
'r'           Literal.String
'"'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'"'           Punctuation
'['           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
']'           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
'.'           Literal.String
'i'           Literal.String
'o'           Literal.String
':'           Literal.String
':'           Literal.String
'S'           Literal.String
'e'           Literal.String
'r'           Literal.String
'i'           Literal.String
'a'           Literal.String
'l'           Literal.String
'i'           Literal.String
'z'           Literal.String
'a'           Literal.String
'b'           Literal.String
'l'           Literal.String
'e'           Literal.String
'"'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'"'           Punctuation
'['           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
']'           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
'.'           Literal.String
'l'           Literal.String
'a'           Literal.String
'n'           Literal.String
'g'           Literal.String
':'           Literal.String
':'           Literal.String
'C'           Literal.String
'o'           Literal.String
'm'           Literal.String
'p'           Literal.String
'a'           Literal.String
'r'           Literal.String
'a'           Literal.String
'b'           Literal.String
'l'           Literal.String
'e'           Literal.String
'"'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
']'           Operator
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'const'       Keyword
' '           Text
'static'      Keyword
' '           Text
'Str'         Name.Class
'['           Punctuation
']'           Punctuation
' '           Text
'strTypes'    Name.Variable
' '           Text
':='          Operator
' '           Text
'S'           Text
't'           Text
'r'           Text
'['           Operator
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'"'           Punctuation
'['           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
']'           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
'.'           Literal.String
'i'           Literal.String
'o'           Literal.String
':'           Literal.String
':'           Literal.String
'S'           Literal.String
'e'           Literal.String
'r'           Literal.String
'i'           Literal.String
'a'           Literal.String
'l'           Literal.String
'i'           Literal.String
'z'           Literal.String
'a'           Literal.String
'b'           Literal.String
'l'           Literal.String
'e'           Literal.String
'"'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'"'           Punctuation
'['           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
']'           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
'.'           Literal.String
'l'           Literal.String
'a'           Literal.String
'n'           Literal.String
'g'           Literal.String
':'           Literal.String
':'           Literal.String
'C'           Literal.String
'h'           Literal.String
'a'           Literal.String
'r'           Literal.String
'S'           Literal.String
'e'           Literal.String
'q'           Literal.String
'u'           Literal.String
'e'           Literal.String
'n'           Literal.String
'c'           Literal.String
'e'           Literal.String
'"'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'"'           Punctuation
'['           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
']'           Literal.String
'j'           Literal.String
'a'           Literal.String
'v'           Literal.String
'a'           Literal.String
'.'           Literal.String
'l'           Literal.String
'a'           Literal.String
'n'           Literal.String
'g'           Literal.String
':'           Literal.String
':'           Literal.String
'C'           Literal.String
'o'           Literal.String
'm'           Literal.String
'p'           Literal.String
'a'           Literal.String
'r'           Literal.String
'a'           Literal.String
'b'           Literal.String
'l'           Literal.String
'e'           Literal.String
'"'           Punctuation
','           Text
'\n'          Text

' '           Text
' '           Text
']'           Operator
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'JavaPrimitives' Name.Class
' '           Text
'primitives'  Name.Variable
' '           Text
':='          Operator
' '           Text
'J'           Text
'a'           Text
'v'           Text
'a'           Text
'P'           Text
'r'           Text
'i'           Text
'm'           Text
'i'           Text
't'           Text
'i'           Text
'v'           Text
'e'           Text
's'           Text
'('           Punctuation
'this'        Name.Builtin.Pseudo
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'ClassPath'   Name.Class
' '           Text
'cp'          Name.Variable
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'private'     Keyword
' '           Text
'Str'         Name.Class
':'           Punctuation
'CMethod'     Name.Class
' '           Text
'funcWrappers' Name.Variable
' '           Text
':='          Operator
' '           Text
'Str'         Name.Class
':'           Punctuation
'CMethod'     Name.Class
'[:]'         Literal
' '           Text
' '           Text
'// funcType+method:ctor\n' Comment.Single

'\n'          Text

'}'           Text
'\n'          Text

'\n'          Text

'**************************************************************************\n' Comment.Special

'** CallMatch\n' Comment.Special

'**************************************************************************\n' Comment.Special

'\n'          Text

'internal'    Keyword
' '           Text
'class'       Keyword
' '           Text
'CallMatch'   Name.Class
'\n'          Text

'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
'CallExpr'    Name.Class
' '           Text
'apply'       Name.Function
'('           Punctuation
'CallExpr'    Name.Class
' '           Text
'call'        Name.Variable
')'           Punctuation
'\n'          Text

' '           Text
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'args'        Name.Function
' '           Text
' '           Text
' '           Text
'='           Operator
' '           Text
'a'           Text
'r'           Text
'g'           Text
's'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'method'      Name.Function
' '           Text
'='           Operator
' '           Text
'm'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'.'           Operator
'ctype'       Name.Function
' '           Text
' '           Text
'='           Operator
' '           Text
'm'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'.'           Operator
'isCtor'      Name.Function
' '           Text
'?'           Text
' '           Text
'm'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'.'           Operator
'parent'      Name.Function
' '           Text
':'           Text
' '           Text
'm'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'.'           Operator
'returnType'  Name.Function
'\n'          Text

' '           Text
' '           Text
' '           Text
' '           Text
'return'      Keyword
' '           Text
'c'           Text
'a'           Text
'l'           Text
'l'           Text
'\n'          Text

' '           Text
' '           Text
'}'           Text
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'override'    Keyword
' '           Text
'Str'         Name.Class
' '           Text
'toStr'       Name.Function
'('           Punctuation
')'           Punctuation
' '           Text
'{'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'm'           Text
'e'           Text
't'           Text
'h'           Text
'o'           Text
'd'           Text
'.'           Operator
'signature'   Name.Function
' '           Text
'}'           Punctuation
'\n'          Text

'\n'          Text

' '           Text
' '           Text
'CMethod'     Name.Class
'?'           Punctuation
' '           Text
'method'      Name.Variable
' '           Text
' '           Text
' '           Text
' '           Text
'// matched method\n' Comment.Single

' '           Text
' '           Text
'Expr'        Name.Class
'['           Punctuation
']'           Punctuation
'?'           Punctuation
' '           Text
'args'        Name.Variable
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
' '           Text
'// coerced arguments\n' Comment.Single

'}'           Text
'\n'          Text
