Open ReubenJ opened 6 months ago
We expect both Symbol("a_symbol") and :a_symbol to work similarly, but the colon variant doesn't currently work:
Symbol("a_symbol")
:a_symbol
g_original = @csgrammar begin Int = ... Ret = Dict(:output1 => Int) end
When you use this grammar to construct a program, you get something like
Dict{QuoteNode, Int}(:(:output1) => Int)
When we expected
Dict{Symbol, Int}(:output1 => Int)
If you use
g_fixed = @csgrammar begin Int = ... Ret = Dict(Symbol("output1") => Int) end
You get the following program
Dict{Symbol, Int}(Symbol("output1") => Int)
Which is what we expected.
TLDR: the two versions of the above grammars should result in the same expression/program
We expect both
Symbol("a_symbol")
and:a_symbol
to work similarly, but the colon variant doesn't currently work:When you use this grammar to construct a program, you get something like
When we expected
If you use
You get the following program
Which is what we expected.
TLDR: the two versions of the above grammars should result in the same expression/program