From 92ae48f90503c757fd2cee59b48300ee6d473e8a Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Fri, 28 Feb 2014 23:19:31 +0100 Subject: [PATCH] Use fcall + fret instead of fgoto. This removes the hardcoded return to the main machine. --- lib/oga/lexer.rl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/oga/lexer.rl b/lib/oga/lexer.rl index f1dc58b..f3b1418 100644 --- a/lib/oga/lexer.rl +++ b/lib/oga/lexer.rl @@ -177,7 +177,7 @@ module Oga '>' => { t(:T_DOCTYPE_END) - fgoto main; + fret; }; *|; @@ -200,7 +200,7 @@ module Oga t(:T_CDATA_END) - fgoto main; + fret; }; # Consume everything else character by character and store it in a @@ -215,14 +215,14 @@ module Oga doctype_start => { t(:T_DOCTYPE_START) - fgoto doctype; + fcall doctype; }; # @cdata_buffer is used to store the content of the CDATA tag. cdata_start => { t(:T_CDATA_START) - fgoto cdata; + fcall cdata; }; # General rules and actions.