Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5374baa

Browse files
committed
Remove commands method temporarily
1 parent 2fe6be3 commit 5374baa

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

lib/syntax_tree/prism/prettier_print.rb

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,6 @@ def initialize(indent, contents)
7070
@contents = contents
7171
end
7272

73-
def commands(indent, mode)
74-
next_indent = indent + @indent
75-
contents.reverse.map { |part| [next_indent, mode, part] }
76-
end
77-
7873
def type
7974
:align
8075
end
@@ -411,7 +406,8 @@ def flush(base_indentation = DEFAULT_INDENTATION)
411406
next_indent = indent + 2
412407
commands += doc.contents.reverse.map { |part| [next_indent, mode, part] }
413408
when :align
414-
commands.concat(doc.commands(indent, mode))
409+
next_indent = indent + doc.indent
410+
commands += doc.contents.reverse.map { |part| [next_indent, mode, part] }
415411
when :trim
416412
position -= trim!(buffer)
417413
when :if_break
@@ -872,7 +868,8 @@ def fits?(next_commands, rest_commands, remaining)
872868
next_indent = indent + 2
873869
commands += doc.contents.reverse.map { |part| [next_indent, mode, part] }
874870
when :align
875-
commands.concat(doc.commands(indent, mode))
871+
next_indent = indent + doc.indent
872+
commands += doc.contents.reverse.map { |part| [next_indent, mode, part] }
876873
when :trim
877874
remaining += trim!(fit_buffer)
878875
when :if_break

0 commit comments

Comments
 (0)