Commit 0e9144d4 authored by Robert McGibbon's avatar Robert McGibbon
Browse files

Fix bug in gromacs top file parser where #else preprocessor directives were not being followed

parent 02adeefa
......@@ -127,6 +127,9 @@ class GromacsTopFile(object):
if len(self._ifStack) == 0:
raise ValueError('Unexpected line in .top file: '+line)
del(self._ifStack[-1])
elif command == '#else':
# Reverse the last entry on the if stack
self._ifStack[-1] = (not self._ifStack[-1])
elif not ignore:
# A line of data for the current category
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment