parseAndCompileSchema parses and compiles the schema into entity definitions
(schema string)
| 85 | |
| 86 | // parseAndCompileSchema parses and compiles the schema into entity definitions |
| 87 | func parseAndCompileSchema(schema string) ([]*base.EntityDefinition, error) { |
| 88 | p, err := parser.NewParser(schema).Parse() |
| 89 | if err != nil { |
| 90 | return nil, err |
| 91 | } |
| 92 | |
| 93 | definitions, _, err := compiler.NewCompiler(true, p).Compile() |
| 94 | if err != nil { |
| 95 | return nil, err |
| 96 | } |
| 97 | |
| 98 | return definitions, nil |
| 99 | } |
| 100 | |
| 101 | // extractSchemaReferences extracts all coverage references from entity definitions |
| 102 | func extractSchemaReferences(definitions []*base.EntityDefinition) []SchemaCoverage { |
no test coverage detected