# Interpolate inner quote

**URL:** <https://discourse.julialang.org/t/interpolate-inner-quote/9563>\
**Category:** General Usage\
**Created:** [March 7, 2018, 8:39am UTC](https://discourse.julialang.org/t/interpolate-inner-quote/9563 "2018-03-07T08:39:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaroslav\_Kavenchuk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yaroslav_kavenchuk/32/7642_2.png) [@Yaroslav\_Kavenchuk](https://discourse.julialang.org/u/Yaroslav_Kavenchuk)\
**Post date:** [March 7, 2018, 8:39am UTC](https://discourse.julialang.org/t/interpolate-inner-quote/9563/1 "2018-03-07T08:39:13Z")

</div>

Code

```julia
module Mod1
export @Mac1
macro Mac1(name::Symbol, moreslots::Integer=0)
	quote
		struct $name
			filed1::UInt8
			field2::UInt16
			$(moreslots > 0 ? 
				quote
					field3::UInt32
					$name() = new(0,0,0)
				end :
				quote
					$name() = new(0,0)
				end)
		end
	end
end
end

@macroexpand Mod1.@Mac1 STR2 1

```

I get:

```julia
...
field2::Main.Mod1.UInt16
begin
    Main.Mod1.field3::Main.Mod1.UInt32

```

If I escape inner quote

```julia
...
				esc(quote
					field3::UInt32
					$name() = new(0,0,0)
				end) :
...

```

then I get

```julia
...
begin
    field3::UInt32
...

```

Why I need escaped inner quote?
