Reformat evaluator #1

This commit is contained in:
Bartłomiej Pluta
2019-07-04 17:57:12 +02:00
parent f0cbf37fe9
commit 34a0eda199
36 changed files with 470 additions and 270 deletions

View File

@@ -2,6 +2,9 @@ from smnp.error.base import SmnpException
class SyntaxException(SmnpException):
def __init__(self, pos, msg):
posStr = "" if pos is None else f" [line {pos[0]+1}, col {pos[1]+1}]"
self.msg = f"Syntax error{posStr}:\n{msg}"
def __init__(self, msg, pos=None):
super().__init__(msg, pos)
def _title(self):
return "Syntax Error"