Squeak Class Documentation category index | class index  
 
ParseNode
  category: System-Compiler
  superclass: Object
  subclasses: MethodNode AssignmentNode DecompilerConstructor LeafNode CascadeNode BraceNode Encoder BlockNode BlockArgsNode CommentNode MethodTempsNode MessageNode ReturnNode

This superclass of most compiler/decompiler classes declares common class variables, default messages, and the code emitters for jumps. Some of the class variables are initialized here; the rest are initialized in class VariableNode.

instance methods
  code generation
  emitBranchOn:dist:pop:on:
emitForEffect:on:
emitForReturn:on:
emitJump:on:
emitLong:code:on:
emitShortOrLong:code:on:
pc
sizeBranchOn:dist:
sizeForEffect:
sizeForReturn:
sizeJump:
sizeShortOrLong:

  comment
  comment
comment:

  converting
  asReturnNode

  encoding
  encodeSelector:

  printing
  nodePrintOn:indent:
printCommentOn:indent:
printOn:
printOn:indent:
printOn:indent:precedence:

  private
  nextWordFrom:setCharacter:
printSingleComment:on:indent:

  testing
  assignmentCheck:at:
canBeSpecialArgument
canCascade
isArg
isComplex
isConstantNumber
isLiteral
isMessage:receiver:arguments:
isReturnSelf
isReturningIf
isSelfPseudoVariable
isSpecialConstant
isTemp
isUndefTemp
isUnusedTemp
isVariableReference
nowHasDef
nowHasRef
toDoIncrement:

  tiles
  addCommentToMorph:
asMorphicSyntaxIn:
currentValueIn:
explanation

class methods
  class initialization
  initialize

instance methods
  code generation top  
 

emitBranchOn:dist:pop:on:


 

emitForEffect:on:


 

emitForReturn:on:


 

emitJump:on:


 

emitLong:code:on:

Force a two-byte jump.


 

emitShortOrLong:code:on:


 

pc

Used by encoder source mapping.


 

sizeBranchOn:dist:


 

sizeForEffect:


 

sizeForReturn:


 

sizeJump:


 

sizeShortOrLong:


  comment top  
 

comment


 

comment:


  converting top  
 

asReturnNode


  encoding top  
 

encodeSelector:


  printing top  
 

nodePrintOn:indent:

Show just the sub nodes and the code.


 

printCommentOn:indent:


 

printOn:

Refer to the comment in Object|printOn:.


 

printOn:indent:

If control gets here, avoid recursion loop.


 

printOn:indent:precedence:


  private top  
 

nextWordFrom:setCharacter:


 

printSingleComment:on:indent:

Print the comment string, assuming it has been indented indent tabs.
Break the string at word breaks, given the widths in the default
font, at 450 points.


  testing top  
 

assignmentCheck:at:

For messageNodes masquerading as variables for the debugger.
For now we let this through - ie we allow stores ev
into args. Should check against numArgs, though.


 

canBeSpecialArgument

Can I be an argument of (e.g.) ifTrue:?


 

canCascade


 

isArg


 

isComplex

Used for pretty printing to determine whether to start a new line


 

isConstantNumber

Overridden in LiteralNode


 

isLiteral

Answer whether the receiver has a literal text form recognized by the
compiler.


 

isMessage:receiver:arguments:

See comment in MessageNode.


 

isReturnSelf


 

isReturningIf


 

isSelfPseudoVariable

Overridden in VariableNode.


 

isSpecialConstant


 

isTemp


 

isUndefTemp


 

isUnusedTemp


 

isVariableReference


 

nowHasDef

Ignored in all but VariableNode


 

nowHasRef

Ignored in all but VariableNode


 

toDoIncrement:

Only meant for Messages or Assignments - else return nil


  tiles top  
 

addCommentToMorph:


 

asMorphicSyntaxIn:

Default for missing implementations


 

currentValueIn:


 

explanation


class methods
  class initialization top  
 

initialize

ParseNode initialize. VariableNode initialize