Skip to content

Commit

Permalink
Merge pull request #14 from mraineri/master
Browse files Browse the repository at this point in the history
Added Annotation as a valid element of an Annotation
  • Loading branch information
mraineri committed Jul 18, 2019
2 parents aa3aa20 + e9bc8de commit ea5735f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions lib/Annotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@ const ParserCommon = require('./ParserCommon');
class Annotation extends ParserCommon {
constructor(element) {
super();
this.Annotations = {};
this.validElements = {
'Collection': {parent: this, name: 'Collection'},
'Record': {parent: this, name: 'Record'},
'String': {parent: this, name: 'String', getText: true}
'String': {parent: this, name: 'String', getText: true},
'Annotation': {parent: this.Annotations, nameProp: 'Term'}
};
this.validAttributes = {
'Term': {alreadyHandeled: true},
'Qualifier': {},
'String': {},
'EnumMember': {},
'Bool': {bool: true},
'Int': {integer: true}
'Int': {integer: true},
'Decimal': {decimal: true}
};
this.init(element, 'Term');
}
Expand Down
3 changes: 2 additions & 1 deletion lib/EnumType.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ class EnumType extends ParserCommon {
};
this.validAttributes = {
'IsFlags': {bool: true},
'Name': {alreadyHandeled: true}
'Name': {alreadyHandeled: true},
'UnderlyingType': {}
};

this.init(element, 'Name');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CSDLParser",
"version": "0.2.00",
"version": "0.2.1",
"description": "CSDL Metadata Parser",
"main": "./index.js",
"scripts": {
Expand Down

0 comments on commit ea5735f

Please sign in to comment.