@@ -14,9 +14,9 @@ module Haml
1414 "strict" => "Strict" ,
1515 "xml" => "XML"
1616 }
17-
18- DOCTYPE_VERSIONS = [ " 1.1" , "5" ]
19-
17+
18+ DOCTYPE_VERSIONS = %w[ 1.1 5 ]
19+
2020 # This is the parent class of the various visitors that we provide to access
2121 # the HAML syntax tree.
2222 class Visitor
@@ -55,15 +55,24 @@ class Haml::Parser::ParseNode
5555 # accept a visitor in order to walk through the tree.
5656 def accept ( visitor )
5757 case type
58- in :comment then visitor . visit_comment ( self )
59- in :doctype then visitor . visit_doctype ( self )
60- in :filter then visitor . visit_filter ( self )
61- in :haml_comment then visitor . visit_haml_comment ( self )
62- in :plain then visitor . visit_plain ( self )
63- in :root then visitor . visit_root ( self )
64- in :script then visitor . visit_script ( self )
65- in :silent_script then visitor . visit_silent_script ( self )
66- in :tag then visitor . visit_tag ( self )
58+ in :comment
59+ visitor . visit_comment ( self )
60+ in :doctype
61+ visitor . visit_doctype ( self )
62+ in :filter
63+ visitor . visit_filter ( self )
64+ in :haml_comment
65+ visitor . visit_haml_comment ( self )
66+ in :plain
67+ visitor . visit_plain ( self )
68+ in :root
69+ visitor . visit_root ( self )
70+ in :script
71+ visitor . visit_script ( self )
72+ in :silent_script
73+ visitor . visit_silent_script ( self )
74+ in :tag
75+ visitor . visit_tag ( self )
6776 end
6877 end
6978
0 commit comments