Lines Matching defs:self
495 var self = this;
543 if (comments._dumped === self) return;
544 comments._dumped = self;
550 var self = this;
554 if (!comments || comments._dumped === self) return;
558 comments._dumped = self;
625 var self = this;
626 stream.push_node(self);
627 if (force_parens || self.needs_parens(stream)) {
635 stream.prepend_comments(self);
636 self.add_source_map(stream);
637 self._codegen(stream);
638 stream.append_comments(self);
845 function needs_parens_assign_cond(self, output) {
852 if (p instanceof AST_Call) return p.expression === self;
857 if (p instanceof AST_Conditional) return p.condition === self;
859 if (p instanceof AST_PropAccess) return p.expression === self;
861 if (p instanceof AST_Template) return p.tag === self;
950 function print_braced_empty(self, output) {
953 output.append_comments(self, true);
957 function print_braced(self, output, allow_directives) {
958 if (self.body.length > 0) {
960 display_body(self.body, false, output, allow_directives);
961 }, self.end);
962 } else print_braced_empty(self, output);
971 var self = this;
973 make_block(self.body, output);
978 self.condition.print(output);
983 var self = this;
987 self.condition.print(output);
989 force_statement(self.body, output);
992 var self = this;
996 if (self.init) {
997 if (self.init instanceof AST_Definitions) {
998 self.init.print(output);
1000 parenthesize_for_no_in(self.init, output, true);
1007 if (self.condition) {
1008 self.condition.print(output);
1014 if (self.step) {
1015 self.step.print(output);
1018 force_statement(self.body, output);
1022 var self = this;
1026 self.init.print(output);
1030 self.object.print(output);
1032 force_statement(self.body, output);
1039 var self = this;
1043 self.expression.print(output);
1045 force_statement(self.body, output);
1078 var self = this;
1081 var len = self.keys.length;
1083 print_braced_empty(self, output);
1084 } else if (self.keys[0].value == "*") {
1096 }, self.end);
1100 self.path.print(output);
1104 var alias = self.aliases[index];
1105 var key = self.keys[index];
1116 var self = this;
1119 print_properties(self, output);
1123 var self = this;
1126 if (self.default) self.default.print(output);
1127 if (self.all) {
1128 if (self.default) output.comma();
1129 self.all.print(output);
1131 if (self.properties) {
1132 if (self.default) output.comma();
1133 print_properties(self, output);
1135 if (self.all || self.default || self.properties) {
1140 self.path.print(output);
1145 function print_funargs(self, output) {
1147 self.argnames.forEach(function(arg, i) {
1151 if (self.rest) {
1152 if (self.argnames.length) output.comma();
1154 self.rest.print(output);
1158 function print_arrow(self, output) {
1159 var argname = self.argnames.length == 1 && !self.rest && self.argnames[0];
1163 print_funargs(self, output);
1168 if (self.value) {
1169 self.value.print(output);
1171 print_braced(self, output, true);
1182 function print_lambda(self, output) {
1183 if (self.name) {
1185 self.name.print(output);
1187 print_funargs(self, output);
1189 print_braced(self, output, true);
1220 var self = this;
1222 if (self.name) {
1224 self.name.print(output);
1226 if (self.extends) {
1230 self.extends.print(output);
1233 print_properties(self, output, true);
1236 var self = this;
1237 if (self.static) {
1241 print_property_key(self, output);
1242 if (self.value) {
1246 self.value.print(output);
1252 function print_method(self, output) {
1253 var fn = self.value;
1259 print_property_key(self, output);
1260 print_lambda(self.value, output);
1263 var self = this;
1264 if (self.static) {
1268 print_method(self, output);
1294 function make_then(self, output) {
1295 var b = self.body;
1310 make_block(self.body, output);
1318 force_statement(self.body, output);
1321 var self = this;
1325 self.condition.print(output);
1327 if (self.alternative) {
1328 make_then(self, output);
1331 if (self.alternative instanceof AST_If) {
1333 self.alternative.print(output);
1335 force_statement(self.alternative, output);
1338 force_statement(self.body, output);
1344 var self = this;
1348 self.expression.print(output);
1351 var last = self.body.length - 1;
1352 if (last < 0) print_braced_empty(self, output);
1354 self.body.forEach(function(branch, i) {
1360 }, self.end);
1362 function print_branch_body(self, output) {
1364 self.body.forEach(function(stmt) {
1375 var self = this;
1378 self.expression.print(output);
1380 print_branch_body(self, output);
1385 var self = this;
1388 print_braced(self, output);
1389 if (self.bcatch) {
1391 self.bcatch.print(output);
1393 if (self.bfinally) {
1395 self.bfinally.print(output);
1399 var self = this;
1401 if (self.argname) {
1404 self.argname.print(output);
1408 print_braced(self, output);
1418 var self = this;
1421 self.definitions.forEach(function(def, i) {
1426 if (!(p instanceof AST_IterationStatement && p.init === self)) output.semicolon();
1446 var self = this;
1447 self.name.print(output);
1448 if (self.value) {
1454 parenthesize_for_no_in(self.value, output, no_in);
1459 var self = this;
1460 self.name.print(output);
1464 self.value.print(output);
1468 function print_annotation(self, output) {
1470 if (!self.pure) return;
1471 var level = 0, parent = self, node;
1479 function print_call_args(self, output) {
1481 self.args.forEach(function(expr, i) {
1485 output.add_mapping(self.end);
1489 var self = this;
1490 print_annotation(self, output);
1491 self.expression.print(output);
1492 if (self.optional) output.print("?.");
1493 print_call_args(self, output);
1496 var self = this;
1497 print_annotation(self, output);
1500 self.expression.print(output);
1501 if (need_constructor_parens(self, output)) print_call_args(self, output);
1516 var self = this;
1517 var expr = self.expression;
1519 var prop = self.property;
1520 if (output.option("ie") && RESERVED_WORDS[prop] || self.quoted && output.option("keep_quoted_props")) {
1521 if (self.optional) output.print("?.");
1523 output.add_mapping(self.end);
1528 output.print(self.optional ? "?." : ".");
1530 output.add_mapping(self.end);
1535 var self = this;
1536 self.expression.print(output);
1537 if (self.optional) output.print("?.");
1539 self.property.print(output);
1559 var self = this;
1560 self.expression.print(output);
1561 output.add_mapping(self.end);
1562 output.print(self.operator);
1565 var self = this;
1566 self.left.print(output);
1568 output.print(self.operator);
1570 self.right.print(output);
1573 var self = this;
1574 self.condition.print(output);
1578 self.consequent.print(output);
1581 self.alternative.print(output);
1635 var self = this;
1636 var key = print_property_key(self, output);
1637 var value = self.value;
1655 var self = this;
1656 var props = self.properties, len = props.length, rest = self.rest;
1676 }, self.end);
1677 else print_braced_empty(self, output);
1679 function print_properties(self, output, no_comma) {
1680 var props = self.properties;
1691 }, self.end);
1692 else print_braced_empty(self, output);
1698 function print_property_key(self, output) {
1699 var key = self.key;
1703 var quote = self.start && self.start.quote;
1708 } else if (self.private) {
1718 var self = this;
1719 print_property_key(self, output);
1721 self.value.print(output);
1728 var self = this;
1729 if (self.static) {
1735 print_property_key(self, output);
1736 print_lambda(self.value, output);
1749 var self = this;
1750 var name = get_symbol_name(self);
1752 var alias = self.alias;
1761 var self = this;
1762 var name = get_symbol_name(self);
1763 var key = self.key;
1774 var self = this;
1775 if (self.tag) self.tag.print(output);
1777 for (var i = 0; i < self.expressions.length; i++) {
1778 output.print(self.strings[i]);
1780 self.expressions[i].print(output);
1783 output.print(self.strings[i]);
1848 // self should be AST_New. decide if we want to show parens or not.
1849 function need_constructor_parens(self, output) {
1851 if (self.args.length > 0) return true;