fix multiline comment bug
This commit is contained in:
parent
60ae8dd6d6
commit
1da01fbc57
@ -58,7 +58,7 @@ leave[[:space:]] { return LEAVE; }
|
|||||||
return IDENTIFIER;
|
return IDENTIFIER;
|
||||||
}
|
}
|
||||||
\/\/ { BEGIN IN_COMMENT; }
|
\/\/ { BEGIN IN_COMMENT; }
|
||||||
\/\* { BEGIN IN_COMMENT; }
|
\/\* { BEGIN IN_MULTILINE_COMMENT; }
|
||||||
\%\% {
|
\%\% {
|
||||||
BEGIN IN_CODE_SECTION;
|
BEGIN IN_CODE_SECTION;
|
||||||
return SEPARATOR;
|
return SEPARATOR;
|
||||||
@ -71,7 +71,7 @@ leave[[:space:]] { return LEAVE; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
<IN_MULTILINE_COMMENT>{
|
<IN_MULTILINE_COMMENT>{
|
||||||
. { ; }
|
.|\n { ; }
|
||||||
\*\/ { BEGIN IN_RULE_SECTION; }
|
\*\/ { BEGIN IN_RULE_SECTION; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,8 @@
|
|||||||
%%
|
%%
|
||||||
|
|
||||||
// this is a comment
|
// this is a comment
|
||||||
/* so is this */
|
/* so is this
|
||||||
|
*/
|
||||||
enter function_definition {
|
enter function_definition {
|
||||||
char * name = tbget_node_text($$->"declarator"->"declarator");
|
char * name = tbget_node_text($$->"declarator"->"declarator");
|
||||||
functions.insert(name);
|
functions.insert(name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user