Sha256: 61c0a769dc45f052667653d4c1b8ada89c1e87d6d41a537261444da3ede754db
Contents?: true
Size: 637 Bytes
Versions: 1
Compression:
Stored size: 637 Bytes
Contents
=begin Copyright 2011 Shane Brinkman-Davis See README for licence information. http://babel-bridge.rubyforge.org/ =end module BabelBridge # used for String and Regexp PatternElements # not subclassed class TerminalNode < Node attr_accessor :pattern, :trailing_whitespace_offset def initialize(parent,range,pattern) node_init(parent) self.offset = range.min self.match_length = range.max-range.min self.pattern = pattern end def inspect(options={}) "#{text.inspect}" unless options[:simple] && text[/^\s*$/] # if simple && node only matched white-space, return nil end def matches; [self]; end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
babel_bridge-0.4.0 | lib/nodes/terminal_node.rb |