Improved variable name

This commit is contained in:
afrmtbl 2019-03-30 17:05:33 -04:00
parent 3e651e7dfb
commit a852433a18

View File

@ -144,7 +144,7 @@ module JSONFilter
def self.get_bracket_pairs(text : String, recursive = true) : BracketIndex def self.get_bracket_pairs(text : String, recursive = true) : BracketIndex
istart = [] of Int64 istart = [] of Int64
d = BracketIndex.new bracket_index = BracketIndex.new
text.each_char_with_index do |char, index| text.each_char_with_index do |char, index|
if char == '(' if char == '('
@ -155,7 +155,7 @@ module JSONFilter
begin begin
opening = istart.pop opening = istart.pop
if recursive || (!recursive && istart.size == 0) if recursive || (!recursive && istart.size == 0)
d[opening] = index.to_i64 bracket_index[opening] = index.to_i64
end end
rescue rescue
raise FieldsParser::ParseError.new "No matching opening parenthesis at: #{index}" raise FieldsParser::ParseError.new "No matching opening parenthesis at: #{index}"
@ -168,7 +168,7 @@ module JSONFilter
raise FieldsParser::ParseError.new "No matching closing parenthesis at: #{idx}" raise FieldsParser::ParseError.new "No matching closing parenthesis at: #{idx}"
end end
return d return bracket_index
end end
end end