Squeak Class Documentation category index | class index  
 
BraceNode
  category: System-Compiler
  superclass: ParseNode
  subclasses:

Used for compiling and decompiling brace constructs.

These now compile into either a fast short form for 4 elements or less:
Array braceWith: a with: b ...
or a long form of indefinfite length:
(Array braceStream: N) nextPut: a; nextPut: b; ...; braceArray.

The erstwhile brace assignment form is no longer supported.

instance methods
  code generation
  emitForValue:on:
selectorForShortForm:
sizeForValue:

  enumerating
  casesForwardDo:
casesReverseDo:

  initialize-release
  elements:
elements:sourceLocations:
matchBraceStreamReceiver:messages:
matchBraceWithReceiver:selector:arguments:

  printing
  printOn:indent:

  testing
  blockAssociationCheck:
numElements

  tiles
  asMorphicSyntaxIn:

class methods
  examples
  example

instance methods
  code generation top  
 

emitForValue:on:


 

selectorForShortForm:


 

sizeForValue:


  enumerating top  
 

casesForwardDo:

For each case in forward order, evaluate aBlock with three arguments:
the key block, the value block, and whether it is the last case.


 

casesReverseDo:

For each case in reverse order, evaluate aBlock with three arguments:
the key block, the value block, and whether it is the last case.


  initialize-release top  
 

elements:

Decompile.


 

elements:sourceLocations:

Compile.


 

matchBraceStreamReceiver:messages:


 

matchBraceWithReceiver:selector:arguments:


  printing top  
 

printOn:indent:

If control gets here, avoid recursion loop.


  testing top  
 

blockAssociationCheck:

If all elements are MessageNodes of the form [block]->[block], and there is at
least one element, answer true.
Otherwise, notify encoder of an error.


 

numElements


  tiles top  
 

asMorphicSyntaxIn:

Default for missing implementations


class methods
  examples top  
 

example

Test the {a. b. c} syntax.