mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-12 22:42: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|
|
||||
if state == "#pop"
|
||||
# Pop the state
|
||||
Log.trace { "Popping state"}
|
||||
Log.trace { "Popping state" }
|
||||
lexer.state_stack.pop
|
||||
else
|
||||
# Really push
|
||||
lexer.state_stack << state
|
||||
Log.trace {"Pushed #{lexer.state_stack}"}
|
||||
Log.trace { "Pushed #{lexer.state_stack}" }
|
||||
end
|
||||
end
|
||||
[] of Token
|
||||
|
@ -49,7 +49,7 @@ module Tartrazine
|
||||
Log.trace { "Including state #{state} from #{lexer.state_stack.last}" }
|
||||
lexer.states[state].rules.each do |rule|
|
||||
matched, new_pos, new_tokens = rule.match(text, pos, lexer)
|
||||
Log.trace { "#{xml}, #{new_pos}, #{new_tokens}" } if matched
|
||||
Log.trace { "#{xml}, #{new_pos}, #{new_tokens}" } if matched
|
||||
return true, new_pos, new_tokens if matched
|
||||
end
|
||||
return false, pos, [] 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]}" }
|
||||
state.rules.each do |rule|
|
||||
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
|
||||
Log.trace { "MATCHED: #{rule.xml}" }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user