Class FunctionNode

java.lang.Object
me.topchetoeu.j2s.compilation.Node
me.topchetoeu.j2s.compilation.FunctionNode
Direct Known Subclasses:
FunctionStatementNode, FunctionValueNode, PropertyMemberNode

public abstract class FunctionNode extends Node
  • Field Details

    • body

      public final CompoundNode body
    • params

      public final List<VariableNode> params
    • end

      public final me.topchetoeu.j2s.common.Location end
  • Constructor Details

    • FunctionNode

      public FunctionNode(me.topchetoeu.j2s.common.Location loc, me.topchetoeu.j2s.common.Location end, List<VariableNode> params, CompoundNode body)
  • Method Details

    • name

      public abstract String name()
    • name

      public final String name(String fallback)
    • captures

      protected final int[] captures(CompileResult target)
    • rootEnv

      protected final me.topchetoeu.j2s.common.Environment rootEnv(me.topchetoeu.j2s.common.Environment env)
    • resolve

      public void resolve(CompileResult target)
      Overrides:
      resolve in class Node
    • compileBody

      public final CompileResult compileBody(me.topchetoeu.j2s.common.Environment env, FunctionScope scope, boolean lastReturn, String selfName)
    • compileBody

      public final CompileResult compileBody(CompileResult parent, String selfName)
    • compile

      public abstract void compile(CompileResult target, boolean pollute, String name, me.topchetoeu.j2s.common.Instruction.BreakpointType bp)
    • compile

      public void compile(CompileResult target, boolean pollute, String name)
    • compile

      public void compile(CompileResult target, boolean pollute, me.topchetoeu.j2s.common.Instruction.BreakpointType bp)
      Overrides:
      compile in class Node
    • compile

      public void compile(CompileResult target, boolean pollute)
      Overrides:
      compile in class Node
    • compileWithName

      public static void compileWithName(Node stm, CompileResult target, boolean pollute, String name)
    • compileWithName

      public static void compileWithName(Node stm, CompileResult target, boolean pollute, String name, me.topchetoeu.j2s.common.Instruction.BreakpointType bp)
    • parseFunction

      public static ParseRes<FunctionNode> parseFunction(Source src, int i, boolean statement)