@@ -123,33 +123,6 @@ function expand_inline_func(x, server, conn)
123123 end
124124end
125125
126-
127- function add_default_constructor (x:: EXPR , server, conn)
128- sexpr = _get_parent_fexpr (x, CSTParser. defines_struct)
129- ! (sexpr. args isa Vector{EXPR}) && return
130- ismutable = length (sexpr. args) == 5
131- name = CSTParser. get_name (sexpr)
132- sig = sexpr. args[2 + ismutable]
133- block = sexpr. args[3 + ismutable]
134-
135- isempty (block. args) && return
136- any (CSTParser. defines_function (a) for a in block. args) && return # constructor already exists
137-
138- newtext = string (" \n function $(valof (name)) (args...)\n\n new" )
139- # if DataType is parameterised do something here
140-
141- newtext = string (newtext, " (" )
142- for i in 1 : length (block. args)
143- newtext = string (newtext, " " , valof (CSTParser. get_arg_name (block. args[i])))
144- newtext = string (newtext, i < length (block. args) ? " , " : " )\n end" )
145- end
146- file, offset = get_file_loc (last (block. args))
147- offset += last (block. args). span
148- tde = TextDocumentEdit (VersionedTextDocumentIdentifier (file. _uri, file. _version), TextEdit[TextEdit (Range (file, offset: offset), newtext)])
149-
150- JSONRPC. send (conn, workspace_applyEdit_request_type, ApplyWorkspaceEditParams (missing , WorkspaceEdit (missing , TextDocumentEdit[tde])))
151- end
152-
153126function is_in_fexpr (x:: EXPR , f)
154127 if f (x)
155128 return true
0 commit comments