diff options
Diffstat (limited to 'aidl_language_y.yy')
-rw-r--r-- | aidl_language_y.yy | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/aidl_language_y.yy b/aidl_language_y.yy index 7f0b5bf7..11ab29e9 100644 --- a/aidl_language_y.yy +++ b/aidl_language_y.yy @@ -94,7 +94,6 @@ AidlLocation loc(const yy::parser::location_type& l) { std::vector<std::unique_ptr<AidlDefinedType>>* declarations; } -%destructor { } <character> %destructor { } <direction> %destructor { delete ($$); } <*> @@ -110,7 +109,7 @@ AidlLocation loc(const yy::parser::location_type& l) { %token<token> UNION "union" %token<token> CONST "const" -%token<character> CHARVALUE "char literal" +%token<token> CHARVALUE "char literal" %token<token> FLOATVALUE "float literal" %token<token> HEXVALUE "hex literal" %token<token> INTVALUE "int literal" @@ -408,7 +407,10 @@ interface_members const_expr : TRUE_LITERAL { $$ = AidlConstantValue::Boolean(loc(@1), true); } | FALSE_LITERAL { $$ = AidlConstantValue::Boolean(loc(@1), false); } - | CHARVALUE { $$ = AidlConstantValue::Character(loc(@1), $1); } + | CHARVALUE { + $$ = AidlConstantValue::Character(loc(@1), $1->GetText()); + delete $1; + } | INTVALUE { $$ = AidlConstantValue::Integral(loc(@1), $1->GetText()); if ($$ == nullptr) { |