Skip to content

Commit

Permalink
Merge pull request #81 from julia-vscode/pass-context
Browse files Browse the repository at this point in the history
Pass context through
  • Loading branch information
davidanthoff authored Aug 22, 2024
2 parents 1172d24 + d08f61c commit 70dabff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/typed.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ macro message_dispatcher(name, body)
param_type = get_param_type($(esc(i.args[2])))
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"])

res = $(esc(i.args[3]))(x, params)
if context===nothing
res = $(esc(i.args[3]))(x, params)
else
res = $(esc(i.args[3]))(x, params, context)
end

if $(esc(i.args[2])) isa RequestType
if res isa JSONRPCError
Expand Down

0 comments on commit 70dabff

Please sign in to comment.