diff --git a/src/parser/reader-macros/string.ts b/src/parser/reader-macros/string.ts index 77e394f..56300c9 100644 --- a/src/parser/reader-macros/string.ts +++ b/src/parser/reader-macros/string.ts @@ -1,4 +1,4 @@ -import { Identifier, StringLiteral } from "../../syntax-objects/index.js"; +import { Identifier, List } from "../../syntax-objects/index.js"; import { ReaderMacro } from "./types.js"; export const stringMacro: ReaderMacro = { @@ -31,9 +31,19 @@ export const stringMacro: ReaderMacro = { }); } - return new StringLiteral({ - value: token.value, - location: token.location, - }); + return new List([ + "String", + [ + "object", + [ + ":", + "chars", + [ + "FixedArray", + ...token.value.split("").map((char) => char.charCodeAt(0)), + ], + ], + ], + ]); }, };