diff options
author | Jon Bratseth <bratseth@oath.com> | 2022-02-01 23:57:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-01 23:57:27 +0100 |
commit | fca1f85f24cbb9e9d0b3548fad4256cdca04cf40 (patch) | |
tree | d9de02de427778aca9c58ee756c9ce270701a71d /config-model/src/main/javacc/SDParser.jj | |
parent | 58dbe08ac1cb5783787d4abb826b6ffe7d9f6714 (diff) | |
parent | 41c341a302ccf641acc91c2b3afb49844a43d216 (diff) |
Revert "Bratseth/avoid schema dir"
Diffstat (limited to 'config-model/src/main/javacc/SDParser.jj')
-rw-r--r-- | config-model/src/main/javacc/SDParser.jj | 11 |
1 files changed, 7 insertions, 4 deletions
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; } { - (<NL>)* (schema = rootSchema() | schema = rootDocument()) + (<NL>)* (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); } |