Renamed XML::Lexer#t to #emit().

This commit is contained in:
Yorick Peterse 2014-03-25 09:42:52 +01:00
parent 79818eb349
commit 8ebd72158c
2 changed files with 6 additions and 6 deletions

View File

@ -545,7 +545,7 @@ begin
# line 293 "lib/oga/xml/lexer.rl" # line 293 "lib/oga/xml/lexer.rl"
begin begin
@te = p+1 @te = p+1
begin t(:T_DOCTYPE_TYPE) end begin emit(:T_DOCTYPE_TYPE) end
end end
when 26 then when 26 then
# line 240 "lib/oga/xml/lexer.rl" # line 240 "lib/oga/xml/lexer.rl"
@ -756,7 +756,7 @@ p = p - 1; end
# line 451 "lib/oga/xml/lexer.rl" # line 451 "lib/oga/xml/lexer.rl"
begin begin
@te = p @te = p
p = p - 1; begin t(:T_ATTR) end p = p - 1; begin emit(:T_ATTR) end
end end
when 3 then when 3 then
# line 284 "lib/oga/xml/lexer.rl" # line 284 "lib/oga/xml/lexer.rl"
@ -1015,7 +1015,7 @@ end
# @see #text # @see #text
# @see #add_token # @see #add_token
# #
def t(type, start = @ts, stop = @te) def emit(type, start = @ts, stop = @te)
value = text(start, stop) value = text(start, stop)
add_token(type, value) add_token(type, value)

View File

@ -136,7 +136,7 @@ module Oga
# @see #text # @see #text
# @see #add_token # @see #add_token
# #
def t(type, start = @ts, stop = @te) def emit(type, start = @ts, stop = @te)
value = text(start, stop) value = text(start, stop)
add_token(type, value) add_token(type, value)
@ -290,7 +290,7 @@ module Oga
# Machine for processing doctypes. Doctype values such as the public and # Machine for processing doctypes. Doctype values such as the public and
# system IDs are treated as T_STRING tokens. # system IDs are treated as T_STRING tokens.
doctype := |* doctype := |*
'PUBLIC' | 'SYSTEM' => { t(:T_DOCTYPE_TYPE) }; 'PUBLIC' | 'SYSTEM' => { emit(:T_DOCTYPE_TYPE) };
# Lex the public/system IDs as regular strings. # Lex the public/system IDs as regular strings.
dquote => start_string_dquote; dquote => start_string_dquote;
@ -448,7 +448,7 @@ module Oga
newline => { advance_line }; newline => { advance_line };
# Attribute names. # Attribute names.
element_name => { t(:T_ATTR) }; element_name => { emit(:T_ATTR) };
# Attribute values. # Attribute values.
dquote => start_string_dquote; dquote => start_string_dquote;