Skip to content

Commit

Permalink
rake ragel
Browse files Browse the repository at this point in the history
The formatting differences are likely due to using a newer version of
rufo
  • Loading branch information
skipkayhil authored and eval committed Jun 3, 2024
1 parent bff958b commit 80065af
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 69 deletions.
9 changes: 4 additions & 5 deletions lib/mail/parsers/address_lists_parser.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# frozen_string_literal: true
require "mail/utilities"
require "mail/parser_tools"
Expand Down Expand Up @@ -32011,10 +32010,10 @@ def self.parse(data)
_trans = if (_slen > 0 &&
_trans_keys[_keys] <= _wide &&
_wide <= _trans_keys[_keys + 1])
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
cs = _trans_targs[_trans]
if _trans_actions[_trans] != 0
case _trans_actions[_trans]
Expand Down
23 changes: 11 additions & 12 deletions lib/mail/parsers/content_disposition_parser.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# frozen_string_literal: true
require "mail/utilities"
require "mail/parser_tools"
Expand Down Expand Up @@ -610,10 +609,10 @@ def self.parse(data)
_trans = if (_slen > 0 &&
_trans_keys[_keys] <= _wide &&
_wide <= _trans_keys[_keys + 1])
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
cs = _trans_targs[_trans]
if _trans_actions[_trans] != 0
case _trans_actions[_trans]
Expand Down Expand Up @@ -654,7 +653,7 @@ def self.parse(data)
# Use quoted string value if one exists, otherwise use parameter value
value = qstr || chars(data, param_val_s, p - 1)

content_disposition.parameters << {param_attr => value}
content_disposition.parameters << { param_attr => value }
param_attr = nil
qstr = nil
end
Expand Down Expand Up @@ -712,7 +711,7 @@ def self.parse(data)
# Use quoted string value if one exists, otherwise use parameter value
value = qstr || chars(data, param_val_s, p - 1)

content_disposition.parameters << {param_attr => value}
content_disposition.parameters << { param_attr => value }
param_attr = nil
qstr = nil
end
Expand Down Expand Up @@ -742,7 +741,7 @@ def self.parse(data)
# Use quoted string value if one exists, otherwise use parameter value
value = qstr || chars(data, param_val_s, p - 1)

content_disposition.parameters << {param_attr => value}
content_disposition.parameters << { param_attr => value }
param_attr = nil
qstr = nil
end
Expand Down Expand Up @@ -799,7 +798,7 @@ def self.parse(data)
# Use quoted string value if one exists, otherwise use parameter value
value = qstr || chars(data, param_val_s, p - 1)

content_disposition.parameters << {param_attr => value}
content_disposition.parameters << { param_attr => value }
param_attr = nil
qstr = nil
end
Expand All @@ -823,7 +822,7 @@ def self.parse(data)
# Use quoted string value if one exists, otherwise use parameter value
value = qstr || chars(data, param_val_s, p - 1)

content_disposition.parameters << {param_attr => value}
content_disposition.parameters << { param_attr => value }
param_attr = nil
qstr = nil
end
Expand Down Expand Up @@ -857,7 +856,7 @@ def self.parse(data)
# Use quoted string value if one exists, otherwise use parameter value
value = qstr || chars(data, param_val_s, p - 1)

content_disposition.parameters << {param_attr => value}
content_disposition.parameters << { param_attr => value }
param_attr = nil
qstr = nil
end
Expand All @@ -875,7 +874,7 @@ def self.parse(data)
# Use quoted string value if one exists, otherwise use parameter value
value = qstr || chars(data, param_val_s, p - 1)

content_disposition.parameters << {param_attr => value}
content_disposition.parameters << { param_attr => value }
param_attr = nil
qstr = nil
end
Expand Down
9 changes: 4 additions & 5 deletions lib/mail/parsers/content_location_parser.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# frozen_string_literal: true
require "mail/utilities"
require "mail/parser_tools"
Expand Down Expand Up @@ -631,10 +630,10 @@ def self.parse(data)
_trans = if (_slen > 0 &&
_trans_keys[_keys] <= _wide &&
_wide <= _trans_keys[_keys + 1])
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
cs = _trans_targs[_trans]
if _trans_actions[_trans] != 0
case _trans_actions[_trans]
Expand Down
9 changes: 4 additions & 5 deletions lib/mail/parsers/content_transfer_encoding_parser.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# frozen_string_literal: true
require "mail/utilities"
require "mail/parser_tools"
Expand Down Expand Up @@ -382,10 +381,10 @@ def self.parse(data)
_trans = if (_slen > 0 &&
_trans_keys[_keys] <= _wide &&
_wide <= _trans_keys[_keys + 1])
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
cs = _trans_targs[_trans]
if _trans_actions[_trans] != 0
case _trans_actions[_trans]
Expand Down
23 changes: 11 additions & 12 deletions lib/mail/parsers/content_type_parser.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# frozen_string_literal: true
require "mail/utilities"
require "mail/parser_tools"
Expand Down Expand Up @@ -736,10 +735,10 @@ def self.parse(data)
_trans = if (_slen > 0 &&
_trans_keys[_keys] <= _wide &&
_wide <= _trans_keys[_keys + 1])
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
cs = _trans_targs[_trans]
if _trans_actions[_trans] != 0
case _trans_actions[_trans]
Expand Down Expand Up @@ -788,7 +787,7 @@ def self.parse(data)
# Use quoted s value if one exists, otherwise use parameter value
value = qstr || chars(data, param_val_s, p - 1)

content_type.parameters << {param_attr => value}
content_type.parameters << { param_attr => value }
param_attr = nil
qstr = nil
end
Expand Down Expand Up @@ -859,7 +858,7 @@ def self.parse(data)
# Use quoted s value if one exists, otherwise use parameter value
value = qstr || chars(data, param_val_s, p - 1)

content_type.parameters << {param_attr => value}
content_type.parameters << { param_attr => value }
param_attr = nil
qstr = nil
end
Expand Down Expand Up @@ -889,7 +888,7 @@ def self.parse(data)
# Use quoted s value if one exists, otherwise use parameter value
value = qstr || chars(data, param_val_s, p - 1)

content_type.parameters << {param_attr => value}
content_type.parameters << { param_attr => value }
param_attr = nil
qstr = nil
end
Expand Down Expand Up @@ -946,7 +945,7 @@ def self.parse(data)
# Use quoted s value if one exists, otherwise use parameter value
value = qstr || chars(data, param_val_s, p - 1)

content_type.parameters << {param_attr => value}
content_type.parameters << { param_attr => value }
param_attr = nil
qstr = nil
end
Expand All @@ -970,7 +969,7 @@ def self.parse(data)
# Use quoted s value if one exists, otherwise use parameter value
value = qstr || chars(data, param_val_s, p - 1)

content_type.parameters << {param_attr => value}
content_type.parameters << { param_attr => value }
param_attr = nil
qstr = nil
end
Expand Down Expand Up @@ -1004,7 +1003,7 @@ def self.parse(data)
# Use quoted s value if one exists, otherwise use parameter value
value = qstr || chars(data, param_val_s, p - 1)

content_type.parameters << {param_attr => value}
content_type.parameters << { param_attr => value }
param_attr = nil
qstr = nil
end
Expand All @@ -1022,7 +1021,7 @@ def self.parse(data)
# Use quoted s value if one exists, otherwise use parameter value
value = qstr || chars(data, param_val_s, p - 1)

content_type.parameters << {param_attr => value}
content_type.parameters << { param_attr => value }
param_attr = nil
qstr = nil
end
Expand Down
9 changes: 4 additions & 5 deletions lib/mail/parsers/date_time_parser.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# frozen_string_literal: true
require "mail/utilities"
require "mail/parser_tools"
Expand Down Expand Up @@ -715,10 +714,10 @@ def self.parse(data)
_trans = if (_slen > 0 &&
_trans_keys[_keys] <= _wide &&
_wide <= _trans_keys[_keys + 1])
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
cs = _trans_targs[_trans]
if _trans_actions[_trans] != 0
case _trans_actions[_trans]
Expand Down
9 changes: 4 additions & 5 deletions lib/mail/parsers/envelope_from_parser.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# frozen_string_literal: true
require "mail/utilities"
require "mail/parser_tools"
Expand Down Expand Up @@ -3265,10 +3264,10 @@ def self.parse(data)
_trans = if (_slen > 0 &&
_trans_keys[_keys] <= _wide &&
_wide <= _trans_keys[_keys + 1])
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
cs = _trans_targs[_trans]
if _trans_actions[_trans] != 0
case _trans_actions[_trans]
Expand Down
9 changes: 4 additions & 5 deletions lib/mail/parsers/message_ids_parser.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# frozen_string_literal: true
require "mail/utilities"
require "mail/parser_tools"
Expand Down Expand Up @@ -4872,10 +4871,10 @@ def self.parse(data)
_trans = if (_slen > 0 &&
_trans_keys[_keys] <= _wide &&
_wide <= _trans_keys[_keys + 1])
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
cs = _trans_targs[_trans]
if _trans_actions[_trans] != 0
case _trans_actions[_trans]
Expand Down
9 changes: 4 additions & 5 deletions lib/mail/parsers/mime_version_parser.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# frozen_string_literal: true
require "mail/utilities"
require "mail/parser_tools"
Expand Down Expand Up @@ -346,10 +345,10 @@ def self.parse(data)
_trans = if (_slen > 0 &&
_trans_keys[_keys] <= _wide &&
_wide <= _trans_keys[_keys + 1])
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
cs = _trans_targs[_trans]
if _trans_actions[_trans] != 0
case _trans_actions[_trans]
Expand Down
9 changes: 4 additions & 5 deletions lib/mail/parsers/phrase_lists_parser.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# frozen_string_literal: true
require "mail/utilities"
require "mail/parser_tools"
Expand Down Expand Up @@ -726,10 +725,10 @@ def self.parse(data)
_trans = if (_slen > 0 &&
_trans_keys[_keys] <= _wide &&
_wide <= _trans_keys[_keys + 1])
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
cs = _trans_targs[_trans]
if _trans_actions[_trans] != 0
case _trans_actions[_trans]
Expand Down
9 changes: 4 additions & 5 deletions lib/mail/parsers/received_parser.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# frozen_string_literal: true
require "mail/utilities"
require "mail/parser_tools"
Expand Down Expand Up @@ -7538,10 +7537,10 @@ def self.parse(data)
_trans = if (_slen > 0 &&
_trans_keys[_keys] <= _wide &&
_wide <= _trans_keys[_keys + 1])
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
_indicies[_inds + _wide - _trans_keys[_keys]]
else
_indicies[_inds + _slen]
end
cs = _trans_targs[_trans]
if _trans_actions[_trans] != 0
case _trans_actions[_trans]
Expand Down

0 comments on commit 80065af

Please sign in to comment.