flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [5/5] git commit: [flex-falcon] [refs/heads/develop] - fix conflict between :not and :normal...
Date Sat, 14 Feb 2015 06:44:15 GMT
fix conflict between :not and :normal...


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/982ecfb9
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/982ecfb9
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/982ecfb9

Branch: refs/heads/develop
Commit: 982ecfb9bef1eea664f3021737d5368b738faf1e
Parents: 06fcfd5
Author: Alex Harui <aharui@apache.org>
Authored: Fri Feb 13 22:42:11 2015 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Fri Feb 13 22:42:11 2015 -0800

----------------------------------------------------------------------
 .../org/apache/flex/compiler/internal/css/CSS.g  | 19 ++++++++++---------
 .../apache/flex/compiler/internal/css/CSSTree.g  |  2 +-
 2 files changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/982ecfb9/compiler/src/org/apache/flex/compiler/internal/css/CSS.g
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/css/CSS.g b/compiler/src/org/apache/flex/compiler/internal/css/CSS.g
index a41a463..ac92798 100644
--- a/compiler/src/org/apache/flex/compiler/internal/css/CSS.g
+++ b/compiler/src/org/apache/flex/compiler/internal/css/CSS.g
@@ -321,8 +321,8 @@ compoundSelector
  * the conditions were broken into multiple tokens.
  */  
 simpleSelectorFraction
-    :   element
-    |   condition 
+    :   condition 
+    |   element
     ;
    
 /**
@@ -332,9 +332,9 @@ simpleSelectorFraction
 condition
     :   ( DOT^ ID
         | HASH_WORD 
+        | COLON^ NOT ARGUMENTS 
         | COLON^ ID 
         | DOUBLE_COLON^ ID 
-        | notSelector
         | attributeSelector
         | childSelector
         | precededSelector
@@ -447,10 +447,6 @@ formatOption
     :   FORMAT ARGUMENTS	-> ^(FORMAT ARGUMENTS)
 	;
 
-notSelector
-    :   NOT ARGUMENTS       -> ^(NOT ARGUMENTS)
-	;
-
 childSelector
     :   '>' simpleSelectorFraction
     ;
@@ -514,12 +510,14 @@ PROPERTY_REFERENCE : 'PropertyReference' ;
 IMPORTANT : '!important' ;
 EMBED : 'Embed' ;
 URL : 'url' ;
-NOT : ':not' ;
 FORMAT : 'format' ;
 LOCAL : 'local' ;
 SCALE : 'scale' ;
 NULL : 'null' ;
 ONLY : 'only' ;
+NOT
+    :  'not'
+    ;
 
 /** 
  * Matches an alpha filter - alpha(opacity=70)
@@ -563,10 +561,12 @@ RGB : 	'rgb(' 	( WS* NUMBER ( PERCENT | ) WS* ) ','
 				( WS* NUMBER ( PERCENT | ) WS* ) 
 		')' ; 
 
+
 /** Arguments of a function call property value. */
 ARGUMENTS
     :   '(' ( options {greedy=false;}: . )* ')'
-    ; 
+    ;
+ 
 /**
  * Match multiple semi-colons in Lexer level so that the parser can have a 
  * finite number of look ahead, instead of LL(*);
@@ -591,6 +591,7 @@ OPERATOR
 	:   ('+'|'-'|'*'|'/')
     ;    
     
+
 fragment
 LETTER
     :   'a'..'z' 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/982ecfb9/compiler/src/org/apache/flex/compiler/internal/css/CSSTree.g
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/css/CSSTree.g b/compiler/src/org/apache/flex/compiler/internal/css/CSSTree.g
index aded4f7..c1ba3db 100644
--- a/compiler/src/org/apache/flex/compiler/internal/css/CSSTree.g
+++ b/compiler/src/org/apache/flex/compiler/internal/css/CSSTree.g
@@ -282,9 +282,9 @@ conditionSelector
 }
     :   ^(DOT c=ID)   { type = ConditionType.CLASS; name = $c.text; }  
     |   HASH_WORD   { type = ConditionType.ID; name = $HASH_WORD.text.substring(1); }
+    |   ^(COLON NOT arg=ARGUMENTS) { type = ConditionType.NOT; name = $arg.text; }
     |   ^(COLON s=ID) { type = ConditionType.PSEUDO; name = $s.text; } 
     |   ^(DOUBLE_COLON dc=ID) { type = ConditionType.PSEUDO; name = $dc.text; } 
-    |   ^(NOT n=ARGUMENTS) { type = ConditionType.NOT; name = $n.text; }
     |   attributeSelector { type = ConditionType.ATTRIBUTE; name = curAttribute.substring(1);
}
     |   childSelector { type = ConditionType.CHILD; name = ConditionType.CHILD.toString();
}
     |   precededSelector { type = ConditionType.PRECEDED; name = ConditionType.PRECEDED.toString();
}


Mime
View raw message