This changes allows transform rules to be inherited when subclassing a transform. Consider the following example:
class MyTransform < Parslet::Transform
rule(:a => simple(:x)) { ... }
rule(:b => simple(:x)) { ... }
end
class MyTransformSubclass < MyTransform
rule(:b => simple(:x)) { ... }
rule(:c => simple(:x)) { ... }
end
MyTransformSubclass should inherit rule a, override rule b, and add rule c. This makes the behavior of subclassing a Parslet::Transform consistent with the behavior of subclassing a Parslet::Parser.
This changes allows transform rules to be inherited when subclassing a transform. Consider the following example:
MyTransformSubclass
should inherit rulea
, override ruleb
, and add rulec
. This makes the behavior of subclassing aParslet::Transform
consistent with the behavior of subclassing aParslet::Parser
.