Skip to content

Commit

Permalink
loc nodes get filename labels by default
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Feb 14, 2024
1 parent aacd5bd commit f34dc15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/org/rascalmpl/library/vis/Graphs.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ loc defaultNodeLinker(/loc l) = l;
default loc defaultNodeLinker(&T _) = |nothing:///|;
alias NodeLabeler[&T]= str (&T _id2);
loc defaultNodeLinker(/str s) = s;
str defaultNodeLabeler(/str s) = s;
str defaultNodeLabeler(loc l) = l.file != "" ? l.file : "<l>";
default str defaultNodeLabeler(&T v) = "<v>";
alias EdgeLabeler[&T]= str (&T _source, &T _target);
Expand Down

0 comments on commit f34dc15

Please sign in to comment.