Remove Parser#reset and PullParser#reset
This commit is contained in:
1 parent
c431c2b004
commit
3a89dcffab
3 files changed
+1
-27
No files matched your search
@@ -237,14 +237,7 @@ string_body
|
||||
def initialize(data, options = {})
|
||||
@data = data
|
||||
@lexer = Lexer.new(data, options)
|
||||
|
||||
reset
|
||||
end
|
||||
|
||||
# Resets the internal state of the parser.
|
||||
def reset
|
||||
@line = 1
|
||||
|
||||
@lexer.reset_native
|
||||
end
|
||||
|
||||
@@ -283,15 +276,6 @@ string_body
|
||||
raise LL::ParserError, message
|
||||
end
|
||||
|
||||
# @see [LL::Driver#parse]
|
||||
def parse
|
||||
retval = super
|
||||
|
||||
reset
|
||||
|
||||
retval
|
||||
end
|
||||
|
||||
# @param [Array] children
|
||||
# @return [Oga::XML::Document]
|
||||
def on_document(children = [])
|
||||
|
||||
@@ -54,13 +54,9 @@ module Oga
|
||||
:xml_declaration => XML::XmlDeclaration
|
||||
}
|
||||
|
||||
# @see Oga::XML::Parser#reset
|
||||
def reset
|
||||
def initialize(*args)
|
||||
super
|
||||
|
||||
@block = nil
|
||||
@nesting = []
|
||||
@node = nil
|
||||
end
|
||||
|
||||
# Parses the input and yields every node to the supplied block.
|
||||
|
||||
Reference in new issue
Block a user