class Rufo::Formatter
def visit_binary(node)
def visit_binary(node) # [:binary, left, op, right] _, left, op, right = node visit left if space? needs_space = true else needs_space = op != :* && op != :/ && op != :** end skip_space write_space " " if needs_space consume_op_or_keyword op indent_after_space right, false, needs_space end
Class Methods
Instance Methods
- # align_assignments
- # align_comments
- # align_hash_keys
- # bug
- # check
- # check_heredocs_at_call_end
- # chunk_while
- # comma?
- # comment?
- # consume_block_args
- # consume_call_dot
- # consume_embedded_comment
- # consume_end
- # consume_end_of_line
- # consume_keyword
- # consume_op
- # consume_op_or_keyword
- # consume_space
- # consume_token
- # consume_token_value
- # convert_brace_to_do
- # current_token
- # current_token_kind
- # current_token_value
- # do_align
- # do_align_assignments
- # do_align_comments
- # do_align_hash_keys
- # empty_body?
- # empty_params?
- # find_closing_brace_token
- # format
- # indent
- # indent_after_space
- # indent_body
- # indent_size
- # indentable_keyword?
- # initialize
- # keyword?
- # last?
- # maybe_indent
- # maybe_inline_body
- # needs_two_lines?
- # newline?
- # next_indent
- # next_token
- # push_call
- # push_hash
- # push_node
- # result
- # semicolon?
- # skip_semicolons
- # skip_space
- # skip_space_or_newline
- # space?
- # track_alignment
- # track_assignment
- # track_comment
- # track_hash_key
- # visit
- # visit_BEGIN
- # visit_BEGIN_or_END
- # visit_END
- # visit_alias
- # visit_args_add_star
- # visit_array
- # visit_array_access
- # visit_array_getter_or_setter
- # visit_array_setter
- # visit_assign
- # visit_assign_value
- # visit_begin
- # visit_binary
- # visit_block_arguments
- # visit_bodystmt
- # visit_brace_block
- # visit_break
- # visit_call_args
- # visit_call_at_paren
- # visit_call_with_block
- # visit_call_with_receiver
- # visit_call_without_receiver
- # visit_case
- # visit_class
- # visit_comma_separated_list
- # visit_command
- # visit_command_args
- # visit_command_call
- # visit_command_end
- # visit_control_keyword
- # visit_def
- # visit_def_from_name
- # visit_def_with_receiver
- # visit_defined
- # visit_do_block
- # visit_exps
- # visit_for
- # visit_hash
- # visit_hash_key_value
- # visit_if
- # visit_if_or_unless
- # visit_lambda
- # visit_literal_elements
- # visit_mlhs_add_star
- # visit_mlhs_paren
- # visit_module
- # visit_mrhs_add_star
- # visit_mrhs_new_from_args
- # visit_multiple_assign
- # visit_next
- # visit_op_assign
- # visit_params
- # visit_paren
- # visit_path
- # visit_q_or_i_array
- # visit_quoted_symbol_literal
- # visit_range
- # visit_regexp_literal
- # visit_rescue_types
- # visit_return
- # visit_sclass
- # visit_setter
- # visit_splat_inside_hash
- # visit_string_concat
- # visit_string_dvar
- # visit_string_interpolation
- # visit_string_literal
- # visit_string_literal_end
- # visit_suffix
- # visit_super
- # visit_symbol
- # visit_symbol_literal
- # visit_ternary_if
- # visit_unary
- # visit_undef
- # visit_unless
- # visit_until
- # visit_when
- # visit_while
- # visit_while_or_until
- # visit_yield
- # void_exps?
- # write
- # write_indent
- # write_line
- # write_params_comma
- # write_space