diff options
author | Eduardo Julian | 2017-12-03 16:18:42 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-12-03 16:18:42 -0400 |
commit | 07af667db0ca6b831cf6e24ba6bc288886c95dd8 (patch) | |
tree | 6ab587e242fc57d09aeda24f16e30912ff69ab9a | |
parent | c85449b25ca5092d576d6378c17ea2bee4c4a85f (diff) |
- Added location information to syntax errors.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/lang/syntax.lux | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/stdlib/source/lux/lang/syntax.lux b/stdlib/source/lux/lang/syntax.lux index 46558014e..ebb6c3f18 100644 --- a/stdlib/source/lux/lang/syntax.lux +++ b/stdlib/source/lux/lang/syntax.lux @@ -614,7 +614,10 @@ [end? l.end?] (if end? (p.fail (End-Of-File current-module)) - (p.fail (Unrecognized-Input current-module)))) + (let [[_file _line _column] where] + (p.fail (Unrecognized-Input (format " File: " _file "\n" + " Line: " (%n _line) "\n" + "Column: " (%n _column) "\n")))))) ))))) (def: #export (read current-module aliases [where offset source]) |