forked from M-Labs/artiq
1
0
Fork 0

compiler: remove dead code.

This commit is contained in:
whitequark 2017-04-21 18:38:43 +00:00 committed by Sebastien Bourdeauducq
parent 032f28863f
commit c78aa86e72
1 changed files with 0 additions and 17 deletions

View File

@ -390,23 +390,6 @@ class ASTSynthesizer:
return node return node
def assign_attribute(self, obj, attr_name, value):
obj_node = self.quote(obj)
dot_loc = self._add(".")
name_loc = self._add(attr_name)
_ = self._add(" ")
equals_loc = self._add("=")
_ = self._add(" ")
value_node = self.quote(value)
attr_node = asttyped.AttributeT(value=obj_node, attr=attr_name, ctx=None,
type=value_node.type,
dot_loc=dot_loc, attr_loc=name_loc,
loc=obj_node.loc.join(name_loc))
return ast.Assign(targets=[attr_node], value=value_node,
op_locs=[equals_loc], loc=name_loc.join(value_node.loc))
def suggest_identifier(id, names): def suggest_identifier(id, names):
sorted_names = sorted(names, key=lambda other: jaro_winkler(id, other), reverse=True) sorted_names = sorted(names, key=lambda other: jaro_winkler(id, other), reverse=True)