summaryrefslogtreecommitdiff
path: root/module/language/lua/common.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/language/lua/common.scm')
-rw-r--r--module/language/lua/common.scm20
1 files changed, 5 insertions, 15 deletions
diff --git a/module/language/lua/common.scm b/module/language/lua/common.scm
index e68f1dda8..16b5af2c8 100644
--- a/module/language/lua/common.scm
+++ b/module/language/lua/common.scm
@@ -24,21 +24,11 @@
#:export (syntax-error or-eqv?))
-(define (syntax-error src string . arguments)
- "Throw an error tagged with 'lua-syntax, and print detailed source
-code information when available. STRING and ARGUMENTS are given to FORMAT."
- (throw 'lua-syntax
- (string-append
- (if src
- (format #f "~a@~a.~a"
- (cdr (assq 'filename src))
- (cdr (assq 'line src))
- (if (assq 'column src)
- (cdr (assq 'column src))
- "[no column available]"))
- "[no source code information given]")
- ": "
- (apply format (cons string arguments)))))
+(define (syntax-error src string . args)
+ "Throw an error tagged with 'syntax-error, and print detailed source
+code information when available. STRING and ARGS are given to FORMAT."
+ (throw 'syntax-error #f (apply format #f string args)
+ src #f #f '()))
;; I was using CASE, but this is more succinct
;; (or-eqv? 1 #f 1) => (or (eqv? 1 #f) (eqv? 1 1))