Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class BoldVisitor
- def visit(node)
- "<strong>#{node.value}</strong>"
- end
- end
- class EmphasisVisitor
- def visit(node)
- "<em>#{node.value}</em>"
- end
- end
- class TextVisitor
- def visit(node)
- node.value
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement