Skip to content

Commit

Permalink
Re-format some files
Browse files Browse the repository at this point in the history
Ary Borenszweig committed Oct 31, 2016

Verified

This commit was signed with the committer’s verified signature.
wyattjoh Wyatt Johnson
1 parent 13733dc commit cc62eac
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/compiler/crystal/codegen/const.cr
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ class Crystal::CodeGenVisitor
def declare_const(const)
global_name = const.llvm_name
global = @main_mod.globals[global_name]? ||
@main_mod.globals.add(llvm_type(const.value.type), global_name)
@main_mod.globals.add(llvm_type(const.value.type), global_name)
global.linkage = LLVM::Linkage::Internal if @single_module
global
end
4 changes: 2 additions & 2 deletions src/compiler/crystal/macros/interpreter.cr
Original file line number Diff line number Diff line change
@@ -397,8 +397,8 @@ module Crystal
produce_tuple = node.names.first == "T"
when GenericInstanceType
produce_tuple = ((splat_index = path_lookup.splat_index) &&
path_lookup.type_vars.keys.index(node.names.first) == splat_index) ||
(path_lookup.double_variadic? && path_lookup.type_vars.first_key == node.names.first)
path_lookup.type_vars.keys.index(node.names.first) == splat_index) ||
(path_lookup.double_variadic? && path_lookup.type_vars.first_key == node.names.first)
else
produce_tuple = false
end
6 changes: 3 additions & 3 deletions src/compiler/crystal/tools/formatter.cr
Original file line number Diff line number Diff line change
@@ -213,9 +213,9 @@ module Crystal
else
next_exp = node.expressions[i + 1]
needs_two_lines = !last?(i, node.expressions) && !exp.is_a?(Attribute) &&
!exp.is_a?(MacroIf) &&
(!(exp.is_a?(Def) && exp.abstract? && next_exp.is_a?(Def) && next_exp.abstract?)) &&
(needs_two_lines?(exp) || needs_two_lines?(next_exp))
!exp.is_a?(MacroIf) &&
(!(exp.is_a?(Def) && exp.abstract? && next_exp.is_a?(Def) && next_exp.abstract?)) &&
(needs_two_lines?(exp) || needs_two_lines?(next_exp))
end

@assign_length = max_length

0 comments on commit cc62eac

Please sign in to comment.