|
|
Class: ParseNode
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
node for parse-trees; abstract class
This is a helper class for the compiler.
code generation helpers
-
codeLineNumber: nr on: aStream for: aCompiler
-
generate lineNumber information
instance creation
-
type: t
-
accessing
-
endPosition: aCharacterPosition
-
ignored here
-
lineNumber: dummy
-
set linenumber - ignored here
-
parenthesized
-
-
parenthesized: aBoolean
-
-
parenthized
-
obsolete - typo in message name - use parenthesized
-
parenthized: aBoolean
-
obsolete - typo in message name - use parenthesized:
-
selectorPosition: aCharacterPosition
-
ignored here
-
startPosition: aCharacterPosition
-
ignored here
-
type
-
return the nodes type
checks
-
plausibilityCheckIn: aParser
-
code generation
-
codeForSideEffectOn: aStream inBlock: b for: aCompiler
-
generate code for this statement - value not needed
-
codeForSimpleReturnOn: aStream inBlock: b lineNumber: lineNrOrNil for: aCompiler
-
generate code to return myself as a simple method return
-
codeInlineOn: aStream inBlock: b valueNeeded: valueNeeded for: aCompiler
-
generate code for this statement - value is needed
-
codeLineNumber: nr on: aStream for: aCompiler
-
generate lineNumber information
-
codeOn: aStream inBlock: codeBlock for: aCompiler
-
** This method raises an error - it must be redefined in concrete classes **
code generation helpers
-
emitPushGlobalWithLiteralIndex: litIndex on: aTokenCodeStream for: aCompiler
-
-
emitPushLiteral: value on: aTokenCodeStream for: aCompiler
-
-
emitPushLiteralIndex: index on: aTokenCodeStream for: aCompiler
-
-
emitSendLiteralIndex: litIndex numArgs: nargs line: lineNr on: aStream
-
-
emitStoreGlobalWithLiteralIndex: litIndex on: aTokenCodeStream for: aCompiler
-
-
emitSuperSendLiteralIndex: litIndex classLiteralIndex: clsLitIndex numArgs: nargs line: lineNr on: aStream
-
enumeration
-
messagesDo: aBlock
-
evaluation
-
evaluate
-
-
evaluateForCascade
-
-
evaluateForCascadeIn: anEnvironment
-
-
evaluateIn: anEnvironment
-
** This method raises an error - it must be redefined in concrete classes **
printing & storing
-
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.
-
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 **
-
printOn: aStream indent: indent parenthized: parenthized
-
private
-
type: t
-
set the nodes type
queries
-
canReuseAsArg: anotherNode
-
-
collectBlocksInto: aCollection
-
-
precedence
-
-
withConstantValueDo: aBlock
-
return true, if this evaluates to a constant value
and evaluate aBlock with it
testing
-
isAssignment
-
return true, if this is a node for an assignment
-
isBinaryMessage
-
return true, if this is a node for a binary send
-
isBlockNode
-
return true, if this is a node for a block
-
isCascade
-
-
isCascadeToSuper
-
-
isConstant
-
return true, if this is a node for a constant
-
isErrorNode
-
-
isGlobal
-
return true, if this is a node for a global variable
-
isGlobalNamed: globalName
-
return true, if this is a node for a particular global variable
-
isGlobalVariable
-
-
isImmutable
-
not used with ST/X -
for JavaScript nodes return true here.
-
isInnerJavaScriptBlock
-
-
isMessage
-
return true, if this is a node for a message expression
-
isMethodVariable
-
-
isNew
-
return true, if this is a new XXXX node
-
isPostIncDec
-
for JavaScript
-
isPreIncDec
-
for JavaScript
-
isPrimary
-
return true, if this is a node for a primary (i.e. non-send)
-
isReturnNode
-
return true, if this is a node for a return expression
-
isSelf
-
return true, if this is a self-node
-
isSuper
-
return true, if this is a super-node
-
isThis
-
for JavaScript
-
isUnaryMessage
-
return true, if this is a node for a unary send
-
isVariable
-
return true, if this is a node for a variable
|