Merge pull request #1081 from jgreywolf/Bug1061-CannotMarkMembersAsProtectedInClassDiagram

Bug/1061 Cannot mark members as protected in class diagram
This commit is contained in:
Knut Sveidqvist
2019-11-21 20:54:15 +01:00
committed by GitHub
4 changed files with 41 additions and 4 deletions

View File

@@ -40,6 +40,21 @@ describe('class diagram, ', function() {
parser.parse(str);
});
it('should handle visibility for methods and members', function() {
const str =
'classDiagram\n' +
'class TestClass\n' +
'TestClass : -int privateMember\n' +
'TestClass : +int publicMember\n' +
'TestClass : #int protectedMember\n' +
'TestClass : -privateMethod()\n' +
'TestClass : +publicMethod()\n' +
'TestClass : #protectedMethod()\n';
parser.parse(str);
});
it('should handle class definitions', function() {
const str =
'classDiagram\n' +

View File

@@ -36,7 +36,7 @@
\s*o return 'AGGREGATION';
\-\- return 'LINE';
\.\. return 'DOTTED_LINE';
":"[^#\n;]+ return 'LABEL';
":"[^\n;]+ return 'LABEL';
\- return 'MINUS';
"." return 'DOT';
\+ return 'PLUS';