MCPcopy Create free account
hub / github.com/adhocteam/pushup / newLayoutCodeGen

Function newLayoutCodeGen

codegen.go:65–78  ·  view source on GitHub ↗
(layout *layout, pfile projectFile, source string)

Source from the content-addressed store, hash-verified

63}
64
65func newLayoutCodeGen(layout *layout, pfile projectFile, source string) *layoutCodeGen {
66 l := &layoutCodeGen{
67 layout: layout,
68 pfile: pfile,
69 source: source,
70 imports: make(map[importDecl]bool),
71 ioWriterVar: "w",
72 lineDirectivesEnabled: true,
73 }
74 for _, im := range layout.imports {
75 l.imports[im] = true
76 }
77 return l
78}
79
80func lineCount(s string) int {
81 return strings.Count(s, "\n") + 1

Callers 1

compileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected