tools/gen-jscore/templates/definition.tmpl
raw| 1 | &object{ |
| 2 | runtime: rt, |
| 3 | class: class{{or .Class "Function"}}Name, |
| 4 | objectClass: class{{or .ObjectClass "Object"}}, |
| 5 | prototype: rt.global.{{or .ObjectPrototype "Function"}}Prototype, |
| 6 | extensible: true, |
| 7 | {{- if not .Class}} |
| 8 | value: nativeFunctionObject{ |
| 9 | name: class{{or .Value .Name}}Name, |
| 10 | call: builtin{{or .Value .Name}}, |
| 11 | construct: builtinNew{{or .Value .Name}}, |
| 12 | }, |
| 13 | {{- end}} |
| 14 | {{- template "property-fields.tmpl" .}} |
| 15 | }{{/* No newline */ -}} |