Search in sources :

Example 1 with BlockNode

use of cz.cuni.mff.d3s.trupple.language.nodes.statement.BlockNode in project TrufflePascal by Aspect26.

the class UnitLexicalScope method createInitializationBlock.

@Override
BlockNode createInitializationBlock() {
    VirtualFrame unitFrame = PascalLanguage.INSTANCE.createUnitFrame(this.getName(), this.getFrameDescriptor());
    List<StatementNode> initializationNodes = this.generateInitializationNodes(unitFrame);
    initializationNodes.addAll(this.scopeInitializationNodes);
    return new BlockNode(initializationNodes.toArray(new StatementNode[initializationNodes.size()]));
}
Also used : VirtualFrame(com.oracle.truffle.api.frame.VirtualFrame) BlockNode(cz.cuni.mff.d3s.trupple.language.nodes.statement.BlockNode) StatementNode(cz.cuni.mff.d3s.trupple.language.nodes.statement.StatementNode)

Aggregations

VirtualFrame (com.oracle.truffle.api.frame.VirtualFrame)1 BlockNode (cz.cuni.mff.d3s.trupple.language.nodes.statement.BlockNode)1 StatementNode (cz.cuni.mff.d3s.trupple.language.nodes.statement.StatementNode)1