Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/russtoku/conjure
Browse files Browse the repository at this point in the history
  • Loading branch information
russtoku committed Nov 16, 2024
2 parents c32988a + 3aa8ffc commit 7a8aac8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
4 changes: 4 additions & 0 deletions dev/julia/sandbox.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
using Pkg
Pkg.activate("project")
Pkg.activate

1 + 1

function add(x, y)
Expand Down
16 changes: 13 additions & 3 deletions fnl/conjure/client/julia/stdio.fnl
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
(local {: autoload} (require :nfnl.module))
(local a (autoload :conjure.aniseed.core))
(local extract (autoload :conjure.extract))
(local str (autoload :conjure.aniseed.string))
(local stdio (autoload :conjure.remote.stdio))
(local config (autoload :conjure.config))
(local text (autoload :conjure.text))
(local mapping (autoload :conjure.mapping))
(local client (autoload :conjure.client))
(local log (autoload :conjure.log))
Expand Down Expand Up @@ -32,7 +30,18 @@
(local buf-suffix ".jl")
(local comment-prefix "# ")

(fn with-repl-or-warn [f opts]
(fn form-node? [node]
(let [parent (node:parent)]
(and
;; Pkg.activate(...) should execute the expression Pkg.foo should just return foo.
(not (and
(= "call_expression" (parent:type))
(= "field_expression" (node:type))))

;; Don't eval arg lists as tuples, just evaluate the call_expression above.
(not= "argument_list" (node:type)))))

(fn with-repl-or-warn [f _opts]
(let [repl (state :repl)]
(if repl
(f repl)
Expand Down Expand Up @@ -176,6 +185,7 @@
{: buf-suffix
: comment-prefix
: unbatch
: form-node?
: format-msg
: get-form-modifier
: eval-str
Expand Down
10 changes: 6 additions & 4 deletions lua/conjure/client/julia/stdio.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7a8aac8

Please sign in to comment.