MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / mapPosition

Function mapPosition

packages/core/css/css-tree-parser.ts:11–29  ·  view source on GitHub ↗
(node, css)

Source from the content-addressed store, hash-verified

9}
10
11function mapPosition(node, css) {
12 const res: any = {
13 start: {
14 line: node.loc.start.line,
15 column: node.loc.start.column,
16 },
17 end: {
18 line: node.loc.end.line,
19 column: node.loc.end.column,
20 },
21 content: css,
22 };
23
24 if (node.loc.source && node.loc.source !== '<unknown>') {
25 res.source = node.loc.source;
26 }
27
28 return res;
29}
30
31function transformAst(node, css, type = null) {
32 if (!node) {

Callers 1

transformAstFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected