made comments added in annotation

This commit is contained in:
amarjeetkapoor1 2016-06-12 13:39:23 +05:30
parent 251a617ce9
commit 3603845ace
2 changed files with 9 additions and 12 deletions

View file

@ -203,8 +203,7 @@ use[ \t\r\n>]*"<" { BEGIN(cond_use); }
[\n\r\t ]
\/\/ { return COMMENT;}
"//"[^0-9"["] { yyless(2); BEGIN(cond_lcomment); stringcontents.clear(); return DCOMMENT;}
\/\/ { BEGIN(cond_lcomment); stringcontents.clear(); return COMMENT;}
<cond_lcomment>{
\n { BEGIN(INITIAL);
parserlval.text = strdup(stringcontents.c_str());

View file

@ -178,6 +178,7 @@ annotations:
$$->push_back(*$2);
delete $2;
}
;
annotation:
TOK_ANNOTATION TOK_ID '(' arguments_call ')'
@ -185,6 +186,7 @@ annotation:
$$ = Annotation::create($2, *$4);
free($2);
}
;
descriptions:
description
@ -193,12 +195,13 @@ descriptions:
$$->push_back(*$1);
delete $1;
}
;
description:
DCOMMENT arguments_call
COMMENT arguments_call
{
$$ = Annotation::create("Description", *$2);
}
;
parameters:
parameter
@ -207,19 +210,14 @@ parameters:
$$->push_back(*$1);
delete $1;
}
|
parameters parameter
{
$$ = $1;
$$->push_back(*$2);
delete $2;
}
;
parameter:
COMMENT arguments_call
{
$$ = Annotation::create("Parameter", *$2);
}
;
statement:
';'
@ -246,7 +244,7 @@ statement:
$2->add_annotations($1);
$2->add_annotations($3);
}
|descriptions
| TOK_MODULE TOK_ID '(' arguments_decl optional_commas ')'
{
Module *newmodule = new Module();