diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-11-22 15:17:23 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-11-22 15:17:23 -0800 |
commit | 45a011e1071ba511b3deee134219dd2f9eb6c8aa (patch) | |
tree | 40f5cdc0b7f8490e149d0567ae5afcd7abf2fbaa /check.py | |
parent | 295c4718d924f5d31e1bd25fe63add1833cc9c98 (diff) | |
download | binaryen-45a011e1071ba511b3deee134219dd2f9eb6c8aa.tar.gz binaryen-45a011e1071ba511b3deee134219dd2f9eb6c8aa.tar.bz2 binaryen-45a011e1071ba511b3deee134219dd2f9eb6c8aa.zip |
improve interpreter error printing
Diffstat (limited to 'check.py')
-rwxr-xr-x | check.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -62,12 +62,13 @@ for asm in tests: reported = err.split(':')[1] start, end = reported.split('-') start_line, start_col = map(int, start.split('.')) - lines = expected.split('\n') + lines = open('temp.wast').read().split('\n') + print start_line, start_col print print '='*80 print lines[start_line-1] print (' '*(start_col-1)) + '^' - print (' '*(start_col-1)) + '|' + print (' '*(start_col-2)) + '/_\\' print '='*80 print err except Exception, e: |