Normalize parsing of access control symbols
This commit is contained in:
parent
59e3185500
commit
23362b058d
|
@ -22,7 +22,7 @@ func (this *Parser) parseTopLevel () error {
|
|||
if this.token.Kind == lexer.Symbol {
|
||||
access, err = this.parseAccess()
|
||||
|
||||
err = this.expectNextDesc (
|
||||
err = this.expectDesc (
|
||||
descriptionTopLevel,
|
||||
lexer.Symbol,
|
||||
lexer.LBracket,
|
||||
|
@ -69,6 +69,7 @@ func (this *Parser) parseAccess () (entity.Access, error) {
|
|||
"Access control specifier",
|
||||
lexer.Symbol, "-", "~", "+")
|
||||
if err != nil { return 0, err }
|
||||
defer this.next()
|
||||
|
||||
switch this.token.Value {
|
||||
case "-": return entity.AccessPrivate, nil
|
||||
|
|
Loading…
Reference in New Issue