summaryrefslogtreecommitdiff
path: root/src/tokens/tracked.rs
diff options
context:
space:
mode:
authorBen Bridle <ben@derelict.engineering>2025-02-28 13:23:20 +1300
committerBen Bridle <ben@derelict.engineering>2025-02-28 13:34:23 +1300
commitdba769e13ca5029643c6068e53fa34ae0fea8421 (patch)
tree47b45ecddaf08bcef19de29ad65206c34af85f53 /src/tokens/tracked.rs
parent1a810d036195395c182f6cd6e011b8fb868d9872 (diff)
downloadtorque-asm-dba769e13ca5029643c6068e53fa34ae0fea8421.zip
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.
Diffstat (limited to 'src/tokens/tracked.rs')
-rw-r--r--src/tokens/tracked.rs4
1 files changed, 2 insertions, 2 deletions
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<T> {
}
impl<T> Tracked<T> {
- pub fn from(value: T, source: &SourceSpan) -> Self {
- Self { source: source.clone(), value }
+ pub fn from(value: T, source: SourceSpan) -> Self {
+ Self { source, value }
}
}