class Peggy::Element
Base syntax element class.
Public Class Methods
build(*args)
click to toggle source
Create an element.
# File lib/parse/builder.rb, line 17 def self::build *args new *args end
Public Instance Methods
match(parser, index)
click to toggle source
Test to see if there is a match of this element at the current index. Return’s the index following if match is found, or NO_MATCH if not
# File lib/parse/builder.rb, line 23 def match parser, index raise "Must override match" end
report(index)
click to toggle source
Used for debugging.
# File lib/parse/builder.rb, line 28 def report index # puts "#{to_s} #{index}" index end