Renamed XML::Lexer#t to #emit().
This commit is contained in:
parent
79818eb349
commit
8ebd72158c
|
@ -545,7 +545,7 @@ begin
|
|||
# line 293 "lib/oga/xml/lexer.rl"
|
||||
begin
|
||||
@te = p+1
|
||||
begin t(:T_DOCTYPE_TYPE) end
|
||||
begin emit(:T_DOCTYPE_TYPE) end
|
||||
end
|
||||
when 26 then
|
||||
# line 240 "lib/oga/xml/lexer.rl"
|
||||
|
@ -756,7 +756,7 @@ p = p - 1; end
|
|||
# line 451 "lib/oga/xml/lexer.rl"
|
||||
begin
|
||||
@te = p
|
||||
p = p - 1; begin t(:T_ATTR) end
|
||||
p = p - 1; begin emit(:T_ATTR) end
|
||||
end
|
||||
when 3 then
|
||||
# line 284 "lib/oga/xml/lexer.rl"
|
||||
|
@ -1015,7 +1015,7 @@ end
|
|||
# @see #text
|
||||
# @see #add_token
|
||||
#
|
||||
def t(type, start = @ts, stop = @te)
|
||||
def emit(type, start = @ts, stop = @te)
|
||||
value = text(start, stop)
|
||||
|
||||
add_token(type, value)
|
||||
|
|
|
@ -136,7 +136,7 @@ module Oga
|
|||
# @see #text
|
||||
# @see #add_token
|
||||
#
|
||||
def t(type, start = @ts, stop = @te)
|
||||
def emit(type, start = @ts, stop = @te)
|
||||
value = text(start, stop)
|
||||
|
||||
add_token(type, value)
|
||||
|
@ -290,7 +290,7 @@ module Oga
|
|||
# Machine for processing doctypes. Doctype values such as the public and
|
||||
# system IDs are treated as T_STRING tokens.
|
||||
doctype := |*
|
||||
'PUBLIC' | 'SYSTEM' => { t(:T_DOCTYPE_TYPE) };
|
||||
'PUBLIC' | 'SYSTEM' => { emit(:T_DOCTYPE_TYPE) };
|
||||
|
||||
# Lex the public/system IDs as regular strings.
|
||||
dquote => start_string_dquote;
|
||||
|
@ -448,7 +448,7 @@ module Oga
|
|||
newline => { advance_line };
|
||||
|
||||
# Attribute names.
|
||||
element_name => { t(:T_ATTR) };
|
||||
element_name => { emit(:T_ATTR) };
|
||||
|
||||
# Attribute values.
|
||||
dquote => start_string_dquote;
|
||||
|
|
Loading…
Reference in New Issue