org.erights.e.elang.evm
Class LiteralNounExpr

java.lang.Object
  |
  +--org.erights.e.elang.evm.ParseNode
        |
        +--org.erights.e.elang.evm.ENode
              |
              +--org.erights.e.elang.evm.EExpr
                    |
                    +--org.erights.e.elang.evm.AtomicExpr
                          |
                          +--org.erights.e.elang.evm.NounExpr
                                |
                                +--org.erights.e.elang.evm.TopNounExpr
                                      |
                                      +--org.erights.e.elang.evm.LiteralNounExpr
All Implemented Interfaces:
Cloneable, EPrintable, MatchMaker

public class LiteralNounExpr
extends TopNounExpr

Untamed: A noun-expr for compile-time literals, particularly universal constants.

Author:
E. Dean Tribble

Field Summary
private  Object myValue
           
 
Fields inherited from class org.erights.e.elang.evm.NounExpr
 
Fields inherited from class org.erights.e.elang.evm.ENode
 
Fields inherited from class org.erights.e.elang.evm.ParseNode
NUM_PR, PR_ASSIGN, PR_CALL, PR_COMP, PR_EEXPR, PR_LISTPATT, PR_ORDER, PR_PATTERN, PR_PRIM, PR_START
 
Constructor Summary
LiteralNounExpr(SourceSpan optSpan, String name, Object value)
          Enabled:
 
Method Summary
 NounExpr asFieldAt(int index)
          Enabled:
 Slot getSlot(EvalContext ctx)
          Enabled:
 Slot getTopSlot(OuterScope outers)
          Enabled:
 void initFinal(EvalContext ctx, Object value)
          Enabled:
 boolean isOuter()
          Enabled:
 boolean mayBeAssignable()
          Enabled:
protected  Object subEval(EvalContext ctx, boolean forValue)
          Default implementation of noun eval in terms of its slot.
 
Methods inherited from class org.erights.e.elang.evm.NounExpr
asNoun, assign, computeStaticScope, getIn, getRepresentation, initSlot, matchBind, name, subPrintOn, welcome
 
Methods inherited from class org.erights.e.elang.evm.EExpr
__printOn, appendAllTo, appendTo, eval, eval, evalBool, printAsBlockOn, substitute, transform
 
Methods inherited from class org.erights.e.elang.evm.ENode
cleanCopy, copy, getOptPatternMap, getOptScopeMap, getPatternMap, getScopeMap, qbuild, setPatternMap, setScopeMap, staticScope, synEnv
 
Methods inherited from class org.erights.e.elang.evm.ParseNode
asText, getOptSpan, lnPrintOn, lnPrintOn, matchBind, matchBind, matchBind, printListOn, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myValue

private final Object myValue
Constructor Detail

LiteralNounExpr

public LiteralNounExpr(SourceSpan optSpan,
                       String name,
                       Object value)
Enabled:

Method Detail

mayBeAssignable

public boolean mayBeAssignable()
Enabled:

Specified by:
mayBeAssignable in class NounExpr

isOuter

public boolean isOuter()
Enabled:

Overrides:
isOuter in class NounExpr

getSlot

public Slot getSlot(EvalContext ctx)
Enabled:

Overrides:
getSlot in class NounExpr

getTopSlot

public Slot getTopSlot(OuterScope outers)
Enabled:

Specified by:
getTopSlot in class TopNounExpr

subEval

protected Object subEval(EvalContext ctx,
                         boolean forValue)
Description copied from class: NounExpr
Default implementation of noun eval in terms of its slot.

Overrides:
subEval in class NounExpr

asFieldAt

public NounExpr asFieldAt(int index)
Enabled:

Overrides:
asFieldAt in class NounExpr

initFinal

public void initFinal(EvalContext ctx,
                      Object value)
Enabled:

Overrides:
initFinal in class NounExpr


comments?