Navigation
Synopsis Add a map of annotations to a node value.
Function &T <: node setAnnotations(&T <: node x, map[str, value] annotations)
Usage import Node;
Description Set the annotations on node value x as described by the map annotations.
Examples
rascal>import Node;
ok
rascal>setAnnotations("f"(10, "abc"), ("color" : "red", "size" : "large"));
node: "f"(10,"abc")[
  @size="large",
  @color="red"
]
Pitfalls This function may result in run-time type errors later if you store a value with a label that has an incomparable annotation type declared.
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.