diff options
author | Laurent Le Brun <laurentlb@google.com> | 2015-08-04 12:15:28 +0000 |
---|---|---|
committer | John Field <jfield@google.com> | 2015-08-04 20:25:41 +0000 |
commit | d1367eae6ab5824b5b9f23f2d93e764e1e47de84 (patch) | |
tree | 3a16f7b29bf31750156920384a1a7e6b2e4e6aed /src/main/java/com/google/devtools/build/lib/syntax | |
parent | 9c569e31c2daa0492c05d195a9795eeabebce4a5 (diff) |
Skylark, improve doc for Label.relative
--
MOS_MIGRATED_REVID=99813196
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/syntax')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/syntax/Label.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/Label.java b/src/main/java/com/google/devtools/build/lib/syntax/Label.java index 61621b94b9..fca4a22d01 100644 --- a/src/main/java/com/google/devtools/build/lib/syntax/Label.java +++ b/src/main/java/com/google/devtools/build/lib/syntax/Label.java @@ -336,10 +336,10 @@ public final class Label implements Comparable<Label>, Serializable { "Resolves a label that is either absolute (starts with <code>//</code>) or relative to the" + " current package.<br>" + "For example:<br><ul>" - + "<li><code>:quux</code> relative to <code>//foo/bar:baz</code> is " - + "<code>//foo/bar:quux</code></li>" - + "<li><code>//wiz:quux</code> relative to <code>//foo/bar:baz</code> is " - + "<code>//wiz:quux</code></li></ul>") + + "<pre class=language-python>\n" + + "Label(\"//foo/bar:baz\").relative(\":quux\") == Label(\"//foo/bar:quux\")\n" + + "Label(\"//foo/bar:baz\").relative(\"//wiz:quux\") == Label(\"//wiz:quux\")\n" + + "</pre>") public Label getRelative(String relName) throws SyntaxException { if (relName.length() == 0) { throw new SyntaxException("empty package-relative label"); |