Skip to content

Commit

Permalink
Merge pull request #75 from Herb-AI/bug/csgrammar-macro-returns-objec…
Browse files Browse the repository at this point in the history
…t-not-expr

Bug/csgrammar macro returns object not expr
  • Loading branch information
ReubenJ authored Jul 12, 2024
2 parents aca61f9 + 04c2f4e commit ac6e12a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/csg/csg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ end
- [`@pcsgrammar`](@ref) uses a similar syntax to create probabilistic [`ContextSensitiveGrammar`](@ref)s.
"""
macro csgrammar(ex)
return expr2csgrammar(ex)
return :(expr2csgrammar($(QuoteNode(ex))))
end


Expand All @@ -126,7 +126,7 @@ end
This macro is deprecated and will be removed in future versions. Use [`@csgrammar`](@ref) instead.
"""
macro cfgrammar(ex)
return expr2csgrammar(ex)
return :(expr2csgrammar($(QuoteNode(ex))))
end

parse_rule!(v::Vector{Any}, r) = push!(v, r)
Expand Down

0 comments on commit ac6e12a

Please sign in to comment.