Skip to content

Commit 3086b94

Browse files
committed
use ident() at more places
1 parent 34d8366 commit 3086b94

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/main/javacc/CSS3Parser.jj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ ElementSelector elementName() :
12411241
{
12421242
try
12431243
{
1244-
t = <IDENT>
1244+
t = ident()
12451245
{
12461246
return new ElementSelector(unescape(t.image, false), createLocator(t));
12471247
}
@@ -1281,7 +1281,7 @@ Condition attrib(boolean pseudoElementFound) :
12811281
( <S> )*
12821282
{ if (pseudoElementFound) { throw generateParseException(); } }
12831283

1284-
t = <IDENT> { name = unescape(t.image, false); }
1284+
t = ident() { name = unescape(t.image, false); }
12851285
( <S> )*
12861286
(
12871287
(
@@ -1300,15 +1300,15 @@ Condition attrib(boolean pseudoElementFound) :
13001300
( <S> )*
13011301
(
13021302
(
1303-
t = <IDENT> { value = unescape(t.image, false); }
1303+
t = ident() { value = unescape(t.image, false); }
13041304
|
13051305
t = <STRING> { value = unescape(t.image, false); }
13061306
)
13071307

13081308
( <S> )*
13091309
)
13101310
(
1311-
t = <IDENT> { insensitive = handleCaseInSensitive(t); }
1311+
t = ident() { insensitive = handleCaseInSensitive(t); }
13121312
( <S> )*
13131313
)?
13141314
)?

src/test/java/org/htmlunit/cssparser/parser/CSS3ParserTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4091,8 +4091,8 @@ public void invalid_not() throws Exception {
40914091
// "Error in pseudo class or element. (Invalid token \"p\". Was expecting one of: <S>, \")\".)");
40924092

40934093
checkErrorSelector("input:not()",
4094-
"Error in simple selector. (Invalid token \")\"."
4095-
+ " Was expecting one of: <S>, <IDENT>, \".\", \":\", \"*\", \"[\", <HASH>.)");
4094+
"Error in simple selector. (Invalid token \")\". "
4095+
+ "Was expecting one of: <S>, \"only\", \"inherit\", \"none\", \"from\", <IDENT>, \".\", \":\", \"*\", \"[\", <HASH>.)");
40964096

40974097
// checkErrorSelector("input:not(*.home)",
40984098
// "Error in pseudo class or element. (Invalid token \".\"."

0 commit comments

Comments
 (0)