From dba769e13ca5029643c6068e53fa34ae0fea8421 Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Fri, 28 Feb 2025 13:23:20 +1300 Subject: Implement string literals String literals are treated as integers. If a string is passed as an integer argument to a packed binary literal, a new instance of the packed binary literal is invoked for every character in the string, with each character being passed to the packed binary literal as a Unicode character value. --- src/tokens/tracked.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tokens/tracked.rs') diff --git a/src/tokens/tracked.rs b/src/tokens/tracked.rs index 049c8f8..ea37047 100644 --- a/src/tokens/tracked.rs +++ b/src/tokens/tracked.rs @@ -8,8 +8,8 @@ pub struct Tracked { } impl Tracked { - pub fn from(value: T, source: &SourceSpan) -> Self { - Self { source: source.clone(), value } + pub fn from(value: T, source: SourceSpan) -> Self { + Self { source, value } } } -- cgit v1.2.3-70-g09d2