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

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

No files matched your search

+3 -3
View File
@@ -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)
+3 -3
View File
@@ -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;