summaryrefslogtreecommitdiffstats
path: root/config-model/src/main
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2022-02-24 08:43:02 +0000
committerArne H Juul <arnej@yahooinc.com>2022-02-24 18:05:19 +0000
commitc202ed6a0fb0dd46d9a62ad37786f2656bd5100b (patch)
tree6cd4ba9efd5d8516cf3385483e46c3055350ba82 /config-model/src/main
parent76d074a593d2fc98a4a459ed1665b2849121f12e (diff)
fix name of schema for document-only .sd file
Diffstat (limited to 'config-model/src/main')
-rw-r--r--config-model/src/main/javacc/IntermediateParser.jj9
1 files changed, 8 insertions, 1 deletions
diff --git a/config-model/src/main/javacc/IntermediateParser.jj b/config-model/src/main/javacc/IntermediateParser.jj
index 716dde26a95..193fc49f19f 100644
--- a/config-model/src/main/javacc/IntermediateParser.jj
+++ b/config-model/src/main/javacc/IntermediateParser.jj
@@ -432,7 +432,14 @@ ParsedSchema rootDocument() :
}
{
( (rootDocumentItem(schema) (<NL>)*)*<EOF> )
- { return schema; }
+ {
+ if (schema.hasDocument()) {
+ ParsedDocument doc = schema.getDocument();
+ schema = new ParsedSchema(doc.name());
+ schema.addDocument(doc);
+ }
+ return schema;
+ }
}
/**