eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ParseNode':

Home

everywhere
www.exept.de
for:
[back]

Class: ParseNode


Inheritance:

   Object
   |
   +--ParseNode
      |
      +--AssignmentNode
      |
      +--BlockNode
      |
      +--JavaScriptClassNode
      |
      +--JavaScriptFunctionNode
      |
      +--JavaScriptParser::CommaExpression
      |
      +--JavaScriptParser::ConditionalNode
      |
      +--MessageNode
      |
      +--PrimaryNode
      |
      +--ProgramNode
      |
      +--StatementNode

Package:
stx:libcomp
Category:
System-Compiler-Support
Version:
rev: 1.51 date: 2010/01/18 16:01:35
user: cg
file: ParseNode.st directory: libcomp
module: stx stc-classLibrary: libcomp
Author:
Claus Gittinger

Description:


node for parse-trees; abstract class
This is a helper class for the compiler.


Class protocol:

code generation helpers
o  codeLineNumber: nr on: aStream for: aCompiler
generate lineNumber information

instance creation
o  type: t


Instance protocol:

accessing
o  endPosition: aCharacterPosition
ignored here

o  lineNumber: dummy
set linenumber - ignored here

o  parenthesized

o  parenthesized: aBoolean

o  parenthized
obsolete - typo in message name - use parenthesized

o  parenthized: aBoolean
obsolete - typo in message name - use parenthesized:

o  selectorPosition: aCharacterPosition
ignored here

o  startPosition: aCharacterPosition
ignored here

o  type
return the nodes type

checks
o  plausibilityCheckIn: aParser

code generation
o  codeForSideEffectOn: aStream inBlock: b for: aCompiler
generate code for this statement - value not needed

o  codeForSimpleReturnOn: aStream inBlock: b lineNumber: lineNrOrNil for: aCompiler
generate code to return myself as a simple method return

o  codeInlineOn: aStream inBlock: b valueNeeded: valueNeeded for: aCompiler
generate code for this statement - value is needed

o  codeLineNumber: nr on: aStream for: aCompiler
generate lineNumber information

o  codeOn: aStream inBlock: codeBlock for: aCompiler

** This method raises an error - it must be redefined in concrete classes **

code generation helpers
o  emitPushGlobalWithLiteralIndex: litIndex on: aTokenCodeStream for: aCompiler

o  emitPushLiteral: value on: aTokenCodeStream for: aCompiler

o  emitPushLiteralIndex: index on: aTokenCodeStream for: aCompiler

o  emitSendLiteralIndex: litIndex numArgs: nargs line: lineNr on: aStream

o  emitStoreGlobalWithLiteralIndex: litIndex on: aTokenCodeStream for: aCompiler

o  emitSuperSendLiteralIndex: litIndex classLiteralIndex: clsLitIndex numArgs: nargs line: lineNr on: aStream

enumeration
o  messagesDo: aBlock

evaluation
o  evaluate

o  evaluateForCascade

o  evaluateForCascadeIn: anEnvironment

o  evaluateIn: anEnvironment

** This method raises an error - it must be redefined in concrete classes **

printing & storing
o  printOn: aStream
append a user printed representation of the receiver to aStream.
The format is suitable for a human - not meant to be read back.

o  printOn: aStream indent: indent
append a user printed representation of the receiver to aStream.
The format is suitable for a human - not meant to be read back.

** This method raises an error - it must be redefined in concrete classes **

o  printOn: aStream indent: indent parenthized: parenthized

private
o  type: t
set the nodes type

queries
o  canReuseAsArg: anotherNode

o  collectBlocksInto: aCollection

o  precedence

o  withConstantValueDo: aBlock
return true, if this evaluates to a constant value
and evaluate aBlock with it

testing
o  isAssignment
return true, if this is a node for an assignment

o  isBinaryMessage
return true, if this is a node for a binary send

o  isBlockNode
return true, if this is a node for a block

o  isCascade

o  isCascadeToSuper

o  isConstant
return true, if this is a node for a constant

o  isErrorNode

o  isGlobal
return true, if this is a node for a global variable

o  isGlobalNamed: globalName
return true, if this is a node for a particular global variable

o  isGlobalVariable

o  isImmutable
not used with ST/X -
for JavaScript nodes return true here.

o  isInnerJavaScriptBlock

o  isMessage
return true, if this is a node for a message expression

o  isMethodVariable

o  isNew
return true, if this is a new XXXX node

o  isPostIncDec
for JavaScript

o  isPreIncDec
for JavaScript

o  isPrimary
return true, if this is a node for a primary (i.e. non-send)

o  isReturnNode
return true, if this is a node for a return expression

o  isSelf
return true, if this is a self-node

o  isSuper
return true, if this is a super-node

o  isThis
for JavaScript

o  isUnaryMessage
return true, if this is a node for a unary send

o  isVariable
return true, if this is a node for a variable



ST/X 6.1.1; WebServer 1.620 at exept:8081; Tue, 22 May 2012 21:34:57 GMT