parser: resolve optional enum type

This commit is contained in:
radare 2020-01-31 16:00:31 +01:00 committed by GitHub
parent 2fbfbf45c7
commit bf9eefa694
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View file

@ -119,6 +119,9 @@ int typ;
}
fn (p mut Parser) check_enum_member_access() {
if p.expected_type.starts_with('Option_') {
p.expected_type = p.expected_type[7..]
}
T := p.find_type(p.expected_type)
if T.cat == .enum_ {
p.check(.dot)