private void parseSemicolon ( FormattableContainer currentRule ) { String selector = null ; Operation params = null ; StringBuilder builder = cachesBuilder ; LOOP : for ( ; ; ) { char ch ; try { ch = read ( ) ; } catch ( Exception e ) { ch = ' ' ; // a not terminated line is like a lime with semicolon } switch ( ch ) { case ' ' : if ( isMixin ( builder ) ) { builder . append ( ch ) ; continue LOOP ; } String name = trim ( builder ) ; strictMath = "font" . equals ( name ) ; Expression value = parseExpression ( ( char ) 0 ) ; strictMath = false ; ch = read ( ) ; switch ( ch ) { case ' ' : //last line in a block does not need a semicolon // back( ch ); break ; case ' ' : break ; default : throw createException ( "Unrecognized input: '" + ch + "'" ) ; } currentRule . add ( new RuleProperty ( name , value ) ) ; return ; case ' ' : ch = read ( ) ; if ( ch == ' ' ) { // @{ --> a inline variable and not a variable declaration builder . append ( ' ' ) ; builder . append ( ch ) ; do { ch = read ( ) ; builder . append ( ch ) ; } while ( ch != ' ' ) ; break ; } else { back ( ch ) ; } throwUnrecognizedInputIfAny ( builder , ch ) ; variable ( currentRule . getVariables ( ) , currentRule ) ; return ; case ' ' : if ( ! comment ( isWhitespace ( builder ) ? currentRule : null ) ) { builder . append ( ch ) ; } break ; case ' ' : if ( ! reader . nextIsMixinParam ( false ) ) { builder . append ( ch ) ; break ; } selector = trim ( builder ) ; params = parseParameterList ( ) ; break ; case ' ' : case ' ' : String sel = trim ( builder ) ; if ( ! sel . isEmpty ( ) ) { if ( selector == null ) { selector = sel ; } else { selector += ' ' + sel ; // "!important" attribute } } if ( selector != null ) { if ( selector . contains ( ":extend(" ) ) { LessExtend . addLessExtendsTo ( currentRule , reader , selector ) ; } else { Mixin mixin = new Mixin ( reader , selector , params , currentRule . getMixins ( ) ) ; currentRule . add ( mixin ) ; } } return ; default : builder . append ( ch ) ; } } }
Parse an expression which ends with a semicolon . This can be a property assignment variable assignment a directive or other .