(name, token, scope, overwrites)
| 4867 | } |
| 4868 | |
| 4869 | function functor(name, token, scope, overwrites) { |
| 4870 | var funct = { |
| 4871 | "(name)" : name, |
| 4872 | "(breakage)" : 0, |
| 4873 | "(loopage)" : 0, |
| 4874 | "(scope)" : scope, |
| 4875 | "(tokens)" : {}, |
| 4876 | "(properties)": {}, |
| 4877 | |
| 4878 | "(catch)" : false, |
| 4879 | "(global)" : false, |
| 4880 | |
| 4881 | "(line)" : null, |
| 4882 | "(character)" : null, |
| 4883 | "(metrics)" : null, |
| 4884 | "(statement)" : null, |
| 4885 | "(context)" : null, |
| 4886 | "(blockscope)": null, |
| 4887 | "(comparray)" : null, |
| 4888 | "(generator)" : null, |
| 4889 | "(params)" : null |
| 4890 | }; |
| 4891 | |
| 4892 | if (token) { |
| 4893 | _.extend(funct, { |
| 4894 | "(line)" : token.line, |
| 4895 | "(character)": token.character, |
| 4896 | "(metrics)" : createMetrics(token) |
| 4897 | }); |
| 4898 | } |
| 4899 | |
| 4900 | _.extend(funct, overwrites); |
| 4901 | |
| 4902 | if (funct["(context)"]) { |
| 4903 | funct["(blockscope)"] = funct["(context)"]["(blockscope)"]; |
| 4904 | funct["(comparray)"] = funct["(context)"]["(comparray)"]; |
| 4905 | } |
| 4906 | |
| 4907 | return funct; |
| 4908 | } |
| 4909 | |
| 4910 | function doTemplateLiteral() { |
| 4911 | while (state.tokens.next.type !== "(template tail)" && state.tokens.next.id !== "(end)") { |
no test coverage detected