From a59dc21223eff205616c5198b68b9ceb8e57185b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Tue, 3 Jan 2023 22:40:36 +0100 Subject: [PATCH] Errors - Result subtype using SloxError --- src/errors.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/errors.rs b/src/errors.rs index 72935d7..4efe60b 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -33,6 +33,9 @@ pub struct SloxError { message: String, } +/// Return type for SLox functions. +pub type SloxResult = Result; + impl SloxError { /// Initialize a record for a scanner error. pub fn scanner_error(line: usize, ch: Option, message: String) -> Self {