Skip to content

Commit 45faed0

Browse files
committed
Improve SliceExpr documentation
1 parent c8779d0 commit 45faed0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

go/ql/lib/semmle/go/Expr.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,16 +724,19 @@ class GenericTypeInstantiationExpr extends Expr {
724724
* ```go
725725
* a[1:3]
726726
* a[1:3:5]
727+
* a[1:]
728+
* a[:3]
729+
* a[:]
727730
* ```
728731
*/
729732
class SliceExpr extends @sliceexpr, Expr {
730733
/** Gets the base of this slice expression. */
731734
Expr getBase() { result = this.getChildExpr(0) }
732735

733-
/** Gets the lower bound of this slice expression. */
736+
/** Gets the lower bound of this slice expression, if any. */
734737
Expr getLow() { result = this.getChildExpr(1) }
735738

736-
/** Gets the upper bound of this slice expression. */
739+
/** Gets the upper bound of this slice expression, if any. */
737740
Expr getHigh() { result = this.getChildExpr(2) }
738741

739742
/** Gets the maximum of this slice expression, if any. */

0 commit comments

Comments
 (0)