Class: Piggly::Parser::Nodes::TKeyword
- Defined in:
- lib/piggly/parser/nodes.rb
Instance Attribute Summary
Attributes inherited from NodeClass
Instance Method Summary collapse
Methods inherited from Token
Methods inherited from Terminal
Methods inherited from NodeClass
#assignment?, #block?, #branch?, #comment?, #datatype?, #else?, #expression?, #for?, #identifier?, #if?, #indent, #label?, #loop?, #named?, #sql?, #statement?, #string?, #stub?, #tag_id, #tagged?, #token?, #while?, #whitespace?
Methods included from Traversal
#count, #find, #flatten, #inject, #select
Constructor Details
This class inherits a constructor from Piggly::Parser::Nodes::Terminal
Instance Method Details
#keyword? ⇒ Boolean
305 306 307 |
# File 'lib/piggly/parser/nodes.rb', line 305 def keyword? true end |
#style ⇒ Object
303 |
# File 'lib/piggly/parser/nodes.rb', line 303 def style; "tK"; end |
#tag(prefix = nil, id = nil) ⇒ Object
309 310 311 312 313 314 315 316 317 |
# File 'lib/piggly/parser/nodes.rb', line 309 def tag(prefix = nil, id = nil) unless defined? @tag_id if named?(:cond) and parent.loop? Tags::UnconditionalLoopTag.new(prefix, id) else Tags::EvaluationTag.new(prefix, id) end end.tap{|tag| @tag_id = tag.id } end |