this function is called when the cursor is at the '.' and you need to get the declaration before that dot
(iter *token_iterator)
| 262 | // this function is called when the cursor is at the '.' and you need to get the |
| 263 | // declaration before that dot |
| 264 | func (c *auto_complete_context) deduce_cursor_decl(iter *token_iterator) (*decl, ast.Expr) { |
| 265 | expr, err := parser.ParseExpr(iter.extract_go_expr()) |
| 266 | if err != nil { |
| 267 | return nil, nil |
| 268 | } |
| 269 | return expr_to_decl(expr, c.current.scope), expr |
| 270 | } |
| 271 | |
| 272 | // try to find and extract the surrounding struct literal type |
| 273 | func (c *auto_complete_context) deduce_struct_type_decl(iter *token_iterator) *decl { |
no test coverage detected