This is an automated email from the ASF dual-hosted git repository. joshtynjala pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit d248f54b9ceb28b2d1070edf01eb183b983bde36 Author: Josh Tynjala <[email protected]> AuthorDate: Thu May 23 15:56:49 2024 -0700 CSS.g/CSSTree.g: a dashed identifier is not allowed everywhere an identifier is Followup to CSS custom properties --- .../src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g | 6 +++++- .../main/antlr3/org/apache/royale/compiler/internal/css/CSSTree.g | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g b/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g index 490f33aa8..eb4a58b4c 100644 --- a/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g +++ b/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g @@ -431,6 +431,7 @@ declarationsBlock */ declaration : ID COLON value -> ^(COLON ID value) + | DASHED_ID COLON value -> ^(COLON DASHED_ID value) ; /** @@ -727,7 +728,10 @@ HASH_WORD : '#' ( LETTER | DIGIT | '-' | '_' )+ ; -ID : ( '-' | '--' | '_' | '__' | '___' )? LETTER ( LETTER | DIGIT | '-' | '_' )* +ID : ( '-' | '_' | '__' | '___' )? LETTER ( LETTER | DIGIT | '-' | '_' )* + ; + +DASHED_ID : '--' LETTER ( LETTER | DIGIT | '-' | '_' )* ; /** diff --git a/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSSTree.g b/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSSTree.g index 4809ea5c3..8c581fed6 100644 --- a/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSSTree.g +++ b/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSSTree.g @@ -450,6 +450,7 @@ declaration returns [CSSProperty property] $property = new CSSProperty($id.text, $v.propertyValue, $start, tokenStream); } : ^(COLON id=ID v=value) + | ^(COLON id=DASHED_ID v=value) ; value returns [CSSPropertyValue propertyValue]
