guard ]] with lex->flags.noops

This commit is contained in:
Wolfgang Bumiller 2012-12-22 20:41:02 +01:00
parent eb952f1199
commit 77639bb21d

16
lexer.c
View file

@ -1135,14 +1135,16 @@ int lex_do(lex_file *lex)
return (lex->tok.ttype = TOKEN_OPERATOR);
case ']':
nextch = lex_getch(lex);
if (nextch == ']') {
lex_tokench(lex, ch);
lex_tokench(lex, nextch);
lex_endtoken(lex);
return (lex->tok.ttype = TOKEN_ATTRIBUTE_CLOSE);
if (lex->flags.noops) {
nextch = lex_getch(lex);
if (nextch == ']') {
lex_tokench(lex, ch);
lex_tokench(lex, nextch);
lex_endtoken(lex);
return (lex->tok.ttype = TOKEN_ATTRIBUTE_CLOSE);
}
lex_ungetch(lex, nextch);
}
lex_ungetch(lex, nextch);
/* FALL THROUGH */
case ')':
case ';':