Spaces:
Sleeping
Sleeping
File size: 302 Bytes
463f868 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | import ast
import traceback
try:
with open("compiler/parser.py", encoding="utf-8") as f:
ast.parse(f.read())
print("Syntax OK")
except SyntaxError as e:
print(f"Syntax Error: {e.lineno}:{e.offset} {e.msg}")
print(e.text)
except Exception:
traceback.print_exc()
|