1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-12 20:27:30 +08:00
otto/tools/gen-jscore/templates/root.tmpl
Steven Hartland b882379002
chore: add generated headers (#486)
Add headers to generated files so that editors will notify users that
these files shouldn't be edited manually.
2023-01-13 19:47:05 +00:00

38 lines
907 B
Cheetah

// Code generated by tools/gen-jscore. DO NOT EDIT.
package otto
import (
"math"
)
func (rt *runtime) newContext() {
// Order here is import as definitions depend on each other.
{{- $object := .Type "Object"}}
{{- $function := .Type "Function"}}
{{template "prototype.tmpl" $object}}
{{template "prototype.tmpl" $function}}
{{- template "core-prototype-property.tmpl" $object}}
{{- template "core-prototype-property.tmpl" $function}}
{{- template "type.tmpl" $object}}
{{- template "type.tmpl" $function}}
{{- range .Types}}
{{- if eq .Name "Global"}}
{{template "global.tmpl" . }}
{{- else if not .Core}}
{{template "type.tmpl" .}}
{{- end}}
{{- end}}
}
func (rt *runtime) newConsole() *object {
return {{template "definition.tmpl" .Log}}
}
{{range .Values}}
{{template "value.tmpl" .}}
{{- end}}