From dad925a986db1402dbe77d3c6f4103dceb165ce0 Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 13 Jun 2024 15:20:00 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20(parser):=20Improve=20type=20han?= =?UTF-8?q?dler=20not=20found=20error=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit semver: patch --- src/parser/typing.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parser/typing.rs b/src/parser/typing.rs index 8f14bf5..abc5620 100644 --- a/src/parser/typing.rs +++ b/src/parser/typing.rs @@ -21,9 +21,9 @@ pub fn parse( .type_lookup .get(&token.token_type) .ok_or(Diagnostic::error( - range.position, + cursor, range.length, - format!("No type handler for {:?}", token.token_type), + format!("Cannot create a type from {}", token.token_type), ))?; let (mut left_hand_side, new_cursor) = type_handler(parser, cursor)?;