Skip to content

Commit

Permalink
Fix direct Variable assignments (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
a5kin committed Jun 13, 2018
1 parent d62ffeb commit feb83c1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions xentica/core/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,15 @@ def __set__(self, obj, value):
code = "%s = %s;\n" % (self.var_name, value)
self._bsca.append_code(code)

@property
def code(self):
"""Get the variable name as code."""
return self.var_name

@code.setter
def code(self, val):
"""Prevent the change of code."""


class IntegerVariable(Variable):
"""The variable intended to hold a positive integer."""
Expand Down

0 comments on commit feb83c1

Please sign in to comment.