JuliaLang/julia

parse command interpolations at parse time

Open

#3,150 opened on May 19, 2013

View on GitHub
 (13 comments) (0 reactions) (0 assignees)Julia (5,773 forks)batch import
help wantedparser

Repository metrics

Stars
 (48,709 stars)
PR merge metrics
 (Avg merge 20d 6h) (157 merged PRs in 30d)

Description

It would be nice to have a way to "double interpolate" a variable with respects to nested possible interpolation contexts to make it easier to write quoted code blocks that wants to interpolate a variable inside a string. e.g., so the below code echos "hi". Not sure what the best way to go about that is.

macro example()
 f="hi"
 quote
  run(`echo $$f`)
 end
end

Contributor guide