daff 1.1.16 → 1.1.19
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/daff.rb +24 -4
- data/lib/lib/coopy/alignment.rb +2 -1
- data/lib/lib/coopy/bag.rb +1 -0
- data/lib/lib/coopy/cell_builder.rb +17 -0
- data/lib/lib/coopy/cell_info.rb +1 -0
- data/lib/lib/coopy/change.rb +1 -0
- data/lib/lib/coopy/compare.rb +1 -0
- data/lib/lib/coopy/compare_flags.rb +28 -0
- data/lib/lib/coopy/compare_table.rb +29 -10
- data/lib/lib/coopy/coopy.rb +29 -15
- data/lib/lib/coopy/cross_match.rb +1 -0
- data/lib/lib/coopy/csv.rb +1 -0
- data/lib/lib/coopy/diff_render.rb +1 -0
- data/lib/lib/coopy/flat_cell_builder.rb +72 -0
- data/lib/lib/coopy/highlight_patch.rb +1 -0
- data/lib/lib/coopy/highlight_patch_unit.rb +1 -0
- data/lib/lib/coopy/index.rb +1 -0
- data/lib/lib/coopy/index_item.rb +1 -0
- data/lib/lib/coopy/index_pair.rb +1 -0
- data/lib/lib/coopy/merger.rb +1 -0
- data/lib/lib/coopy/mover.rb +1 -0
- data/lib/lib/coopy/ordering.rb +1 -0
- data/lib/lib/coopy/report.rb +1 -0
- data/lib/lib/coopy/row.rb +1 -0
- data/lib/lib/coopy/simple_cell.rb +1 -0
- data/lib/lib/coopy/simple_table.rb +5 -0
- data/lib/lib/coopy/simple_view.rb +3 -3
- data/lib/lib/coopy/sparse_sheet.rb +1 -0
- data/lib/lib/coopy/table.rb +2 -0
- data/lib/lib/coopy/table_comparison_state.rb +1 -0
- data/lib/lib/coopy/table_diff.rb +235 -172
- data/lib/lib/coopy/table_io.rb +1 -0
- data/lib/lib/coopy/table_modifier.rb +1 -0
- data/lib/lib/coopy/table_text.rb +1 -0
- data/lib/lib/coopy/terminal_diff_render.rb +1 -0
- data/lib/lib/coopy/unit.rb +1 -0
- data/lib/lib/coopy/view.rb +1 -0
- data/lib/lib/coopy/viewed_datum.rb +1 -0
- data/lib/lib/coopy/viterbi.rb +2 -1
- data/lib/lib/coopy/workspace.rb +1 -0
- data/lib/lib/haxe/ds/int_map.rb +1 -0
- data/lib/lib/haxe/ds/string_map.rb +1 -0
- data/lib/lib/haxe/format/json_parser.rb +1 -0
- data/lib/lib/haxe/format/json_printer.rb +1 -0
- data/lib/lib/haxe/imap.rb +1 -0
- data/lib/lib/haxe/io/bytes.rb +1 -0
- data/lib/lib/haxe/io/bytes_buffer.rb +1 -0
- data/lib/lib/haxe/io/bytes_input.rb +1 -0
- data/lib/lib/haxe/io/bytes_output.rb +1 -0
- data/lib/lib/haxe/io/eof.rb +1 -0
- data/lib/lib/haxe/io/input.rb +1 -0
- data/lib/lib/haxe/io/output.rb +1 -0
- data/lib/lib/hx_overrides.rb +1 -0
- data/lib/lib/hx_sys.rb +66 -0
- data/lib/lib/lambda.rb +1 -0
- data/lib/lib/list.rb +1 -0
- data/lib/lib/rb/boot.rb +2 -5
- data/lib/lib/rb/ruby_iterator.rb +1 -0
- data/lib/lib/reflect.rb +1 -0
- data/lib/lib/string_buf.rb +1 -0
- data/lib/lib/sys/io/file_output.rb +1 -0
- data/lib/lib/sys/io/hx_file.rb +20 -0
- data/lib/lib/type.rb +1 -0
- data/lib/lib/x_list/list_iterator.rb +32 -0
- metadata +7 -2
data/lib/daff.rb
CHANGED
@@ -7,19 +7,39 @@ if ruby_major<1 || (ruby_major==1 && (ruby_minor<9 || (ruby_minor==9 && ruby_pat
|
|
7
7
|
$stderr.puts "Your current Ruby version is: #{RUBY_VERSION}. Haxe/Ruby generates code for version 1.9.3 or later."
|
8
8
|
Kernel.exit 1
|
9
9
|
end
|
10
|
+
def haxe_me
|
11
|
+
_haxe_vars_ = {}
|
12
|
+
instance_methods(false).grep(/=$/).each do |v|
|
13
|
+
_haxe_vars_[v.to_s[0..-2].to_sym] = ('@'+v.to_s[0..-2]).to_sym
|
14
|
+
end
|
15
|
+
define_method(:[]) do |x|
|
16
|
+
tag = _haxe_vars_[x]
|
17
|
+
return instance_variable_get(tag) if tag
|
18
|
+
method x
|
19
|
+
end
|
20
|
+
define_method(:[]=) do |x,y|
|
21
|
+
instance_variable_set(_haxe_vars_[x],y)
|
22
|
+
end
|
23
|
+
class << self
|
24
|
+
define_method(:[]) do |x|
|
25
|
+
method x
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
10
29
|
|
11
30
|
require 'date'
|
12
31
|
require_relative 'lib/hx_overrides'
|
13
32
|
require_relative 'lib/lambda'
|
14
33
|
require_relative 'lib/list'
|
15
|
-
require_relative 'lib/
|
34
|
+
require_relative 'lib/x_list/list_iterator'
|
16
35
|
require_relative 'lib/reflect'
|
17
36
|
require_relative 'lib/string_buf'
|
18
|
-
require_relative 'lib/
|
37
|
+
require_relative 'lib/hx_sys'
|
19
38
|
require_relative 'lib/value_type'
|
20
39
|
require_relative 'lib/type'
|
21
40
|
require_relative 'lib/coopy/alignment'
|
22
41
|
require_relative 'lib/coopy/bag'
|
42
|
+
require_relative 'lib/coopy/cell_builder'
|
23
43
|
require_relative 'lib/coopy/cell_info'
|
24
44
|
require_relative 'lib/coopy/change'
|
25
45
|
require_relative 'lib/coopy/change_type'
|
@@ -30,6 +50,7 @@ require_relative 'lib/coopy/coopy'
|
|
30
50
|
require_relative 'lib/coopy/cross_match'
|
31
51
|
require_relative 'lib/coopy/csv'
|
32
52
|
require_relative 'lib/coopy/diff_render'
|
53
|
+
require_relative 'lib/coopy/flat_cell_builder'
|
33
54
|
require_relative 'lib/coopy/row'
|
34
55
|
require_relative 'lib/coopy/highlight_patch'
|
35
56
|
require_relative 'lib/coopy/highlight_patch_unit'
|
@@ -57,7 +78,6 @@ require_relative 'lib/coopy/viewed_datum'
|
|
57
78
|
require_relative 'lib/coopy/viterbi'
|
58
79
|
require_relative 'lib/coopy/workspace'
|
59
80
|
require_relative 'lib/haxe/imap'
|
60
|
-
require_relative 'lib/haxe/log'
|
61
81
|
require_relative 'lib/haxe/ds/int_map'
|
62
82
|
require_relative 'lib/haxe/ds/string_map'
|
63
83
|
require_relative 'lib/haxe/format/json_parser'
|
@@ -73,7 +93,7 @@ require_relative 'lib/haxe/io/error'
|
|
73
93
|
require_relative 'lib/rb/boot'
|
74
94
|
require_relative 'lib/rb/ruby_iterator'
|
75
95
|
require_relative 'lib/sys/io/file_handle'
|
76
|
-
require_relative 'lib/sys/io/
|
96
|
+
require_relative 'lib/sys/io/hx_file'
|
77
97
|
require_relative 'lib/sys/io/file_output'
|
78
98
|
|
79
99
|
|
data/lib/lib/coopy/alignment.rb
CHANGED
@@ -174,7 +174,7 @@ module Coopy
|
|
174
174
|
while(ct_vp > 0 || ct_vl > 0 || ct_vr > 0)
|
175
175
|
ct+=1
|
176
176
|
if ct > max_ct
|
177
|
-
|
177
|
+
puts "Ordering took too long, something went wrong"
|
178
178
|
break
|
179
179
|
end
|
180
180
|
xp = 0 if xp >= hp
|
@@ -294,6 +294,7 @@ module Coopy
|
|
294
294
|
return order
|
295
295
|
end
|
296
296
|
|
297
|
+
haxe_me
|
297
298
|
end
|
298
299
|
|
299
300
|
end
|
data/lib/lib/coopy/bag.rb
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
module Coopy
|
5
|
+
class CellBuilder
|
6
|
+
def needSeparator() puts "Abstract CellBuilder.needSeparator called" end
|
7
|
+
def setSeparator(separator) puts "Abstract CellBuilder.setSeparator called" end
|
8
|
+
def setConflictSeparator(separator) puts "Abstract CellBuilder.setConflictSeparator called" end
|
9
|
+
def setView(view) puts "Abstract CellBuilder.setView called" end
|
10
|
+
def update(local,remote) puts "Abstract CellBuilder.update called" end
|
11
|
+
def conflict(parent,local,remote) puts "Abstract CellBuilder.conflict called" end
|
12
|
+
def marker(label) puts "Abstract CellBuilder.marker called" end
|
13
|
+
def links(unit) puts "Abstract CellBuilder.links called" end
|
14
|
+
haxe_me
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
data/lib/lib/coopy/cell_info.rb
CHANGED
data/lib/lib/coopy/change.rb
CHANGED
data/lib/lib/coopy/compare.rb
CHANGED
@@ -15,6 +15,7 @@ module Coopy
|
|
15
15
|
@always_show_header = true
|
16
16
|
@acts = nil
|
17
17
|
@ids = nil
|
18
|
+
@columns_to_ignore = nil
|
18
19
|
end
|
19
20
|
|
20
21
|
attr_accessor :ordered
|
@@ -27,6 +28,7 @@ module Coopy
|
|
27
28
|
attr_accessor :always_show_header
|
28
29
|
attr_accessor :acts
|
29
30
|
attr_accessor :ids
|
31
|
+
attr_accessor :columns_to_ignore
|
30
32
|
|
31
33
|
def allow_update
|
32
34
|
return true if @acts == nil
|
@@ -43,6 +45,32 @@ module Coopy
|
|
43
45
|
return @acts.include?("delete")
|
44
46
|
end
|
45
47
|
|
48
|
+
def get_ignored_columns
|
49
|
+
return nil if @columns_to_ignore == nil
|
50
|
+
ignore = {}
|
51
|
+
begin
|
52
|
+
_g1 = 0
|
53
|
+
_g = @columns_to_ignore.length
|
54
|
+
while(_g1 < _g)
|
55
|
+
i = _g1
|
56
|
+
_g1+=1
|
57
|
+
ignore[@columns_to_ignore[i]] = true
|
58
|
+
end
|
59
|
+
end
|
60
|
+
return ignore
|
61
|
+
end
|
62
|
+
|
63
|
+
def add_primary_key(column)
|
64
|
+
@ids = Array.new if @ids == nil
|
65
|
+
@ids.push(column)
|
66
|
+
end
|
67
|
+
|
68
|
+
def ignore_column(column)
|
69
|
+
@columns_to_ignore = Array.new if @columns_to_ignore == nil
|
70
|
+
@columns_to_ignore.push(column)
|
71
|
+
end
|
72
|
+
|
73
|
+
haxe_me
|
46
74
|
end
|
47
75
|
|
48
76
|
end
|
@@ -50,25 +50,43 @@ module Coopy
|
|
50
50
|
align.meta = ::Coopy::Alignment.new if align.meta == nil
|
51
51
|
self.align_columns(align.meta,a,b)
|
52
52
|
column_order = align.meta.to_order
|
53
|
+
align.range(a.get_height,b.get_height)
|
54
|
+
align.tables(a,b)
|
55
|
+
align.set_rowlike(true)
|
56
|
+
w = a.get_width
|
57
|
+
ha = a.get_height
|
58
|
+
hb = b.get_height
|
59
|
+
av = a.get_cell_view
|
60
|
+
ids = nil
|
61
|
+
ignore = nil
|
62
|
+
if @comp.compare_flags != nil
|
63
|
+
ids = @comp.compare_flags.ids
|
64
|
+
ignore = @comp.compare_flags.get_ignored_columns
|
65
|
+
end
|
53
66
|
common_units = Array.new
|
67
|
+
ra_header = align.get_source_header
|
68
|
+
rb_header = align.get_source_header
|
54
69
|
begin
|
55
70
|
_g = 0
|
56
71
|
_g1 = column_order.get_list
|
57
72
|
while(_g < _g1.length)
|
58
73
|
unit = _g1[_g]
|
59
74
|
_g+=1
|
60
|
-
|
75
|
+
if unit.l >= 0 && unit.r >= 0 && unit.p != -1
|
76
|
+
if ignore != nil
|
77
|
+
if unit.l >= 0 && ra_header >= 0 && ra_header < a.get_height
|
78
|
+
name = av.to_s(a.get_cell(unit.l,ra_header))
|
79
|
+
next if ignore.include?(name)
|
80
|
+
end
|
81
|
+
if unit.r >= 0 && rb_header >= 0 && rb_header < b.get_height
|
82
|
+
name1 = av.to_s(b.get_cell(unit.r,rb_header))
|
83
|
+
next if ignore.include?(name1)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
common_units.push(unit)
|
87
|
+
end
|
61
88
|
end
|
62
89
|
end
|
63
|
-
align.range(a.get_height,b.get_height)
|
64
|
-
align.tables(a,b)
|
65
|
-
align.set_rowlike(true)
|
66
|
-
w = a.get_width
|
67
|
-
ha = a.get_height
|
68
|
-
hb = b.get_height
|
69
|
-
av = a.get_cell_view
|
70
|
-
ids = nil
|
71
|
-
ids = @comp.compare_flags.ids if @comp.compare_flags != nil
|
72
90
|
if ids != nil
|
73
91
|
index = ::Coopy::IndexPair.new
|
74
92
|
ids_as_map = {}
|
@@ -493,6 +511,7 @@ module Coopy
|
|
493
511
|
return @indexes
|
494
512
|
end
|
495
513
|
|
514
|
+
haxe_me
|
496
515
|
end
|
497
516
|
|
498
517
|
end
|
data/lib/lib/coopy/coopy.rb
CHANGED
@@ -384,6 +384,18 @@ module Coopy
|
|
384
384
|
flags.ids.push(args[i + 1])
|
385
385
|
args.slice!(i,2)
|
386
386
|
break
|
387
|
+
elsif tag == "--ignore"
|
388
|
+
more = true
|
389
|
+
flags.columns_to_ignore = Array.new if flags.columns_to_ignore == nil
|
390
|
+
flags.columns_to_ignore.push(args[i + 1])
|
391
|
+
args.slice!(i,2)
|
392
|
+
break
|
393
|
+
elsif tag == "--index"
|
394
|
+
more = true
|
395
|
+
flags.always_show_order = true
|
396
|
+
flags.never_show_order = false
|
397
|
+
args.slice!(i,1)
|
398
|
+
break
|
387
399
|
end
|
388
400
|
end
|
389
401
|
end
|
@@ -436,6 +448,7 @@ module Coopy
|
|
436
448
|
io.write_stderr("If you need more control, here is the full list of flags:\n")
|
437
449
|
io.write_stderr(" daff diff [--output OUTPUT.csv] [--context NUM] [--all] [--act ACT] a.csv b.csv\n")
|
438
450
|
io.write_stderr(" --id: specify column to use as primary key (repeat for multi-column key)\n")
|
451
|
+
io.write_stderr(" --ignore: specify column to ignore completely (can repeat)\n")
|
439
452
|
io.write_stderr(" --color: highlight changes with terminal colors\n")
|
440
453
|
io.write_stderr(" --context NUM: show NUM rows of context\n")
|
441
454
|
io.write_stderr(" --all: do not prune unchanged rows\n")
|
@@ -445,6 +458,7 @@ module Coopy
|
|
445
458
|
io.write_stderr("\n")
|
446
459
|
io.write_stderr(" daff diff --git path old-file old-hex old-mode new-file new-hex new-mode\n")
|
447
460
|
io.write_stderr(" --git: process arguments provided by git to diff drivers\n")
|
461
|
+
io.write_stderr(" --index: include row/columns numbers from orginal tables\n")
|
448
462
|
io.write_stderr("\n")
|
449
463
|
io.write_stderr(" daff render [--output OUTPUT.html] [--css CSS.css] [--fragment] [--plain] diff.csv\n")
|
450
464
|
io.write_stderr(" --css CSS.css: generate a suitable css file to go with the html\n")
|
@@ -550,7 +564,7 @@ module Coopy
|
|
550
564
|
class << self
|
551
565
|
attr_accessor :version
|
552
566
|
end
|
553
|
-
@version = "1.1.
|
567
|
+
@version = "1.1.19"
|
554
568
|
|
555
569
|
def Coopy.compare_tables(local,remote,flags = nil)
|
556
570
|
ct = ::Coopy::CompareTable.new
|
@@ -578,35 +592,35 @@ module Coopy
|
|
578
592
|
def Coopy.random_tests
|
579
593
|
st = ::Coopy::SimpleTable.new(15,6)
|
580
594
|
tab = st
|
581
|
-
|
595
|
+
puts "table size is " + _hx_str(tab.get_width) + "x" + _hx_str(tab.get_height)
|
582
596
|
tab.set_cell(3,4,::Coopy::SimpleCell.new(33))
|
583
|
-
|
584
|
-
_r = s.to_s}.call())
|
597
|
+
puts "element is " + _hx_str(lambda{ s = tab.get_cell(3,4)
|
598
|
+
_r = s.to_s}.call())
|
585
599
|
compare = ::Coopy::Compare.new
|
586
600
|
d1 = ::Coopy::ViewedDatum.get_simple_view(::Coopy::SimpleCell.new(10))
|
587
601
|
d2 = ::Coopy::ViewedDatum.get_simple_view(::Coopy::SimpleCell.new(10))
|
588
602
|
d3 = ::Coopy::ViewedDatum.get_simple_view(::Coopy::SimpleCell.new(20))
|
589
603
|
report = ::Coopy::Report.new
|
590
604
|
compare.compare(d1,d2,d3,report)
|
591
|
-
|
605
|
+
puts "report is " + _hx_str(report.to_s)
|
592
606
|
d2 = ::Coopy::ViewedDatum.get_simple_view(::Coopy::SimpleCell.new(50))
|
593
607
|
report.clear
|
594
608
|
compare.compare(d1,d2,d3,report)
|
595
|
-
|
609
|
+
puts "report is " + _hx_str(report.to_s)
|
596
610
|
d2 = ::Coopy::ViewedDatum.get_simple_view(::Coopy::SimpleCell.new(20))
|
597
611
|
report.clear
|
598
612
|
compare.compare(d1,d2,d3,report)
|
599
|
-
|
613
|
+
puts "report is " + _hx_str(report.to_s)
|
600
614
|
d1 = ::Coopy::ViewedDatum.get_simple_view(::Coopy::SimpleCell.new(20))
|
601
615
|
report.clear
|
602
616
|
compare.compare(d1,d2,d3,report)
|
603
|
-
|
617
|
+
puts "report is " + _hx_str(report.to_s)
|
604
618
|
comp = ::Coopy::TableComparisonState.new
|
605
619
|
ct = ::Coopy::CompareTable.new
|
606
620
|
comp.a = st
|
607
621
|
comp.b = st
|
608
622
|
ct.attach(comp)
|
609
|
-
|
623
|
+
puts "comparing tables"
|
610
624
|
t1 = ::Coopy::SimpleTable.new(3,2)
|
611
625
|
t2 = ::Coopy::SimpleTable.new(3,2)
|
612
626
|
t3 = ::Coopy::SimpleTable.new(3,2)
|
@@ -614,13 +628,13 @@ module Coopy
|
|
614
628
|
dt2 = ::Coopy::ViewedDatum.new(t2,::Coopy::SimpleView.new)
|
615
629
|
dt3 = ::Coopy::ViewedDatum.new(t3,::Coopy::SimpleView.new)
|
616
630
|
compare.compare(dt1,dt2,dt3,report)
|
617
|
-
|
631
|
+
puts "report is " + _hx_str(report.to_s)
|
618
632
|
t3.set_cell(1,1,::Coopy::SimpleCell.new("hello"))
|
619
633
|
compare.compare(dt1,dt2,dt3,report)
|
620
|
-
|
634
|
+
puts "report is " + _hx_str(report.to_s)
|
621
635
|
t1.set_cell(1,1,::Coopy::SimpleCell.new("hello"))
|
622
636
|
compare.compare(dt1,dt2,dt3,report)
|
623
|
-
|
637
|
+
puts "report is " + _hx_str(report.to_s)
|
624
638
|
v = ::Coopy::Viterbi.new
|
625
639
|
td = ::Coopy::TableDiff.new(nil,nil)
|
626
640
|
idx = ::Coopy::Index.new
|
@@ -633,8 +647,7 @@ module Coopy
|
|
633
647
|
end
|
634
648
|
|
635
649
|
def Coopy.cell_for(x)
|
636
|
-
return
|
637
|
-
return ::Coopy::SimpleCell.new(x)
|
650
|
+
return x
|
638
651
|
end
|
639
652
|
|
640
653
|
def Coopy.json_to_table(json)
|
@@ -726,7 +739,7 @@ module Coopy
|
|
726
739
|
txt += "\n"
|
727
740
|
end
|
728
741
|
end
|
729
|
-
|
742
|
+
puts txt
|
730
743
|
end
|
731
744
|
|
732
745
|
def Coopy.jsonify(t)
|
@@ -761,6 +774,7 @@ module Coopy
|
|
761
774
|
return workbook
|
762
775
|
end
|
763
776
|
|
777
|
+
haxe_me
|
764
778
|
end
|
765
779
|
|
766
780
|
end
|
data/lib/lib/coopy/csv.rb
CHANGED
@@ -0,0 +1,72 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
module Coopy
|
5
|
+
class FlatCellBuilder
|
6
|
+
|
7
|
+
def initialize
|
8
|
+
end
|
9
|
+
|
10
|
+
# protected - in ruby this doesn't play well with static/inline methods
|
11
|
+
|
12
|
+
attr_accessor :view
|
13
|
+
attr_accessor :separator
|
14
|
+
attr_accessor :conflict_separator
|
15
|
+
|
16
|
+
public
|
17
|
+
|
18
|
+
def need_separator
|
19
|
+
return true
|
20
|
+
end
|
21
|
+
|
22
|
+
def set_separator(separator)
|
23
|
+
@separator = separator
|
24
|
+
end
|
25
|
+
|
26
|
+
def set_conflict_separator(separator)
|
27
|
+
@conflict_separator = separator
|
28
|
+
end
|
29
|
+
|
30
|
+
def set_view(view)
|
31
|
+
@view = view
|
32
|
+
end
|
33
|
+
|
34
|
+
def update(local,remote)
|
35
|
+
return @view.to_datum(_hx_str(::Coopy::FlatCellBuilder.quote_for_diff(@view,local)) + _hx_str(@separator) + _hx_str(::Coopy::FlatCellBuilder.quote_for_diff(@view,remote)))
|
36
|
+
end
|
37
|
+
|
38
|
+
def conflict(parent,local,remote)
|
39
|
+
return _hx_str(@view.to_s(parent)) + _hx_str(@conflict_separator) + _hx_str(@view.to_s(local)) + _hx_str(@conflict_separator) + _hx_str(@view.to_s(remote))
|
40
|
+
end
|
41
|
+
|
42
|
+
def marker(label)
|
43
|
+
return @view.to_datum(label)
|
44
|
+
end
|
45
|
+
|
46
|
+
def links(unit)
|
47
|
+
return @view.to_datum(unit.to_s)
|
48
|
+
end
|
49
|
+
|
50
|
+
def FlatCellBuilder.quote_for_diff(v,d)
|
51
|
+
_nil = "NULL"
|
52
|
+
return _nil if v.equals(d,nil)
|
53
|
+
str = v.to_s(d)
|
54
|
+
score = 0
|
55
|
+
begin
|
56
|
+
_g1 = 0
|
57
|
+
_g = str.length
|
58
|
+
while(_g1 < _g)
|
59
|
+
i = _g1
|
60
|
+
_g1+=1
|
61
|
+
break if (str[score].ord rescue nil) != 95
|
62
|
+
score+=1
|
63
|
+
end
|
64
|
+
end
|
65
|
+
str = "_" + _hx_str(str) if str[score..-1] == _nil
|
66
|
+
return str
|
67
|
+
end
|
68
|
+
|
69
|
+
haxe_me
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|