Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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,
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
);
}