blob: 711841c2c66545cd784e363197e109f342a514aa [file] [log] [blame]
package keywords
// non-matching candidate - shouldn't show up as completion
var apple = "apple"
func _() {
foo.bar() // insert some extra statements to excercise our AST surgery
variance := 123 //@item(kwVariance, "variance", "int", "var")
foo.bar()
println(var) //@complete(")", kwVariance)
}
func _() {
foo.bar()
var s struct { variance int } //@item(kwVarianceField, "variance", "int", "field")
foo.bar()
s.var //@complete(" //", kwVarianceField)
}
func _() {
channel := 123 //@item(kwChannel, "channel", "int", "var")
chan //@complete(" //", kwChannel)
foo.bar()
}
func _() {
foo.bar()
var typeName string //@item(kwTypeName, "typeName", "string", "var")
foo.bar()
type //@complete(" //", kwTypeName)
}