packages/master-tasks/tasks/srcmap.js
function getNodeFromCode(code) {
    if (convert.mapFileCommentRegex.test(code)) {
        try {
            return SourceNode.fromStringWithSourceMap(
                convertCode2Script(code),
                new SourceMapConsumer(convert.fromComment(code).toObject())
            );
        } catch (error) {
            console.error('getNodeFromCode() error: ' + error);
            const node = new SourceNode();
            node.add(convertCode2Script(code));
            return node;
        }
    } else {
        const node = new SourceNode();
        node.add(convertCode2Script(code));
        return node;
    }
}
function getNodeFromCode(code) {
    if (convert.mapFileCommentRegex.test(code)) {
        try {
            return SourceNode.fromStringWithSourceMap(
                convertCode2Script(code),
                new SourceMapConsumer(convert.fromComment(code).toObject())
            );
        } catch (error) {
            console.error('getNodeFromCode() error: ' + error);
            const node = new SourceNode();
            node.add(convertCode2Script(code));
            return node;
        }
    } else {
        const node = new SourceNode();
        node.add(convertCode2Script(code));
        return node;
    }
}
function getNodeFromCode ( code ) { if ( convert . mapFileCommentRegex . test ( code ) ) { try { return SourceNode . fromStringWithSourceMap ( convertCode2Script ( code ) , new SourceMapConsumer ( convert . fromComment ( code ) . toObject ( ) ) ) ; } catch ( error ) { console . error ( 'getNodeFromCode() error: ' + error ) ; const node = new SourceNode ( ) ; node . add ( convertCode2Script ( code ) ) ; return node ; } } else { const node = new SourceNode ( ) ; node . add ( convertCode2Script ( code ) ) ; return node ; } }
get sourceNode from code
get sourceNode from code