Skip to content

Commit

Permalink
Merge pull request #8104 from matthiasblaesing/css_at_rule_space_brace
Browse files Browse the repository at this point in the history
CSS: Improve parsing of custom @-rules
  • Loading branch information
matthiasblaesing authored Jan 11, 2025
2 parents 9f32bc2 + 6d3af5e commit b556042
Show file tree
Hide file tree
Showing 4 changed files with 10,255 additions and 10,390 deletions.
4 changes: 2 additions & 2 deletions ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ package org.netbeans.modules.css.lib;
private boolean tokenNameEquals(String tokenImage) {
return tokenImage.equalsIgnoreCase(input.LT(1).getText());
}
private boolean tokenNameEquals2(String tokenImage) {
return tokenImage.equalsIgnoreCase(input.LT(2).getText());
}
Expand Down Expand Up @@ -713,7 +713,7 @@ atRuleId
;

generic_at_rule
: AT_IDENT ws ((LBRACE) => braceBlock2 | (componentValue) => componentValue) ((ws (LBRACE | (componentValue) => componentValue)) => (ws ((LBRACE) => braceBlock2 | (componentValue) => componentValue)))*;
: {! tokenNameEquals("@charset")}? AT_IDENT (( ~ (SEMI | LBRACE)) => componentValue )* ((LBRACE) => braceBlock2 | SEMI);

moz_document
:
Expand Down
Loading

0 comments on commit b556042

Please sign in to comment.