diff options
| author | Nolan <strake7@users.noreply.github.com> | 2023-12-21 19:34:11 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-21 20:34:11 -0700 |
| commit | 93f7480c967ef9104933f6e346a562196a670d86 (patch) | |
| tree | 591b26437e1c712ee38205fdd8a4fd123c092ed6 /test/formatters/samplecode/ruby-syntax-tree/out.rb | |
| parent | 3aa747856a53d1108c4009b47e77b48d9f290694 (diff) | |
Add ruby-syntax-tree format support (#224)
Add [ruby-syntax-tree](https://github.com/ruby-syntax-tree/syntax_tree)
as an available formatter. Include support for finding a [`.streerc`
file](https://github.com/ruby-syntax-tree/syntax_tree#configuration).
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
Diffstat (limited to 'test/formatters/samplecode/ruby-syntax-tree/out.rb')
| -rw-r--r-- | test/formatters/samplecode/ruby-syntax-tree/out.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/formatters/samplecode/ruby-syntax-tree/out.rb b/test/formatters/samplecode/ruby-syntax-tree/out.rb new file mode 100644 index 0000000..3bf1506 --- /dev/null +++ b/test/formatters/samplecode/ruby-syntax-tree/out.rb @@ -0,0 +1,18 @@ +d = [ + 30_644_250_780, + 9_003_106_878, + 30_636_278_846, + 66_641_217_692, + 4_501_790_980, + 671_24_603036, + 131_61973916, + 66_606629_920, + 30_642_677_916, + 30_643_069_058 +] +a, s = [], $*[0] +s.each_byte { |b| a << ("%036b" % d[b.chr.to_i]).scan(/\d{6}/) } +a.transpose.each do |a| + a.join.each_byte { |i| print i == 49 ? ($*[1] || "#") : 32.chr } + puts +end |
