Tuple FieldSelection
rascal-0.41.2
Synopsis
Select a field from a node by its field name.
Syntax
Exp . Name
Types
Exp | Name | Exp . Name |
|---|---|---|
tuple[T₁ L₁, ..., Tₙ Lₙ] | Lᵢ | Tᵢ |
Description
Field selection applies to nodes with names keyword fields. Exp should evaluate to a node with field Name and returns the value of that field. Name stands for itself and is not evaluated.
Examples
rascal>tuple[int a, str b] T = <1,"hello">;
tuple[int a,str b]: <1,"hello">
rascal>T.a
int: 1
rascal>T.b
str: "hello"
───
hello
───