diff --git a/autocompletecontext.go b/autocompletecontext.go index d9f6a6ac..0a5c3598 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -659,7 +659,6 @@ func check_type_expr(e ast.Expr) bool { default: return true } - return true } //------------------------------------------------------------------------- diff --git a/cursorcontext.go b/cursorcontext.go index b4f8bff5..92c036b1 100644 --- a/cursorcontext.go +++ b/cursorcontext.go @@ -35,10 +35,8 @@ type token_item struct { func (i token_item) literal() string { if i.tok.IsLiteral() { return i.lit - } else { - return i.tok.String() } - return "" + return i.tok.String() } func new_token_iterator(src []byte, cursor int) token_iterator { diff --git a/decl.go b/decl.go index 17a3b3ba..7709c5fe 100644 --- a/decl.go +++ b/decl.go @@ -118,7 +118,6 @@ func ast_decl_type(d ast.Decl) ast.Expr { return t.Type } panic("unreachable") - return nil } func ast_decl_flags(d ast.Decl) decl_flags {