MCPcopy
hub / github.com/davyxu/tabtoy / checkHeaderTypes

Function checkHeaderTypes

v3/compiler/header.go:45–61  ·  view source on GitHub ↗
(tab *model.DataTable, symbols *model.TypeTable)

Source from the content-addressed store, hash-verified

43}
44
45func checkHeaderTypes(tab *model.DataTable, symbols *model.TypeTable) {
46
47 for _, header := range tab.Headers {
48
49 if header.TypeInfo == nil {
50 continue
51 }
52
53 // 原始类型检查
54 if !model.PrimitiveExists(header.TypeInfo.FieldType) &&
55 !symbols.ObjectExists(header.TypeInfo.FieldType) { // 对象检查
56
57 report.ReportError("UnknownFieldType", header.TypeInfo.FieldType, header.Cell.String())
58 }
59 }
60
61}
62
63func headerValueExists(offset int, name string, headers []*model.HeaderField) bool {
64

Callers 1

LoadHeaderFunction · 0.85

Calls 4

PrimitiveExistsFunction · 0.92
ReportErrorFunction · 0.92
ObjectExistsMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected