示例#1
0
文件: main.go 项目: zarevucky/astgen
func interfaceList(t astgen.Type) (result string) {
	for _, iface := range _interfaces[t.Common().Name] {
		result += ", public virtual " + iface
	}

	return
}
示例#2
0
func goTypeName(t astgen.Type) string {
	switch t.(type) {
	case *astgen.StructType:
		return "*AST" + t.Common().Name
	case *astgen.LexicalType:
		return "string"
	case *astgen.BoolType:
		return "bool"
	default:
		return "AST" + t.Common().Name
	}
}
示例#3
0
文件: main.go 项目: zarevucky/astgen
func zeframTypeName(t astgen.Type) string {
	switch t.(type) {
	case *astgen.StructType:
		return "own *AST" + t.Common().Name
	case *astgen.LexicalType:
		return "string"
	case *astgen.BoolType:
		return "bool"
	case *astgen.EnumType:
		return "AST" + t.Common().Name
	case *astgen.OptionType:
		return "own *AST" + t.Common().Name
	}

	// FIXME
	panic("blaargh")
}