Skip to content
This repository has been archived by the owner on Oct 17, 2019. It is now read-only.

Support "value is type $primitive" for constraining choices #31

Merged
merged 2 commits into from
Dec 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/dataElementListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class DataElementImporter extends SHRDataElementParserListener {
enterEntryDef(ctx) {
const id = new Identifier(this._currentNs, ctx.entryHeader().simpleName().getText());
this._currentDef = new DataElement(id, true).withGrammarVersion(this._currentGrammarVersion);

if (ctx.entryHeader().simpleName().LOWER_WORD()) { logger.error('Entry Element name "%s" should begin with a capital letter. ERROR_CODE:11002', ctx.entryHeader().simpleName().getText()); }
}

Expand Down Expand Up @@ -460,7 +460,9 @@ class DataElementImporter extends SHRDataElementParserListener {
return this.resolveToIdentifier(ctx.simpleOrFQName().getText());
} else if (typeof ctx.ref === 'function' && ctx.ref()) {
return this.resolveToIdentifier(ctx.ref().simpleOrFQName().getText());
}else if (ctx.tbd() && ctx.tbd().STRING()) {
} else if (typeof ctx.primitive === 'function' && ctx.primitive()) {
return new PrimitiveIdentifier(ctx.primitive().getText());
} else if (ctx.tbd() && ctx.tbd().STRING()) {
return new TBD(stripDelimitersFromToken(ctx.tbd().STRING()));
} else {
return new TBD();
Expand Down
Loading