Access

final case class Access(a: LValue, b: LValue, evalType: Type, promoteToType: Option[Type]) extends LValue

Access a field of a Struct

To access members of a struct like a.x, we trigger two ref operations. The first ref operation looks up a to figure out what type it is. The second ref then resolves x within a’s scope (upon seeing the . node). We match (possibly nested) member access expressions, e.g.:

   "a", "a.b", "a.b.c", and so on

Given «expr».x, member need’s «expr»’s type because it must look up x with the scope of «expr».

Companion:
object
trait Serializable
trait Product
trait Equals
class LValue
class Expr
class Stat
class AST
class Object
trait Matchable
class Any

Value members

Concrete methods

def path: String
override def visit[S, R](s: S, v: TreeVisitor[S, R]): Either[Throwable, R]
Definition Classes
override def withPromoteToType(t: Option[Type]): Access
Definition Classes

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product