Skip to content

Commit

Permalink
updating show() for some rules
Browse files Browse the repository at this point in the history
  • Loading branch information
vonDonnerstein committed Dec 30, 2016
1 parent 815fed6 commit 04fc079
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/rules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type Terminal <: Rule
end

function show(io::IO, t::Terminal)
print(io, t.name, t.value, string(t.action));
showRule(io, t.name, "'$(t.value)')", string(t.action))
end

function parseDefinition(name::AbstractString, value::AbstractString, pdata::ParserData)
Expand Down Expand Up @@ -299,6 +299,10 @@ type SuppressRule <: Rule
end
end

function show(io::IO, rule::SuppressRule)
showRule(io, rule.name, "-($(rule.value))", string(rule.action))
end

function -(name::AbstractString, pdata::ParserData, args::Array)
if length(args) == 1
return SuppressRule(name, parseDefinition("$(name)_value", args[1], pdata))
Expand Down

0 comments on commit 04fc079

Please sign in to comment.