From a2f255448e6a755892a97b7df9fc2b65efc5dccc Mon Sep 17 00:00:00 2001 From: joheriks Date: Mon, 28 Oct 2013 17:06:23 +0200 Subject: [PATCH] Allow @font-face and general @-directives inside @if-blocks (#11649) Change-Id: Ifa844e7bf8add886792b39c016cc2c9aa3d94b0c --- .../vaadin/sass/internal/parser/Parser.java | 511 ++++++++++-------- .../com/vaadin/sass/internal/parser/Parser.jj | 8 +- .../automatic/css/at-directive-in-if.css | 1 + .../automatic/scss/at-directive-in-if.scss | 8 + 4 files changed, 306 insertions(+), 222 deletions(-) create mode 100644 theme-compiler/tests/resources/automatic/css/at-directive-in-if.css create mode 100644 theme-compiler/tests/resources/automatic/scss/at-directive-in-if.scss diff --git a/theme-compiler/src/com/vaadin/sass/internal/parser/Parser.java b/theme-compiler/src/com/vaadin/sass/internal/parser/Parser.java index 6989490648..bdc5fbc86f 100755 --- a/theme-compiler/src/com/vaadin/sass/internal/parser/Parser.java +++ b/theme-compiler/src/com/vaadin/sass/internal/parser/Parser.java @@ -973,6 +973,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { case HASH: case MEDIA_SYM: case KEY_FRAME_SYM: + case ATKEYWORD: ; break; default: @@ -1001,6 +1002,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { case HASH: case MEDIA_SYM: case KEY_FRAME_SYM: + case ATKEYWORD: ifContentStatement(); break; case MICROSOFT_RULE: @@ -1918,6 +1920,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { case IMPORT_SYM: case MEDIA_SYM: case KEY_FRAME_SYM: + case ATKEYWORD: ; break; default: @@ -1946,6 +1949,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { case HASH: case MEDIA_SYM: case KEY_FRAME_SYM: + case ATKEYWORD: ifContentStatement(); break; case MICROSOFT_RULE: @@ -2864,6 +2868,9 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { case IF_SYM: controlDirective(); break; + case ATKEYWORD: + atRuleDeclaration(); + break; default: jj_la1[107] = jj_gen; jj_consume_token(-1); @@ -2943,14 +2950,48 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { case VARIABLE: case HASH: case MEDIA_SYM: + case FONT_FACE_SYM: case KEY_FRAME_SYM: + case ATKEYWORD: ; break; default: jj_la1[110] = jj_gen; break label_71; } - ifContentStatement(); + switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { + case PLUS: + case PRECEDES: + case SIBLING: + case LBRACKET: + case ANY: + case PARENT: + case DOT: + case COLON: + case INTERPOLATION: + case INCLUDE_SYM: + case DEBUG_SYM: + case WARN_SYM: + case EACH_SYM: + case IF_SYM: + case EXTEND_SYM: + case CONTENT_SYM: + case IDENT: + case VARIABLE: + case HASH: + case MEDIA_SYM: + case KEY_FRAME_SYM: + case ATKEYWORD: + ifContentStatement(); + break; + case FONT_FACE_SYM: + fontFace(); + break; + default: + jj_la1[111] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } } jj_consume_token(RBRACE); label_72: while (true) { @@ -2959,7 +3000,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[111] = jj_gen; + jj_la1[112] = jj_gen; break label_72; } jj_consume_token(S); @@ -2970,7 +3011,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[112] = jj_gen; + jj_la1[113] = jj_gen; break label_73; } elseDirective(); @@ -2989,7 +3030,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[113] = jj_gen; + jj_la1[114] = jj_gen; break label_74; } jj_consume_token(S); @@ -3022,13 +3063,13 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[114] = jj_gen; + jj_la1[115] = jj_gen; break label_75; } } break; default: - jj_la1[115] = jj_gen; + jj_la1[116] = jj_gen; ; } jj_consume_token(LBRACE); @@ -3038,7 +3079,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[116] = jj_gen; + jj_la1[117] = jj_gen; break label_76; } jj_consume_token(S); @@ -3070,14 +3111,48 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { case VARIABLE: case HASH: case MEDIA_SYM: + case FONT_FACE_SYM: case KEY_FRAME_SYM: + case ATKEYWORD: ; break; default: - jj_la1[117] = jj_gen; + jj_la1[118] = jj_gen; break label_77; } - ifContentStatement(); + switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { + case PLUS: + case PRECEDES: + case SIBLING: + case LBRACKET: + case ANY: + case PARENT: + case DOT: + case COLON: + case INTERPOLATION: + case INCLUDE_SYM: + case DEBUG_SYM: + case WARN_SYM: + case EACH_SYM: + case IF_SYM: + case EXTEND_SYM: + case CONTENT_SYM: + case IDENT: + case VARIABLE: + case HASH: + case MEDIA_SYM: + case KEY_FRAME_SYM: + case ATKEYWORD: + ifContentStatement(); + break; + case FONT_FACE_SYM: + fontFace(); + break; + default: + jj_la1[119] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } } jj_consume_token(RBRACE); label_78: while (true) { @@ -3086,7 +3161,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[118] = jj_gen; + jj_la1[120] = jj_gen; break label_78; } jj_consume_token(S); @@ -3152,7 +3227,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { n = jj_consume_token(NOT_EQ); break; default: - jj_la1[119] = jj_gen; + jj_la1[121] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3184,7 +3259,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[120] = jj_gen; + jj_la1[122] = jj_gen; break label_79; } jj_consume_token(S); @@ -3196,7 +3271,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[121] = jj_gen; + jj_la1[123] = jj_gen; break label_80; } jj_consume_token(S); @@ -3208,7 +3283,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[122] = jj_gen; + jj_la1[124] = jj_gen; break label_81; } jj_consume_token(S); @@ -3223,7 +3298,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { documentHandler.startEachDirective(var.image, listVariable); break; default: - jj_la1[123] = jj_gen; + jj_la1[125] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3234,7 +3309,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[124] = jj_gen; + jj_la1[126] = jj_gen; break label_82; } jj_consume_token(S); @@ -3262,10 +3337,11 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { case HASH: case MEDIA_SYM: case KEY_FRAME_SYM: + case ATKEYWORD: ; break; default: - jj_la1[125] = jj_gen; + jj_la1[127] = jj_gen; break label_83; } ifContentStatement(); @@ -3277,7 +3353,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[126] = jj_gen; + jj_la1[128] = jj_gen; break label_84; } jj_consume_token(S); @@ -3295,7 +3371,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[127] = jj_gen; + jj_la1[129] = jj_gen; break label_85; } jj_consume_token(S); @@ -3307,7 +3383,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[128] = jj_gen; + jj_la1[130] = jj_gen; break label_86; } jj_consume_token(COMMA); @@ -3317,7 +3393,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[129] = jj_gen; + jj_la1[131] = jj_gen; break label_87; } jj_consume_token(S); @@ -3330,7 +3406,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[130] = jj_gen; + jj_la1[132] = jj_gen; break label_88; } jj_consume_token(S); @@ -3355,7 +3431,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[131] = jj_gen; + jj_la1[133] = jj_gen; break label_89; } jj_consume_token(S); @@ -3375,14 +3451,14 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[132] = jj_gen; + jj_la1[134] = jj_gen; break label_90; } jj_consume_token(S); } break; default: - jj_la1[133] = jj_gen; + jj_la1[135] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3393,7 +3469,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[134] = jj_gen; + jj_la1[136] = jj_gen; break label_91; } jj_consume_token(S); @@ -3422,12 +3498,12 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { case HASH: case MEDIA_SYM: case PAGE_SYM: - case FONT_FACE_SYM: case KEY_FRAME_SYM: + case ATKEYWORD: ; break; default: - jj_la1[135] = jj_gen; + jj_la1[137] = jj_gen; break label_92; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { @@ -3452,16 +3528,14 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { case HASH: case MEDIA_SYM: case KEY_FRAME_SYM: + case ATKEYWORD: ifContentStatement(); break; - case FONT_FACE_SYM: - fontFace(); - break; case PAGE_SYM: page(); break; default: - jj_la1[136] = jj_gen; + jj_la1[138] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3473,7 +3547,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[137] = jj_gen; + jj_la1[139] = jj_gen; break label_93; } jj_consume_token(S); @@ -3492,7 +3566,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[138] = jj_gen; + jj_la1[140] = jj_gen; break label_94; } jj_consume_token(COMMA); @@ -3502,7 +3576,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[139] = jj_gen; + jj_la1[141] = jj_gen; break label_95; } jj_consume_token(S); @@ -3560,7 +3634,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[140] = jj_gen; + jj_la1[142] = jj_gen; break label_96; } jj_consume_token(S); @@ -3582,14 +3656,14 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[141] = jj_gen; + jj_la1[143] = jj_gen; break label_98; } jj_consume_token(S); } break; default: - jj_la1[142] = jj_gen; + jj_la1[144] = jj_gen; ; } prev = nonVariableTerm(prev); @@ -3601,13 +3675,13 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { token.beginColumn, prev, variable.image); break; default: - jj_la1[143] = jj_gen; + jj_la1[145] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: - jj_la1[144] = jj_gen; + jj_la1[146] = jj_gen; ; } VariableNode arg = new VariableNode(name, first, false); @@ -3667,7 +3741,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[145] = jj_gen; + jj_la1[147] = jj_gen; break label_99; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { @@ -3679,14 +3753,14 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[146] = jj_gen; + jj_la1[148] = jj_gen; break label_100; } jj_consume_token(S); } break; default: - jj_la1[147] = jj_gen; + jj_la1[149] = jj_gen; ; } next = term(prev); @@ -3699,7 +3773,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[148] = jj_gen; + jj_la1[150] = jj_gen; break label_101; } jj_consume_token(COMMA); @@ -3709,7 +3783,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[149] = jj_gen; + jj_la1[151] = jj_gen; break label_102; } jj_consume_token(S); @@ -3756,7 +3830,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[150] = jj_gen; + jj_la1[152] = jj_gen; break label_103; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { @@ -3768,14 +3842,14 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[151] = jj_gen; + jj_la1[153] = jj_gen; break label_104; } jj_consume_token(S); } break; default: - jj_la1[152] = jj_gen; + jj_la1[154] = jj_gen; ; } next = term(prev); @@ -3801,7 +3875,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[153] = jj_gen; + jj_la1[155] = jj_gen; break label_105; } jj_consume_token(S); @@ -3821,7 +3895,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { jj_consume_token(RPARAN); break; default: - jj_la1[154] = jj_gen; + jj_la1[156] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3831,7 +3905,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[155] = jj_gen; + jj_la1[157] = jj_gen; break label_106; } jj_consume_token(S); @@ -3846,7 +3920,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[156] = jj_gen; + jj_la1[158] = jj_gen; break label_108; } jj_consume_token(S); @@ -3856,7 +3930,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[157] = jj_gen; + jj_la1[159] = jj_gen; break label_107; } } @@ -3870,7 +3944,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[158] = jj_gen; + jj_la1[160] = jj_gen; break label_109; } jj_consume_token(S); @@ -3894,7 +3968,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[159] = jj_gen; + jj_la1[161] = jj_gen; break label_110; } styleRuleOrDeclarationOrNestedProperties(); @@ -3906,7 +3980,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[160] = jj_gen; + jj_la1[162] = jj_gen; break label_111; } jj_consume_token(S); @@ -3914,7 +3988,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { documentHandler.endIncludeContentBlock(); break; default: - jj_la1[161] = jj_gen; + jj_la1[163] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3947,7 +4021,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[162] = jj_gen; + jj_la1[164] = jj_gen; break label_112; } jj_consume_token(S); @@ -3959,7 +4033,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[163] = jj_gen; + jj_la1[165] = jj_gen; break label_113; } jj_consume_token(S); @@ -3975,7 +4049,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { type = jj_consume_token(CONTAINS); break; default: - jj_la1[164] = jj_gen; + jj_la1[166] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3985,7 +4059,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[165] = jj_gen; + jj_la1[167] = jj_gen; break label_114; } jj_consume_token(S); @@ -3996,7 +4070,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { jj_consume_token(RPARAN); break; default: - jj_la1[166] = jj_gen; + jj_la1[168] = jj_gen; ; } jj_consume_token(COMMA); @@ -4006,7 +4080,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[167] = jj_gen; + jj_la1[169] = jj_gen; break label_115; } jj_consume_token(S); @@ -4021,7 +4095,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[168] = jj_gen; + jj_la1[170] = jj_gen; break label_116; } jj_consume_token(S); @@ -4034,14 +4108,14 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[169] = jj_gen; + jj_la1[171] = jj_gen; break label_117; } jj_consume_token(S); } break; default: - jj_la1[170] = jj_gen; + jj_la1[172] = jj_gen; ; } jj_consume_token(RPARAN); @@ -4068,7 +4142,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[171] = jj_gen; + jj_la1[173] = jj_gen; break label_118; } jj_consume_token(S); @@ -4080,7 +4154,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[172] = jj_gen; + jj_la1[174] = jj_gen; break label_119; } jj_consume_token(S); @@ -4105,7 +4179,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[173] = jj_gen; + jj_la1[175] = jj_gen; break label_120; } jj_consume_token(S); @@ -4117,7 +4191,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[174] = jj_gen; + jj_la1[176] = jj_gen; break label_121; } jj_consume_token(S); @@ -4129,7 +4203,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[175] = jj_gen; + jj_la1[177] = jj_gen; break label_122; } jj_consume_token(S); @@ -4140,7 +4214,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { jj_consume_token(RPARAN); break; default: - jj_la1[176] = jj_gen; + jj_la1[178] = jj_gen; ; } jj_consume_token(COMMA); @@ -4150,7 +4224,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[177] = jj_gen; + jj_la1[179] = jj_gen; break label_123; } jj_consume_token(S); @@ -4165,7 +4239,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[178] = jj_gen; + jj_la1[180] = jj_gen; break label_124; } jj_consume_token(S); @@ -4178,14 +4252,14 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[179] = jj_gen; + jj_la1[181] = jj_gen; break label_125; } jj_consume_token(S); } break; default: - jj_la1[180] = jj_gen; + jj_la1[182] = jj_gen; ; } jj_consume_token(RPARAN); @@ -4210,7 +4284,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[181] = jj_gen; + jj_la1[183] = jj_gen; break label_126; } jj_consume_token(S); @@ -4222,7 +4296,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[182] = jj_gen; + jj_la1[184] = jj_gen; break label_127; } jj_consume_token(S); @@ -4234,7 +4308,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[183] = jj_gen; + jj_la1[185] = jj_gen; break label_128; } jj_consume_token(S); @@ -4245,7 +4319,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { jj_consume_token(RPARAN); break; default: - jj_la1[184] = jj_gen; + jj_la1[186] = jj_gen; ; } jj_consume_token(COMMA); @@ -4255,7 +4329,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[185] = jj_gen; + jj_la1[187] = jj_gen; break label_129; } jj_consume_token(S); @@ -4270,7 +4344,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[186] = jj_gen; + jj_la1[188] = jj_gen; break label_130; } jj_consume_token(S); @@ -4283,14 +4357,14 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[187] = jj_gen; + jj_la1[189] = jj_gen; break label_131; } jj_consume_token(S); } break; default: - jj_la1[188] = jj_gen; + jj_la1[190] = jj_gen; ; } jj_consume_token(RPARAN); @@ -4317,7 +4391,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[189] = jj_gen; + jj_la1[191] = jj_gen; break label_132; } jj_consume_token(S); @@ -4329,14 +4403,14 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[190] = jj_gen; + jj_la1[192] = jj_gen; break label_133; } jj_consume_token(S); } break; default: - jj_la1[191] = jj_gen; + jj_la1[193] = jj_gen; ; } jj_consume_token(CONTAINS); @@ -4346,7 +4420,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[192] = jj_gen; + jj_la1[194] = jj_gen; break label_134; } jj_consume_token(S); @@ -4357,7 +4431,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { jj_consume_token(RPARAN); break; default: - jj_la1[193] = jj_gen; + jj_la1[195] = jj_gen; ; } jj_consume_token(COMMA); @@ -4367,7 +4441,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[194] = jj_gen; + jj_la1[196] = jj_gen; break label_135; } jj_consume_token(S); @@ -4382,7 +4456,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[195] = jj_gen; + jj_la1[197] = jj_gen; break label_136; } jj_consume_token(S); @@ -4395,14 +4469,14 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[196] = jj_gen; + jj_la1[198] = jj_gen; break label_137; } jj_consume_token(S); } break; default: - jj_la1[197] = jj_gen; + jj_la1[199] = jj_gen; ; } jj_consume_token(RPARAN); @@ -4504,7 +4578,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { warnDirective(); break; default: - jj_la1[198] = jj_gen; + jj_la1[200] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -4522,7 +4596,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[199] = jj_gen; + jj_la1[201] = jj_gen; break label_138; } jj_consume_token(S); @@ -4541,7 +4615,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[200] = jj_gen; + jj_la1[202] = jj_gen; break label_139; } jj_consume_token(S); @@ -4568,7 +4642,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { exclusive = false; break; default: - jj_la1[201] = jj_gen; + jj_la1[203] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -4579,7 +4653,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[202] = jj_gen; + jj_la1[204] = jj_gen; break label_140; } jj_consume_token(S); @@ -4616,7 +4690,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[203] = jj_gen; + jj_la1[205] = jj_gen; break label_141; } jj_consume_token(S); @@ -4630,7 +4704,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[204] = jj_gen; + jj_la1[206] = jj_gen; break label_143; } jj_consume_token(S); @@ -4640,7 +4714,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[205] = jj_gen; + jj_la1[207] = jj_gen; break label_142; } } @@ -4655,7 +4729,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[206] = jj_gen; + jj_la1[208] = jj_gen; break label_144; } jj_consume_token(S); @@ -4668,7 +4742,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[207] = jj_gen; + jj_la1[209] = jj_gen; break label_146; } jj_consume_token(S); @@ -4678,7 +4752,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[208] = jj_gen; + jj_la1[210] = jj_gen; break label_145; } } @@ -4712,7 +4786,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[209] = jj_gen; + jj_la1[211] = jj_gen; break label_147; } jj_consume_token(S); @@ -4724,7 +4798,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[210] = jj_gen; + jj_la1[212] = jj_gen; break label_148; } jj_consume_token(S); @@ -4736,7 +4810,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { declaration(); break; default: - jj_la1[211] = jj_gen; + jj_la1[213] = jj_gen; ; } label_149: while (true) { @@ -4745,7 +4819,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[212] = jj_gen; + jj_la1[214] = jj_gen; break label_149; } jj_consume_token(SEMICOLON); @@ -4755,7 +4829,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[213] = jj_gen; + jj_la1[215] = jj_gen; break label_150; } jj_consume_token(S); @@ -4766,7 +4840,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { declaration(); break; default: - jj_la1[214] = jj_gen; + jj_la1[216] = jj_gen; ; } } @@ -4778,7 +4852,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[215] = jj_gen; + jj_la1[217] = jj_gen; break label_151; } jj_consume_token(S); @@ -4798,7 +4872,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { debuggingDirective(); break; default: - jj_la1[216] = jj_gen; + jj_la1[218] = jj_gen; if (jj_2_6(2147483647)) { styleRule(); } else if (jj_2_7(3)) { @@ -4819,7 +4893,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { styleRule(); break; default: - jj_la1[217] = jj_gen; + jj_la1[219] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -4870,7 +4944,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[218] = jj_gen; + jj_la1[220] = jj_gen; break label_152; } jj_consume_token(S); @@ -4915,7 +4989,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { important = prio(); break; default: - jj_la1[219] = jj_gen; + jj_la1[221] = jj_gen; ; } Token next = getToken(1); @@ -4943,7 +5017,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[220] = jj_gen; + jj_la1[222] = jj_gen; break label_153; } jj_consume_token(S); @@ -4955,7 +5029,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { declaration(); break; default: - jj_la1[221] = jj_gen; + jj_la1[223] = jj_gen; ; } label_154: while (true) { @@ -4964,7 +5038,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[222] = jj_gen; + jj_la1[224] = jj_gen; break label_154; } jj_consume_token(SEMICOLON); @@ -4974,7 +5048,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[223] = jj_gen; + jj_la1[225] = jj_gen; break label_155; } jj_consume_token(S); @@ -4985,7 +5059,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { declaration(); break; default: - jj_la1[224] = jj_gen; + jj_la1[226] = jj_gen; ; } } @@ -4996,7 +5070,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[225] = jj_gen; + jj_la1[227] = jj_gen; break label_156; } jj_consume_token(S); @@ -5004,7 +5078,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { documentHandler.endNestedProperties(name); break; default: - jj_la1[226] = jj_gen; + jj_la1[228] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -5058,7 +5132,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[227] = jj_gen; + jj_la1[229] = jj_gen; break label_157; } jj_consume_token(S); @@ -5069,7 +5143,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { important = prio(); break; default: - jj_la1[228] = jj_gen; + jj_la1[230] = jj_gen; ; } documentHandler.property(name, exp, important); @@ -5116,7 +5190,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[229] = jj_gen; + jj_la1[231] = jj_gen; break label_158; } jj_consume_token(S); @@ -5137,7 +5211,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[230] = jj_gen; + jj_la1[232] = jj_gen; break label_159; } jj_consume_token(S); @@ -5176,7 +5250,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[231] = jj_gen; + jj_la1[233] = jj_gen; break label_160; } jj_consume_token(S); @@ -5196,7 +5270,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[232] = jj_gen; + jj_la1[234] = jj_gen; break label_161; } jj_consume_token(S); @@ -5216,7 +5290,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[233] = jj_gen; + jj_la1[235] = jj_gen; break label_162; } jj_consume_token(S); @@ -5236,7 +5310,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[234] = jj_gen; + jj_la1[236] = jj_gen; break label_163; } jj_consume_token(S); @@ -5257,7 +5331,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[235] = jj_gen; + jj_la1[237] = jj_gen; break label_164; } } @@ -5277,7 +5351,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[236] = jj_gen; + jj_la1[238] = jj_gen; break label_165; } } @@ -5289,7 +5363,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { } break; default: - jj_la1[237] = jj_gen; + jj_la1[239] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -5349,7 +5423,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { } break; default: - jj_la1[238] = jj_gen; + jj_la1[240] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -5404,7 +5478,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { result = variableTerm(prev); break; default: - jj_la1[239] = jj_gen; + jj_la1[241] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -5468,7 +5542,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { op = unaryOperator(); break; default: - jj_la1[240] = jj_gen; + jj_la1[242] = jj_gen; ; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { @@ -5588,7 +5662,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { result = function(op, prev); break; default: - jj_la1[241] = jj_gen; + jj_la1[243] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -5620,7 +5694,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { s += "."; break; default: - jj_la1[242] = jj_gen; + jj_la1[244] = jj_gen; ; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { @@ -5637,7 +5711,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { n = jj_consume_token(FROM); break; default: - jj_la1[243] = jj_gen; + jj_la1[245] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -5675,13 +5749,13 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { result = unicode(prev); break; default: - jj_la1[244] = jj_gen; + jj_la1[246] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: - jj_la1[245] = jj_gen; + jj_la1[247] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -5691,7 +5765,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[246] = jj_gen; + jj_la1[248] = jj_gen; break label_167; } jj_consume_token(S); @@ -5721,7 +5795,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[247] = jj_gen; + jj_la1[249] = jj_gen; break label_168; } jj_consume_token(S); @@ -5781,7 +5855,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { params = expr(); break; default: - jj_la1[248] = jj_gen; + jj_la1[250] = jj_gen; ; } jj_consume_token(RPARAN); @@ -6330,7 +6404,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[249] = jj_gen; + jj_la1[251] = jj_gen; break label_169; } jj_consume_token(S); @@ -6366,7 +6440,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { fontFace(); break; default: - jj_la1[250] = jj_gen; + jj_la1[252] = jj_gen; ret = skipStatement(); if ((ret == null) || (ret.length() == 0)) { { @@ -6395,7 +6469,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[251] = jj_gen; + jj_la1[253] = jj_gen; break label_170; } jj_consume_token(S); @@ -6410,7 +6484,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[252] = jj_gen; + jj_la1[254] = jj_gen; break label_171; } jj_consume_token(S); @@ -6425,7 +6499,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[253] = jj_gen; + jj_la1[255] = jj_gen; break label_172; } jj_consume_token(S); @@ -6436,7 +6510,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { declaration(); break; default: - jj_la1[254] = jj_gen; + jj_la1[256] = jj_gen; ; } label_173: while (true) { @@ -6445,7 +6519,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[255] = jj_gen; + jj_la1[257] = jj_gen; break label_173; } jj_consume_token(SEMICOLON); @@ -6455,7 +6529,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[256] = jj_gen; + jj_la1[258] = jj_gen; break label_174; } jj_consume_token(S); @@ -6466,7 +6540,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { declaration(); break; default: - jj_la1[257] = jj_gen; + jj_la1[259] = jj_gen; ; } } @@ -6481,7 +6555,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { ; break; default: - jj_la1[258] = jj_gen; + jj_la1[260] = jj_gen; break label_175; } jj_consume_token(S); @@ -8264,7 +8338,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { private Token jj_scanpos, jj_lastpos; private int jj_la; private int jj_gen; - final private int[] jj_la1 = new int[259]; + final private int[] jj_la1 = new int[261]; static private int[] jj_la1_0; static private int[] jj_la1_1; static private int[] jj_la1_2; @@ -8290,22 +8364,23 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { 0x84000000, 0x84000000, 0xd4000000, 0x0, 0x0, 0x0, 0x0, 0x50000000, 0x2, 0x2, 0x3f000, 0x2, 0x0, 0x2, 0x3f000, 0x0, 0x2, 0x0, 0x2, 0x0, 0x2, 0x200000, 0x0, 0xd4c40000, 0x0, - 0x134e0002, 0x2, 0xd4c40000, 0x2, 0x0, 0x2, 0x134e0002, 0x0, - 0x2, 0xd4c40000, 0x2, 0x134e0002, 0x2, 0x2, 0x2, 0x0, 0x2, - 0xd4c40000, 0x2, 0x2, 0x100000, 0x2, 0x2, 0x2, 0x2, 0x0, 0x2, - 0xd4c40000, 0xd4c40000, 0x2, 0x100000, 0x2, 0x2, 0x2, 0x100000, - 0x0, 0x0, 0x800c0000, 0x2, 0x0, 0x100000, 0x2, 0x800c0000, 0x2, - 0x0, 0x2, 0x0, 0x2, 0x2, 0x200000, 0x2, 0xd4c40000, 0x2, - 0x200400, 0x2, 0x2, 0x0, 0x2, 0x0, 0x2, 0x2, 0x2, 0x100000, - 0x2, 0x2, 0x2, 0x2, 0x2, 0x0, 0x2, 0x2, 0x2, 0x100000, 0x2, - 0x2, 0x2, 0x0, 0x2, 0x2, 0x2, 0x100000, 0x2, 0x2, 0x0, 0x2, - 0x0, 0x2, 0x2, 0x2, 0x100000, 0x0, 0x2, 0x2, 0x0, 0x2, 0x2, - 0x2, 0x200000, 0x2, 0x2, 0x200000, 0x2, 0x2, 0x0, 0x200000, - 0x2, 0x0, 0x2, 0x0, 0xd4c40000, 0x2, 0x0, 0x2, 0x0, 0x200000, - 0x2, 0x0, 0x2, 0x800c0400, 0x2, 0x0, 0x2, 0x2, 0x2, 0x2, 0x2, - 0x2, 0x2, 0x2, 0x321c0000, 0xc0000, 0x800c0000, 0xc0000, 0x0, - 0x80000000, 0x0, 0x80000000, 0x800c0000, 0x2, 0x2, 0x800c0000, - 0x2, 0xd4c40000, 0x2, 0x2, 0x2, 0x0, 0x200000, 0x2, 0x0, 0x2, }; + 0x134e0002, 0x2, 0xd4c40000, 0xd4c40000, 0x2, 0x0, 0x2, + 0x134e0002, 0x0, 0x2, 0xd4c40000, 0xd4c40000, 0x2, 0x134e0002, + 0x2, 0x2, 0x2, 0x0, 0x2, 0xd4c40000, 0x2, 0x2, 0x100000, 0x2, + 0x2, 0x2, 0x2, 0x0, 0x2, 0xd4c40000, 0xd4c40000, 0x2, 0x100000, + 0x2, 0x2, 0x2, 0x100000, 0x0, 0x0, 0x800c0000, 0x2, 0x0, + 0x100000, 0x2, 0x800c0000, 0x2, 0x0, 0x2, 0x0, 0x2, 0x2, + 0x200000, 0x2, 0xd4c40000, 0x2, 0x200400, 0x2, 0x2, 0x0, 0x2, + 0x0, 0x2, 0x2, 0x2, 0x100000, 0x2, 0x2, 0x2, 0x2, 0x2, 0x0, + 0x2, 0x2, 0x2, 0x100000, 0x2, 0x2, 0x2, 0x0, 0x2, 0x2, 0x2, + 0x100000, 0x2, 0x2, 0x0, 0x2, 0x0, 0x2, 0x2, 0x2, 0x100000, + 0x0, 0x2, 0x2, 0x0, 0x2, 0x2, 0x2, 0x200000, 0x2, 0x2, + 0x200000, 0x2, 0x2, 0x0, 0x200000, 0x2, 0x0, 0x2, 0x0, + 0xd4c40000, 0x2, 0x0, 0x2, 0x0, 0x200000, 0x2, 0x0, 0x2, + 0x800c0400, 0x2, 0x0, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, + 0x321c0000, 0xc0000, 0x800c0000, 0xc0000, 0x0, 0x80000000, 0x0, + 0x80000000, 0x800c0000, 0x2, 0x2, 0x800c0000, 0x2, 0xd4c40000, + 0x2, 0x2, 0x2, 0x0, 0x200000, 0x2, 0x0, 0x2, }; } private static void jj_la1_init_1() { @@ -8320,21 +8395,21 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x50000000, 0x64000c0, 0x50000000, 0x3f, - 0x0, 0x564000c0, 0x0, 0x80000000, 0x0, 0x3f, 0x0, 0x0, - 0x564000c0, 0x0, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x564000c0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0, 0x564000c0, - 0x564000c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0x40, 0x160040, - 0x0, 0x40, 0x0, 0x0, 0x160040, 0x0, 0x40, 0x0, 0x80, 0x0, 0x0, - 0x0, 0x0, 0x60000c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x6000000, 0x0, 0x0, 0x60000, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, - 0x80, 0x0, 0x6000000, 0xc0, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, - 0x80, 0x0, 0x160000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x160000, 0x0, 0x0, 0x0, 0x160000, - 0x160000, 0x160000, 0x0, 0x0, 0x160000, 0x0, 0x60000c0, 0x0, - 0x0, 0x0, 0x80, 0x0, 0x0, 0x80, 0x0, }; + 0x0, 0x564000c0, 0x564000c0, 0x0, 0x80000000, 0x0, 0x3f, 0x0, + 0x0, 0x564000c0, 0x564000c0, 0x0, 0x3f, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x564000c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0, + 0x564000c0, 0x564000c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, + 0x40, 0x160040, 0x0, 0x40, 0x0, 0x0, 0x160040, 0x0, 0x40, 0x0, + 0x80, 0x0, 0x0, 0x0, 0x0, 0x60000c0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x6000000, 0x0, + 0x0, 0x60000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x80, 0x0, 0x0, 0x80, 0x0, 0x6000000, 0xc0, 0x0, 0x0, 0x0, + 0x80, 0x0, 0x0, 0x80, 0x0, 0x160000, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x160000, 0x0, 0x0, 0x0, + 0x160000, 0x160000, 0x160000, 0x0, 0x0, 0x160000, 0x0, + 0x60000c0, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x80, 0x0, }; } private static void jj_la1_init_2() { @@ -8348,48 +8423,48 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { 0x0, 0x100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x0, 0x0, 0x0, 0x0, 0x180, 0x0, 0x0, 0x0, 0x0, 0x100, 0x0, 0x40, 0x0, 0x0, - 0x0, 0x109, 0x1000, 0x1300, 0x0, 0x1109, 0x0, 0x0, 0x0, 0x1300, - 0x20, 0x0, 0x1109, 0x0, 0x1300, 0x0, 0x0, 0x0, 0x1100, 0x0, - 0x1109, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x100, 0x0, 0x1109, - 0x1109, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1000, 0x1000, - 0xfffffb80, 0x0, 0x0, 0x0, 0x0, 0xfffffb80, 0x0, 0x0, 0x0, - 0x1100, 0x0, 0x0, 0x0, 0x0, 0x100, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x109, 0x1000, 0x1300, 0x0, 0x1109, 0x1109, 0x0, 0x0, 0x0, + 0x1300, 0x20, 0x0, 0x1109, 0x1109, 0x0, 0x1300, 0x0, 0x0, 0x0, + 0x1100, 0x0, 0x1109, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x100, + 0x0, 0x1109, 0x1109, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1000, + 0x1000, 0xfffffb80, 0x0, 0x0, 0x0, 0x0, 0xfffffb80, 0x0, 0x0, + 0x0, 0x1100, 0x0, 0x0, 0x0, 0x0, 0x100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x1000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x100, 0x0, - 0x0, 0x100, 0x0, 0x0, 0x100, 0x0, 0x0, 0x0, 0x100, 0x0, 0x0, - 0x100, 0x0, 0xfffffb80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0xfffffb80, 0x0, 0xffffe200, 0x0, 0x100, - 0x980, 0xffffeb80, 0x0, 0x0, 0xfffffb80, 0x0, 0x100, 0x0, 0x0, - 0x0, 0x100, 0x0, 0x0, 0x100, 0x0, }; + 0x0, 0x0, 0x0, 0x1000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x100, + 0x0, 0x0, 0x100, 0x0, 0x0, 0x100, 0x0, 0x0, 0x0, 0x100, 0x0, + 0x0, 0x100, 0x0, 0xfffffb80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xfffffb80, 0x0, 0xffffe200, 0x0, + 0x100, 0x980, 0xffffeb80, 0x0, 0x0, 0xfffffb80, 0x0, 0x100, + 0x0, 0x0, 0x0, 0x100, 0x0, 0x0, 0x100, 0x0, }; } private static void jj_la1_init_3() { jj_la1_3 = new int[] { 0x8, 0x80, 0x80, 0x2, 0x80, 0x0, 0x0, 0x0, 0x75, 0x0, 0x80, 0x0, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x45, 0x45, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc5, 0xc5, 0x0, 0x0, 0x0, 0xc401bf, 0xc401bf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc401be, 0x0, 0x0, 0x0, 0x0, 0x0, 0x400000, 0x400000, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x47, 0x47, 0x0, 0x0, 0x0, 0x1, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc7, 0xc7, 0x0, 0x0, 0x0, 0x1, 0x0, 0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x400000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x45, 0x0, - 0x200000, 0x0, 0x45, 0x0, 0x0, 0x0, 0x200000, 0x0, 0x0, 0x45, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x400000, 0x0, 0x75, 0x75, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x440001, 0x0, 0x0, 0x0, 0x0, 0x440001, - 0x0, 0x0, 0x0, 0x400000, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, - 0x0, 0x0, 0x380000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x400000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x45, 0x80, + 0x200000, 0x0, 0xe5, 0xe5, 0x0, 0x0, 0x0, 0x200000, 0x0, 0x0, + 0xe5, 0xe5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc5, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x400000, 0x0, 0xd5, 0xd5, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x440001, 0x0, 0x0, 0x0, 0x0, + 0x440001, 0x0, 0x0, 0x0, 0x400000, 0x0, 0x0, 0x0, 0x0, 0x1, + 0x0, 0x0, 0x0, 0x0, 0x380000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x100, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x440001, 0x0, 0x100, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x440001, 0x0, 0x400000, - 0x0, 0x0, 0x40001, 0x440001, 0x0, 0x0, 0x440001, 0x0, 0x37, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, }; + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, + 0x100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x440001, 0x0, 0x100, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x440001, 0x0, + 0x400000, 0x0, 0x0, 0x40001, 0x440001, 0x0, 0x0, 0x440001, 0x0, + 0x37, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, }; } final private JJCalls[] jj_2_rtns = new JJCalls[9]; @@ -8402,7 +8477,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 259; i++) { + for (int i = 0; i < 261; i++) { jj_la1[i] = -1; } for (int i = 0; i < jj_2_rtns.length; i++) { @@ -8416,7 +8491,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 259; i++) { + for (int i = 0; i < 261; i++) { jj_la1[i] = -1; } for (int i = 0; i < jj_2_rtns.length; i++) { @@ -8430,7 +8505,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 259; i++) { + for (int i = 0; i < 261; i++) { jj_la1[i] = -1; } for (int i = 0; i < jj_2_rtns.length; i++) { @@ -8444,7 +8519,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 259; i++) { + for (int i = 0; i < 261; i++) { jj_la1[i] = -1; } for (int i = 0; i < jj_2_rtns.length; i++) { @@ -8595,7 +8670,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { la1tokens[jj_kind] = true; jj_kind = -1; } - for (int i = 0; i < 259; i++) { + for (int i = 0; i < 261; i++) { if (jj_la1[i] == jj_gen) { for (int j = 0; j < 32; j++) { if ((jj_la1_0[i] & (1 << j)) != 0) { diff --git a/theme-compiler/src/com/vaadin/sass/internal/parser/Parser.jj b/theme-compiler/src/com/vaadin/sass/internal/parser/Parser.jj index 406030f7c9..26707b4955 100644 --- a/theme-compiler/src/com/vaadin/sass/internal/parser/Parser.jj +++ b/theme-compiler/src/com/vaadin/sass/internal/parser/Parser.jj @@ -1526,8 +1526,8 @@ void controlDirective() : void ifContentStatement() : {} { - contentDirective() | includeDirective() | media() | extendDirective() | styleRuleOrDeclarationOrNestedProperties() - | keyframes() | LOOKAHEAD(variable()) variable() | listModifyDirective() | controlDirective() + contentDirective() | includeDirective() | media() | extendDirective() | styleRuleOrDeclarationOrNestedProperties() + | keyframes() | LOOKAHEAD(variable()) variable() | listModifyDirective() | controlDirective() | atRuleDeclaration() } void ifDirective() : @@ -1543,7 +1543,7 @@ void ifDirective() : { documentHandler.startIfElseDirective(); documentHandler.ifDirective(evaluator); } - ( ifContentStatement() )* + ( ifContentStatement() | fontFace() )* < RBRACE >(< S >)* (elseDirective())* { documentHandler.endIfElseDirective(); } @@ -1562,7 +1562,7 @@ void elseDirective() : { if(!evaluator.trim().equals("")){ documentHandler.ifDirective(evaluator); } else{ documentHandler.elseDirective(); } } - ( ifContentStatement() )* + ( ifContentStatement() | fontFace() )* < RBRACE >(< S >)* } diff --git a/theme-compiler/tests/resources/automatic/css/at-directive-in-if.css b/theme-compiler/tests/resources/automatic/css/at-directive-in-if.css new file mode 100644 index 0000000000..80d4821ead --- /dev/null +++ b/theme-compiler/tests/resources/automatic/css/at-directive-in-if.css @@ -0,0 +1 @@ +@font-face {} \ No newline at end of file diff --git a/theme-compiler/tests/resources/automatic/scss/at-directive-in-if.scss b/theme-compiler/tests/resources/automatic/scss/at-directive-in-if.scss new file mode 100644 index 0000000000..30556fb382 --- /dev/null +++ b/theme-compiler/tests/resources/automatic/scss/at-directive-in-if.scss @@ -0,0 +1,8 @@ +@mixin test($italic: true) { + @if $italic { + @font-face { + } + } +} + +@include test; \ No newline at end of file -- 2.39.5