Navigation
Synopsis Retrieve the annotations of a node value as a map.
Function map[str,value] getAnnotations(node x)
Usage import Node;
Examples
rascal>import Node;
ok
Declare two string-valued annotation on nodes, named color, respectively, size:
rascal>anno str node @ color;
ok
rascal>anno str node @ size;
ok
Create a node with two annotations:
rascal>F = setAnnotations("f"(10, "abc"), ("color" : "red", "size" : "large"));
node: "f"(10,"abc")[
  @size="large",
  @color="red"
]
and retrieve those annotations:
rascal>getAnnotations(F);
map[str, value]: ("size":"large","color":"red")
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.