We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8779d0 commit 45faed0Copy full SHA for 45faed0
1 file changed
go/ql/lib/semmle/go/Expr.qll
@@ -724,16 +724,19 @@ class GenericTypeInstantiationExpr extends Expr {
724
* ```go
725
* a[1:3]
726
* a[1:3:5]
727
+ * a[1:]
728
+ * a[:3]
729
+ * a[:]
730
* ```
731
*/
732
class SliceExpr extends @sliceexpr, Expr {
733
/** Gets the base of this slice expression. */
734
Expr getBase() { result = this.getChildExpr(0) }
735
- /** Gets the lower bound of this slice expression. */
736
+ /** Gets the lower bound of this slice expression, if any. */
737
Expr getLow() { result = this.getChildExpr(1) }
738
- /** Gets the upper bound of this slice expression. */
739
+ /** Gets the upper bound of this slice expression, if any. */
740
Expr getHigh() { result = this.getChildExpr(2) }
741
742
/** Gets the maximum of this slice expression, if any. */
0 commit comments