Class Variable

java.lang.Object
com.prineside.luaj.ast.Variable

public class Variable extends Object
Variable is created lua name scopes, and is a named, lua variable that either refers to a lua local, global, or upvalue storage location.
  • Field Details

    • name

      public final String name
      The name as it appears in lua source code
    • definingScope

      public final NameScope definingScope
      The lua scope in which this variable is defined.
    • isupvalue

      public boolean isupvalue
      true if this variable is an upvalue
    • hasassignments

      public boolean hasassignments
      true if there are assignments made to this variable
    • initialValue

      public LuaValue initialValue
      When hasassignments == false, and the initial value is a constant, this is the initial value
  • Constructor Details

    • Variable

      public Variable(String name)
      Global is named variable not associated with a defining scope
    • Variable

      public Variable(String name, NameScope definingScope)
  • Method Details

    • isLocal

      public boolean isLocal()
    • isConstant

      public boolean isConstant()