|
Scala example source code file (LocalBuilder.scala)
The Scala LocalBuilder.scala source code/** * System.Reflection.Emit-like API for writing .NET assemblies to MSIL */ package ch.epfl.lamp.compiler.msil.emit import ch.epfl.lamp.compiler.msil.Type /** * Represents a local variable within a method or constructor. * * @author Nikolay Mihaylov * @version 1.0 */ class LocalBuilder(_slot : Int, localType : Type) extends Visitable { /** * the type of the local variable. */ var LocalType : Type = localType // the name of the local variable var name : String = "L_" + slot // the slot occupied by this local in the corresponding ILGenerator var slot : Int = _slot /** * Sets the name of this local variable. */ def SetLocalSymInfo(name : String) { this.name = name } override def toString() : String = name /** * the apply method for a visitor */ def apply(v : Visitor) { v.caseLocalBuilder(this) } } Other Scala examples (source code examples)Here is a short list of links related to this Scala LocalBuilder.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.