github.com/cheshirekow/buildtools@v0.0.0-20200224190056-5d637702fe81/build/testdata/043.in (about)

     1  bar = "bar"
     2  # This gets an empty expr_opt in the parser, causing a nil to appear.
     3  b = bar[:-2]
     4  
     5  # Test that slices and partial slices are parsed properly
     6  f = foo[-1:-2:-3]
     7  
     8  f = foo[1 : :]
     9  
    10  f = foo[: 1 :]
    11  
    12  f = foo[: : 1]
    13  
    14  f = foo[: :]
    15  
    16  f = foo[ : ]