Interface methods can now be annotated.
The syntax is a strict subset of what Java supports. The following are valid
annotations:
@Fragile
@LotsOfStuff(single="yes", many={"a", "b", "c"})
An annotation either has no parameters (in which case the name is NOT followed
by parentheses) or is does and what follows the name is a parenthesized list
of name=value pairs, where each value is either a single quoted string literal
or a list of quoted string literals surrounded by curly braces.
Change-Id: I3c51d771b7d55c8d16531286d011f61be700a21c
diff --git a/hidl-gen_l.ll b/hidl-gen_l.ll
index 13ab222..359c351 100644
--- a/hidl-gen_l.ll
+++ b/hidl-gen_l.ll
@@ -13,6 +13,7 @@
%{
+#include "Annotation.h"
#include "AST.h"
#include "CompoundType.h"
#include "EnumType.h"
@@ -92,6 +93,7 @@
"." { count(yyg); return('.'); }
"=" { count(yyg); return('='); }
"+" { count(yyg); return('+'); }
+"@" { count(yyg); return('@'); }
{PATH}{VERSION}?"::"{PATH} { count(yyg); yylval->str = strdup(yytext); return FQNAME; }
{VERSION}"::"{PATH} { count(yyg); yylval->str = strdup(yytext); return FQNAME; }