From f34dc15b851c33f16acd8f48164113953697ab24 Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Wed, 14 Feb 2024 15:30:49 +0100 Subject: [PATCH] loc nodes get filename labels by default --- src/org/rascalmpl/library/vis/Graphs.rsc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/rascalmpl/library/vis/Graphs.rsc b/src/org/rascalmpl/library/vis/Graphs.rsc index c12ca17497c..f1256217f35 100644 --- a/src/org/rascalmpl/library/vis/Graphs.rsc +++ b/src/org/rascalmpl/library/vis/Graphs.rsc @@ -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 : ""; default str defaultNodeLabeler(&T v) = ""; alias EdgeLabeler[&T]= str (&T _source, &T _target);