From 41c341a302ccf641acc91c2b3afb49844a43d216 Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Tue, 1 Feb 2022 23:30:50 +0100 Subject: Revert "Bratseth/avoid schema dir" --- config-model/src/main/javacc/SDParser.jj | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'config-model/src/main/javacc/SDParser.jj') diff --git a/config-model/src/main/javacc/SDParser.jj b/config-model/src/main/javacc/SDParser.jj index b6a9ab789bf..5b7721c0fe9 100644 --- a/config-model/src/main/javacc/SDParser.jj +++ b/config-model/src/main/javacc/SDParser.jj @@ -395,15 +395,16 @@ SPECIAL_TOKEN : * The rule consumes any schema and returns the corresponding object. This is the only production that should * ever consume leading newlines. * + * @param dir the directory containing the file being parsed * @return the schema object */ -Schema schema(DocumentTypeManager docMan) : +Schema schema(DocumentTypeManager docMan, String dir) : { this.docMan = docMan; Schema schema; } { - ()* (schema = rootSchema() | schema = rootDocument()) + ()* (schema = rootSchema(dir) | schema = rootDocument(dir)) { return schema; } } @@ -411,9 +412,10 @@ Schema schema(DocumentTypeManager docMan) : * This rule consumes a proper schema block. This and rootDocument() are the only rules that should ever consume * trailing newline tokens. * + * @param dir the directory containing the file being parsed. * @return the schema definition object. */ -Schema rootSchema() : +Schema rootSchema(String dir) : { String name; String inherited = null; @@ -457,9 +459,10 @@ Object rootSchemaItem(Schema schema) : { } /** * Consumes a schema definition that contains only documents to be used for inheritance, etc. * + * @param dir the directory containing the file being parsed. * @return the schema definition object. */ -Schema rootDocument() : +Schema rootDocument(String dir) : { Schema schema = new DocumentOnlySchema(applicationPackage, fileRegistry, deployLogger, properties); } -- cgit v1.2.3