class ERLE::Ref
Public Class Methods
new(input)
click to toggle source
# File lib/erle/elements/ref.rb, line 10 def initialize(input) @input = input end
parse(parser)
click to toggle source
# File lib/erle/elements/ref.rb, line 20 def self.parse(parser) result = parser.scan(@pattern) if close && !parser.scan(close) raise parser.raise_unexpected_token("Expected term closure \" #{close.source} \"") end # Make sure we kill any trailing close # TODO: Consider raising if no match? # TODO: Consider doing only if we started with an opening... # parser.scan(ERLE::Registry.closings_regex) new(result) end