Skip to content

Commit 70dabff

Browse files
authored
Merge pull request #81 from julia-vscode/pass-context
Pass context through
2 parents 1172d24 + d08f61c commit 70dabff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/typed.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@ macro message_dispatcher(name, body)
9999
param_type = get_param_type($(esc(i.args[2])))
100100
params = param_type === Nothing ? nothing : param_type <: NamedTuple ? convert(param_type,(;(Symbol(i[1])=>i[2] for i in msg["params"])...)) : param_type(msg["params"])
101101

102-
res = $(esc(i.args[3]))(x, params)
102+
if context===nothing
103+
res = $(esc(i.args[3]))(x, params)
104+
else
105+
res = $(esc(i.args[3]))(x, params, context)
106+
end
103107

104108
if $(esc(i.args[2])) isa RequestType
105109
if res isa JSONRPCError

0 commit comments

Comments
 (0)