Changeset 16008 for lang/actionscript

Show
Ignore:
Timestamp:
07/19/08 02:13:04 (4 months ago)
Author:
gyuque
Message:

fixed lexer

Location:
lang/actionscript/ascss/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/actionscript/ascss/src/css/CSSLexer.as

    r15905 r16008  
    6464                private static const mRxSingleChars:RegExp = /^[)-+;:{}#.,*>~\[\]=]/ 
    6565                private static const mRxNth:RegExp         = /^((-?[0-9]*n[\+-][0-9]+)|(-?[0-9]*n))/ 
     66                private static const mRxNthCheck:RegExp    = /^n[_0-9a-zA-Z]/ 
    6667                private static const mRxCommnet:RegExp = new RegExp("^\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\/"); 
    6768 
     
    149150                                return kw; 
    150151 
     152                        var no_nth:Boolean = mRxNthCheck.exec(mCurSource) != null; 
     153 
    151154                        var rxr:Object; 
    152155                        if ((rxr = mRxString.exec(mCurSource)) != null) 
     
    205208                                advance = rxr[0].length; mTokBody = rxr[1]; 
    206209                        } 
    207                         else if ((rxr = mRxNth.exec(mCurSource)) != null) 
     210                        else if (!no_nth && (rxr = mRxNth.exec(mCurSource)) != null) 
    208211                        { 
    209212                                kw = PARSER.NTH;