diff options
author | Tor Egge <Tor.Egge@online.no> | 2023-10-24 16:48:37 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2023-10-24 16:48:37 +0200 |
commit | 6644150903efbe6b61b8144bc60fe68eae00eac5 (patch) | |
tree | 71f38454c0b877ed7f1d0c4be7453a325665bec2 /config-model/src/main/javacc/SchemaParser.jj | |
parent | 7f6f44d95e95706c0a31937c5dc89c20d09051ca (diff) |
Prepare for emitting warning if summary field type is specified.
Improve resolving of summary field type from source field type.
Diffstat (limited to 'config-model/src/main/javacc/SchemaParser.jj')
-rw-r--r-- | config-model/src/main/javacc/SchemaParser.jj | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/config-model/src/main/javacc/SchemaParser.jj b/config-model/src/main/javacc/SchemaParser.jj index f186caacb5f..aef91e34239 100644 --- a/config-model/src/main/javacc/SchemaParser.jj +++ b/config-model/src/main/javacc/SchemaParser.jj @@ -1090,6 +1090,9 @@ void summaryInDocument(ParsedDocumentSummary docsum) : (<TYPE> type = dataType())? lbrace() { psf = new ParsedSummaryField(name, type); + if (type != null) { + psf.setHasExplicitType(); + } } (summaryItem(psf) (<NL>)*)* <RBRACE> { @@ -1140,13 +1143,17 @@ void summaryInFieldLong(ParsedField field) : { String name = field.name(); ParsedType type = field.getType(); + boolean explicitType = false; ParsedSummaryField psf; } { - ( [ name = identifier() [ <TYPE> type = dataType() ] ] + ( [ name = identifier() [ <TYPE> { type = dataType(); explicitType = true; } ] ] lbrace() { psf = field.summaryFieldFor(name, type); + if (explicitType) { + psf.setHasExplicitType(); + } } (summaryItem(psf) (<NL>)*)* <RBRACE> ) } |