Navigation
Synopsis Set the value of an Annotation.
Syntax Exp1[@Name = Exp2]
Description Expression that sets the value of annotation Name of the value Exp1 to the value of Exp2 and returns the value with the new annotation value as result. See Selection for selecting the value of an annotation.
Examples
rascal>anno str node @ color;
ok
rascal>anno str node @ size;
ok
rascal>F = "fn"(123, "abc");
node: "fn"(123,"abc")
rascal>F = F[@color="red"];
node: "fn"(123,"abc")[
  @color="red"
]
rascal>F = F[@size="10"];
node: "fn"(123,"abc")[
  @color="red",
  @size="10"
]
rascal>[email protected];
str: "red"
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.