Class VariableNode

java.lang.Object
me.topchetoeu.j2s.compilation.Node
me.topchetoeu.j2s.compilation.values.VariableNode
All Implemented Interfaces:
AssignTarget, AssignTargetLike, ChangeTarget

public class VariableNode extends Node implements ChangeTarget
  • Field Details

    • name

      public final String name
  • Constructor Details

    • VariableNode

      public VariableNode(me.topchetoeu.j2s.common.Location loc, String name)
  • Method Details

    • compileFunctions

      public void compileFunctions(CompileResult target)
      Specified by:
      compileFunctions in class Node
    • assignName

      public String assignName()
    • beforeChange

      public void beforeChange(CompileResult target)
      Specified by:
      beforeChange in interface ChangeTarget
    • afterAssign

      public void afterAssign(CompileResult target, boolean pollute)
      Description copied from interface: AssignTarget
      Called to perform the actual assignemnt. Between the `beforeAssign` and this call a single value will have been pushed to the stack
      Specified by:
      afterAssign in interface AssignTarget
      pollute - Whether or not to leave the original value on the stack
    • compile

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

      public static me.topchetoeu.j2s.common.Instruction toGet(CompileResult target, me.topchetoeu.j2s.common.Location loc, String name, boolean keep, boolean forceGet)
    • toGet

      public static me.topchetoeu.j2s.common.Instruction toGet(CompileResult target, me.topchetoeu.j2s.common.Location loc, String name)
    • toSet

      public static me.topchetoeu.j2s.common.Instruction toSet(CompileResult target, me.topchetoeu.j2s.common.Location loc, String name, boolean keep, boolean init)
    • parse

      public static ParseRes<VariableNode> parse(Source src, int i)