Skip to content

Commit

Permalink
also fixed Java code
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Mar 14, 2024
1 parent 389203f commit 570a6c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/org/rascalmpl/library/lang/yaml/RascalYAML.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private IConstructor loadRec(Object obj, IdentityHashMap<Object, Integer> anchor
// Structural types may be shared.
if (visited.containsKey(obj)) {
assert anchors.get(obj) != - 1;
return values.constructor(Node_reference, values.integer(anchors.get(obj)));
return values.constructor(Node_reference).asWithKeywordParameters().setParameter(ANCHOR_ANNO, values.integer(anchors.get(obj)));
}
visited.put(obj, true);

Expand Down
3 changes: 1 addition & 2 deletions src/org/rascalmpl/library/lang/yaml/YAMLTypeFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public class YAMLTypeFactory {
public static final Type Node_scalar = tf.constructor(yaml, Node, "scalar",
tf.valueType(), "value");

public static final Type Node_reference = tf.constructor(yaml, Node, "reference",
tf.integerType(), "anchor");
public static final Type Node_reference = tf.constructor(yaml, Node, "reference");

public static final Type Node_mapping = tf.constructor(yaml, Node, "mapping",
tf.mapType(Node, Node), "map");
Expand Down

0 comments on commit 570a6c8

Please sign in to comment.