Class: Piggly::Parser::Nodes::TWhitespace

Inherits:
NodeClass show all
Defined in:
lib/piggly/parser/nodes.rb

Overview

This seems like it should be a Token, but it may contain TComment children that should be highlighted differently than the enclosing whitespace

Instance Attribute Summary

Attributes inherited from NodeClass

#source_text

Instance Method Summary collapse

Methods inherited from NodeClass

#assignment?, #block?, #branch?, #comment?, #datatype?, #else?, #expression?, #for?, #identifier?, #if?, #indent, #keyword?, #label?, #loop?, #named?, #sql?, #statement?, #string?, #stub?, #style, #tag, #tag_id, #tagged?, #token?, #while?

Methods included from Traversal

#count, #find, #flatten, #inject, #select

Instance Method Details

#terminal?Boolean

Returns:

  • (Boolean)


287
288
289
# File 'lib/piggly/parser/nodes.rb', line 287

def terminal?
  false
end

#whitespace?Boolean

Returns:

  • (Boolean)


291
292
293
# File 'lib/piggly/parser/nodes.rb', line 291

def whitespace?
  true
end