How to use the uglify-js-papandreou.AST_Symbol function in uglify-js-papandreou

To help you get started, we’ve selected a few uglify-js-papandreou examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github assetgraph / assetgraph / lib / assets / JavaScript.js View on Github external
node: node
                                }));
                            } else {
                                syntaxErrors.push(new errors.SyntaxError({
                                    message: 'Invalid GETTEXT syntax: ' + node.print_to_string(),
                                    asset: this
                                }));
                            }
                        }
                    } else {
                        syntaxErrors.push(new errors.SyntaxError({
                            message: 'Invalid GETTEXT syntax: ' + node.print_to_string(),
                            asset: this
                        }));
                    }
                } else if (node.expression instanceof uglifyJs.AST_Symbol && node.expression.name === 'GETSTATICURL') {
                    outgoingRelations.push(new AssetGraph.JavaScriptGetStaticUrl({
                        from: this,
                        parentNode: parentNode,
                        node: node,
                        to: new AssetGraph.StaticUrlMap({
                            parseTree: node.clone().args
                        })
                    }));
                } else if (node.expression instanceof uglifyJs.AST_Symbol && node.expression.name === 'TRHTML') {
                    var outgoingRelation;
                    if (node.args[0] instanceof uglifyJs.AST_Call && node.args[0].expression instanceof uglifyJs.AST_Symbol && node.args[0].expression.name === 'GETTEXT' && node.args[0].args.length === 1) {

                        node.args[0].args[0] = tryFoldConstantToString(node.args[0].args[0]);
                        if (node.args[0].args[0] instanceof uglifyJs.AST_String) {
                            outgoingRelation = new AssetGraph.JavaScriptTrHtml({
                                from: this,
github assetgraph / assetgraph / lib / assets / JavaScript.js View on Github external
function isNamedDefineNode(node) {
    return (
        node instanceof uglifyJs.AST_Call &&
        node.expression instanceof uglifyJs.AST_Symbol &&
        node.expression.name === 'define' &&
        node.args.length === 2 &&
        node.args[0] instanceof uglifyJs.AST_String
    );
}