Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions ph-css/src/main/jjtree/ParserCSS30.jjt
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ TOKEN :
| < DASH: "|" >
| < GREATER: ">" >
| < TILDE: "~" >
| < DOLLAR: "$" >
| < HASH: "#" <NAME> >
| < INCLUDES: "~=" >
| < DASHMATCH: "|=" >
Expand Down Expand Up @@ -344,6 +345,12 @@ SPECIAL_TOKEN :
}
}

JAVACODE
private void errorDeprecated(final Token tok, final int... aKinds) throws ParseException #void {
int expectedSeq[][] = { aKinds };
throw new ParseException(tok, expectedSeq, tokenImage);
}

JAVACODE
private void errorUnexpectedRule(final String sRule, final String sMsg) #void
{
Expand Down Expand Up @@ -1125,10 +1132,17 @@ void selector() : {}
)*
}

void property() : {}
void property() :
{
<IDENT> { jjtThis.setText (token.image); }
( <S> )*
Token save;
}
{
( <IDENT> { jjtThis.setText (token.image); }
( <S> )*
)
| LOOKAHEAD(2, (<ASTERISK> | <DOLLAR>) <IDENT>)
{ save = token; }
(<ASTERISK> | <DOLLAR>) { errorDeprecated(save, IDENT); }
}

void important() : {}
Expand Down