diff options
Diffstat (limited to 'gerber/rs274x.py')
-rw-r--r-- | gerber/rs274x.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gerber/rs274x.py b/gerber/rs274x.py index 39693c9..739c253 100644 --- a/gerber/rs274x.py +++ b/gerber/rs274x.py @@ -112,8 +112,6 @@ class GerberFile(CamFile): f.write(statement.to_gerber()) - - class GerberParser(object): """ GerberParser """ @@ -324,21 +322,21 @@ class GerberParser(object): Gerber/Excellon statement to evaluate. """ - if isinstance(stmt, (CommentStmt, UnknownStmt, EofStmt)): - return + if isinstance(stmt, CoordStmt): + self._evaluate_coord(stmt) elif isinstance(stmt, ParamStmt): self._evaluate_param(stmt) - elif isinstance(stmt, CoordStmt): - self._evaluate_coord(stmt) - elif isinstance(stmt, ApertureStmt): self._evaluate_aperture(stmt) elif isinstance(stmt, (RegionModeStmt, QuadrantModeStmt)): self._evaluate_mode(stmt) + elif isinstance(stmt, (CommentStmt, UnknownStmt, EofStmt)): + return + else: raise Exception("Invalid statement to evaluate") |