From 9975c9c430fb27afa75916b8a624eee1a865ce44 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Mon, 17 Mar 2014 21:49:49 +0100 Subject: [PATCH] Removed the emit_text_buffer Ragel action. --- lib/oga/lexer.rl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/oga/lexer.rl b/lib/oga/lexer.rl index 2a933af..0efdd6a 100644 --- a/lib/oga/lexer.rl +++ b/lib/oga/lexer.rl @@ -159,10 +159,6 @@ module Oga @text_buffer << text } - action emit_text_buffer { - emit_text_buffer - } - action buffer_string { @string_buffer << text } @@ -277,6 +273,7 @@ module Oga # Action that creates the tokens for the opening tag, name and namespace # (if any). Remaining work is delegated to a dedicated machine. action open_element { + emit_text_buffer add_token(:T_ELEM_OPEN, nil) advance_column @@ -388,22 +385,25 @@ module Oga *|; main := |* - doctype_start @emit_text_buffer => { + doctype_start => { + emit_text_buffer t(:T_DOCTYPE_START) fcall doctype; }; - cdata_start @emit_text_buffer => { + cdata_start => { + emit_text_buffer t(:T_CDATA_START) fcall cdata; }; - comment_start @emit_text_buffer => { + comment_start => { + emit_text_buffer t(:T_COMMENT_START) fcall comment; }; - element_start @emit_text_buffer => open_element; + element_start => open_element; any => { buffer_text_until_eof(eof)