@gi-tcg/gts-transpiler 0.3.10 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -0
- package/package.json +1 -1
- package/src/transform/volar/printer.ts +11 -0
package/dist/index.js
CHANGED
|
@@ -1755,6 +1755,11 @@ function getPrintOptions(source, state) {
|
|
|
1755
1755
|
context.write("\"");
|
|
1756
1756
|
context.writeMapped(text.slice(1, -1), node.range[0], node.range[1], LITERAL_FROM_ID_MAPPING_DATA);
|
|
1757
1757
|
context.write("\"");
|
|
1758
|
+
const generatedEnd = context.generatedOffset;
|
|
1759
|
+
context.createExtraMapping({
|
|
1760
|
+
start: node.range[0],
|
|
1761
|
+
end: node.range[1]
|
|
1762
|
+
}, generatedStart, generatedEnd, VERIFICATION_ONLY_MAPPING_DATA);
|
|
1758
1763
|
} else if (state.attributeNameNodes.has(node) && node.range) context.writeMapped(node.raw ?? JSON.stringify(node.value), node.range[0], node.range[1], ATTRIBUTE_NAME_MAPPING_DATA);
|
|
1759
1764
|
else if (directActionStubRange = state.directActionStubRange.get(node)) context.writeMapped(node.raw ?? JSON.stringify(node.value), directActionStubRange.start, directActionStubRange.start + 1, DIRECT_ACTION_STUB_MAPPING_DATA);
|
|
1760
1765
|
else defaultPrinters.Literal(node, context);
|
package/package.json
CHANGED
|
@@ -92,6 +92,17 @@ export function getPrintOptions(
|
|
|
92
92
|
LITERAL_FROM_ID_MAPPING_DATA,
|
|
93
93
|
);
|
|
94
94
|
context.write('"');
|
|
95
|
+
const generatedEnd = context.generatedOffset;
|
|
96
|
+
// Map error squiggle at quotation mark to the inner content
|
|
97
|
+
context.createExtraMapping(
|
|
98
|
+
{
|
|
99
|
+
start: node.range[0],
|
|
100
|
+
end: node.range[1],
|
|
101
|
+
},
|
|
102
|
+
generatedStart,
|
|
103
|
+
generatedEnd,
|
|
104
|
+
VERIFICATION_ONLY_MAPPING_DATA,
|
|
105
|
+
)
|
|
95
106
|
} else if (state.attributeNameNodes.has(node) && node.range) {
|
|
96
107
|
context.writeMapped(
|
|
97
108
|
node.raw ?? JSON.stringify((node as EspolarAST.Literal).value),
|