From 07af667db0ca6b831cf6e24ba6bc288886c95dd8 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 3 Dec 2017 16:18:42 -0400 Subject: - Added location information to syntax errors. --- stdlib/source/lux/lang/syntax.lux | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'stdlib') 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]) -- cgit v1.2.3