mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-10 05:22:23 +00:00
lint
This commit is contained in:
parent
b1c8793ded
commit
08347b600f
@ -40,12 +40,12 @@ module Tartrazine
|
|||||||
states_to_push.each do |state|
|
states_to_push.each do |state|
|
||||||
if state == "#pop"
|
if state == "#pop"
|
||||||
# Pop the state
|
# Pop the state
|
||||||
Log.trace { "Popping state"}
|
Log.trace { "Popping state" }
|
||||||
lexer.state_stack.pop
|
lexer.state_stack.pop
|
||||||
else
|
else
|
||||||
# Really push
|
# Really push
|
||||||
lexer.state_stack << state
|
lexer.state_stack << state
|
||||||
Log.trace {"Pushed #{lexer.state_stack}"}
|
Log.trace { "Pushed #{lexer.state_stack}" }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
[] of Token
|
[] of Token
|
||||||
|
@ -67,7 +67,7 @@ module Tartrazine
|
|||||||
Log.trace { "Stack is #{@state_stack} State is #{state.name}, pos is #{pos}, text is #{text[pos..pos + 10]}" }
|
Log.trace { "Stack is #{@state_stack} State is #{state.name}, pos is #{pos}, text is #{text[pos..pos + 10]}" }
|
||||||
state.rules.each do |rule|
|
state.rules.each do |rule|
|
||||||
matched, new_pos, new_tokens = rule.match(text, pos, self)
|
matched, new_pos, new_tokens = rule.match(text, pos, self)
|
||||||
Log.trace { "NOT MATCHED: #{rule.xml}"}
|
Log.trace { "NOT MATCHED: #{rule.xml}" }
|
||||||
next unless matched
|
next unless matched
|
||||||
Log.trace { "MATCHED: #{rule.xml}" }
|
Log.trace { "MATCHED: #{rule.xml}" }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user