Skip to content

Commit

Permalink
Language parser: added support for C# property accessors visibility m…
Browse files Browse the repository at this point in the history
…odifiers.
  • Loading branch information
codemaximus committed Jul 3, 2014
1 parent 070c355 commit f5ff1b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/entry.h
Expand Up @@ -135,6 +135,10 @@ class Entry
static const uint64 Singleton = (1ULL<<14); // UNO IDL

// member specifiers (add new items to the beginning)
static const uint64 PrivateGettable = (1ULL<<20); // C# private getter
static const uint64 ProtectedGettable = (1ULL<<21); // C# protected getter
static const uint64 PrivateSettable = (1ULL<<22); // C# private setter
static const uint64 ProtectedSettable = (1ULL<<23); // C# protected setter
static const uint64 Inline = (1ULL<<24);
static const uint64 Explicit = (1ULL<<25);
static const uint64 Mutable = (1ULL<<26);
Expand Down
4 changes: 4 additions & 0 deletions src/scanner.l
Expand Up @@ -6129,6 +6129,10 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN(FindMembers);
}
}
<CSAccessorDecl>"private "{BN}*"set" { if (curlyCount==0) current->spec |= Entry::PrivateSettable; }
<CSAccessorDecl>"protected "{BN}*"set" { if (curlyCount==0) current->spec |= Entry::ProtectedSettable; }
<CSAccessorDecl>"private "{BN}*"get" { if (curlyCount==0) current->spec |= Entry::PrivateGettable; }
<CSAccessorDecl>"protected "{BN}*"get" { if (curlyCount==0) current->spec |= Entry::ProtectedGettable; }
<CSAccessorDecl>"set" { if (curlyCount==0) current->spec |= Entry::Settable; }
<CSAccessorDecl>"get" { if (curlyCount==0) current->spec |= Entry::Gettable; }
<CSAccessorDecl>"add" { if (curlyCount==0) current->spec |= Entry::Addable; }
Expand Down

0 comments on commit f5ff1b8

Please sign in to comment.