@@ -51,7 +51,7 @@ module Crystalline::Analysis
5151 compiler.stderr = dev_null
5252 compiler.flags = compiler_flags
5353
54- if lib_path_override = lib_path
54+ if ( lib_path_override = lib_path)
5555 path = Crystal ::CrystalPath .default_path_without_lib.split(Process ::PATH_DELIMITER )
5656 path.insert(0 , lib_path_override)
5757 compiler.crystal_path = Crystal ::CrystalPath .new(path)
@@ -123,13 +123,13 @@ module Crystalline::Analysis
123123 LSP ::Log .debug { " Class of node at cursor: #{ node.class } " }
124124 locations = begin
125125 if node.is_a? Crystal ::Call
126- if defs = node.target_defs
126+ if ( defs = node.target_defs)
127127 defs.compact_map { |d |
128128 start_location = d.location.try { |loc | loc.expanded_location || loc }.not_nil!
129129 end_location = d.end_location.try { |loc | loc.expanded_location || loc }.not_nil!
130130 {start_location, end_location}
131131 }
132- elsif expanded_macro = node.expanded_macro
132+ elsif ( expanded_macro = node.expanded_macro)
133133 start_location = expanded_macro.location.try { |loc | loc.expanded_location || loc }.not_nil!
134134 end_location = expanded_macro.end_location.try { |loc | loc.expanded_location || loc } || start_location
135135 [{start_location, end_location}]
@@ -152,18 +152,18 @@ module Crystalline::Analysis
152152 elsif node.is_a? Crystal ::Union
153153 Utils .locations_from_union(node, nodes)
154154 elsif node.is_a? Crystal ::Var
155- if definition = context[node.to_s]?
155+ if ( definition = context[node.to_s]?)
156156 _, location = definition
157157 [{location, location}] if location
158158 end
159159 elsif node.is_a? Crystal ::InstanceVar
160- if ivar = context[" self" ]?.try & .[0 ].try & .lookup_instance_var? node.name
161- if location = ivar.location
160+ if ( ivar = context[" self" ]?.try & .[0 ].try & .lookup_instance_var? node.name)
161+ if ( location = ivar.location)
162162 [{location, location}]
163163 end
164164 end
165165 elsif node.is_a? Crystal ::ClassVar
166- if cvar = context[" self" ]?.try & .[0 ].try & .all_class_vars[node.name]? # lookup_raw_class_var? node.name
166+ if ( cvar = context[" self" ]?.try & .[0 ].try & .all_class_vars[node.name]?) # lookup_raw_class_var? node.name
167167 if (location = cvar.location)
168168 [{location, location}]
169169 end
0 commit comments