JuliaLang/julia

parse command interpolations at parse time

Open

#3150 aperta il 19 mag 2013

Vedi su GitHub
 (13 commenti) (0 reazioni) (0 assegnatari)Julia (5773 fork)batch import
help wantedparser

Metriche repository

Star
 (48.709 star)
Metriche merge PR
 (Merge medio 20g 6h) (157 PR mergiate in 30 g)

Descrizione

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

Guida contributor