diff options
author | jaseg <git@jaseg.de> | 2023-11-09 14:30:12 +0100 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2023-11-14 21:52:12 +0100 |
commit | 37b6b8f8d26d6ef83d76cee1516398ee4fcc4fa4 (patch) | |
tree | 1a6833a7294945cd5cec64848cddc6b512e117cb /gerbonara/aperture_macros/parse.py | |
parent | 07362c592feeda71ec9b583ae54ae107f983039e (diff) | |
download | gerbonara-37b6b8f8d26d6ef83d76cee1516398ee4fcc4fa4.tar.gz gerbonara-37b6b8f8d26d6ef83d76cee1516398ee4fcc4fa4.tar.bz2 gerbonara-37b6b8f8d26d6ef83d76cee1516398ee4fcc4fa4.zip |
Aperture macro expression simplification WIP
Diffstat (limited to 'gerbonara/aperture_macros/parse.py')
-rw-r--r-- | gerbonara/aperture_macros/parse.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gerbonara/aperture_macros/parse.py b/gerbonara/aperture_macros/parse.py index 45f8c41..1527bc1 100644 --- a/gerbonara/aperture_macros/parse.py +++ b/gerbonara/aperture_macros/parse.py @@ -30,7 +30,7 @@ def _map_expression(node): if type(node.op) == ast.UAdd: return _map_expression(node.operand) else: - return OperatorExpression(operator.sub, ConstantExpression(0), _map_expression(node.operand)) + return NegatedExpression(_map_expression(node.operand)) elif isinstance(node, ast.Name): return VariableExpression(int(node.id[3:])) # node.id has format var[0-9]+ |