From b3dfa5e28f0e27261a318636eb3060690ba5547a Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Sat, 3 Aug 2024 07:44:28 -0300 Subject: [PATCH] comments --- src/tartrazine.cr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tartrazine.cr b/src/tartrazine.cr index 288ae7f..97c5da3 100644 --- a/src/tartrazine.cr +++ b/src/tartrazine.cr @@ -61,7 +61,8 @@ module Tartrazine # # # - # They match, don't move pos, and alter the stack + # They match, don't move pos, probably alter + # the stack, probably not generate tokens class Always < Rule def match(text, pos, lexer) : Tuple(Bool, Int32, Array(Token)) tokens = [] of Token @@ -84,7 +85,7 @@ module Tartrazine when "token" raise Exception.new "Can't have a token without a match" if match.nil? [Token.new(type: xml["type"], value: match[0])] - # TODO handle #push #push:n #pop and multiple states + # TODO handle #push #push:n #pop and multiple states when "push" puts "Pushing state #{xml["state"]}" lexer.state_stack << xml["state"]