diff options
author | joheriks <joheriks@vaadin.com> | 2013-10-28 14:28:57 +0200 |
---|---|---|
committer | joheriks <joheriks@vaadin.com> | 2013-10-28 15:05:37 +0200 |
commit | 9d84c091714f01e0088fab2202c10b505e78a607 (patch) | |
tree | 318bd5b49815b2a71734cb703b641de9eb6c5b83 /theme-compiler/src | |
parent | 049b9d99ff887e9408e23cbd169431140dd0afa9 (diff) | |
download | vaadin-framework-9d84c091714f01e0088fab2202c10b505e78a607.tar.gz vaadin-framework-9d84c091714f01e0088fab2202c10b505e78a607.zip |
Parser stripped minus of negative numbers with unknown units (#12811)
Change-Id: I8964b1732f867cb3c5aa5859d12e94a5978adece
Diffstat (limited to 'theme-compiler/src')
-rwxr-xr-x | theme-compiler/src/com/vaadin/sass/internal/parser/Parser.java | 148 | ||||
-rw-r--r-- | theme-compiler/src/com/vaadin/sass/internal/parser/Parser.jj | 3 |
2 files changed, 79 insertions, 72 deletions
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 d7662d35a8..6989490648 100755 --- a/theme-compiler/src/com/vaadin/sass/internal/parser/Parser.java +++ b/theme-compiler/src/com/vaadin/sass/internal/parser/Parser.java @@ -159,6 +159,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { /** * This method parses only one rule (style rule or at-rule, except + * * @charset). * * @param source @@ -5574,9 +5575,14 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { && (Character.isDigit(s.charAt(i)) || (s.charAt(i) == '.'))) { i++; } + /* + * result = LexicalUnitImpl.createDimen(n.beginLine, + * n.beginColumn, prev, Float.valueOf(s.substring(0, + * i)).floatValue(), s.substring(i)); + */ result = LexicalUnitImpl.createDimen(n.beginLine, - n.beginColumn, prev, Float.valueOf(s.substring(0, i)) - .floatValue(), s.substring(i)); + n.beginColumn, prev, number(op, n, s.length() - i), + s.substring(i)); break; case FUNCTION: result = function(op, prev); @@ -7110,15 +7116,15 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { return false; } - private boolean jj_3R_299() { - if (jj_scan_token(INTERPOLATION)) { + private boolean jj_3R_266() { + if (jj_3R_187()) { return true; } return false; } - private boolean jj_3R_266() { - if (jj_3R_187()) { + private boolean jj_3R_299() { + if (jj_scan_token(INTERPOLATION)) { return true; } return false; @@ -7138,6 +7144,28 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { return false; } + private boolean jj_3R_256() { + if (jj_scan_token(FUNCTION)) { + return true; + } + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { + jj_scanpos = xsp; + break; + } + } + xsp = jj_scanpos; + if (jj_3R_266()) { + jj_scanpos = xsp; + } + if (jj_scan_token(RPARAN)) { + return true; + } + return false; + } + private boolean jj_3R_263() { Token xsp; xsp = jj_scanpos; @@ -7187,8 +7215,8 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { return false; } - private boolean jj_3R_256() { - if (jj_scan_token(FUNCTION)) { + private boolean jj_3R_180() { + if (jj_scan_token(COMMA)) { return true; } Token xsp; @@ -7199,47 +7227,32 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { break; } } - xsp = jj_scanpos; - if (jj_3R_266()) { - jj_scanpos = xsp; - } - if (jj_scan_token(RPARAN)) { - return true; - } return false; } - private boolean jj_3R_180() { - if (jj_scan_token(COMMA)) { + private boolean jj_3R_247() { + if (jj_3R_260()) { return true; } - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { - jj_scanpos = xsp; - break; - } - } return false; } - private boolean jj_3R_247() { - if (jj_3R_260()) { + private boolean jj_3R_246() { + if (jj_3R_259()) { return true; } return false; } - private boolean jj_3R_298() { - if (jj_scan_token(IDENT)) { + private boolean jj_3R_245() { + if (jj_3R_258()) { return true; } return false; } - private boolean jj_3R_246() { - if (jj_3R_259()) { + private boolean jj_3R_298() { + if (jj_scan_token(IDENT)) { return true; } return false; @@ -7257,13 +7270,6 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { return false; } - private boolean jj_3R_245() { - if (jj_3R_258()) { - return true; - } - return false; - } - private boolean jj_3R_297() { if (jj_3R_219()) { return true; @@ -7525,21 +7531,6 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { return false; } - private boolean jj_3R_196() { - if (jj_3R_220()) { - return true; - } - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_273()) { - jj_scanpos = xsp; - break; - } - } - return false; - } - private boolean jj_3R_199() { Token xsp; xsp = jj_scanpos; @@ -7561,6 +7552,21 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { return false; } + private boolean jj_3R_196() { + if (jj_3R_220()) { + return true; + } + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_273()) { + jj_scanpos = xsp; + break; + } + } + return false; + } + private boolean jj_3R_195() { if (jj_3R_219()) { return true; @@ -7899,6 +7905,13 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { return false; } + private boolean jj_3R_258() { + if (jj_scan_token(HASH)) { + return true; + } + return false; + } + private boolean jj_3_1() { if (jj_3R_176()) { return true; @@ -8013,13 +8026,6 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { return false; } - private boolean jj_3R_258() { - if (jj_scan_token(HASH)) { - return true; - } - return false; - } - private boolean jj_3_4() { if (jj_3R_179()) { return true; @@ -8027,15 +8033,15 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { return false; } - private boolean jj_3R_251() { - if (jj_3R_186()) { + private boolean jj_3R_259() { + if (jj_scan_token(URL)) { return true; } return false; } - private boolean jj_3R_259() { - if (jj_scan_token(URL)) { + private boolean jj_3R_251() { + if (jj_3R_186()) { return true; } return false; @@ -8088,6 +8094,13 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { return false; } + private boolean jj_3R_260() { + if (jj_scan_token(UNICODERANGE)) { + return true; + } + return false; + } + private boolean jj_3R_255() { Token xsp; xsp = jj_scanpos; @@ -8107,13 +8120,6 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { return false; } - private boolean jj_3R_260() { - if (jj_scan_token(UNICODERANGE)) { - return true; - } - return false; - } - private boolean jj_3_8() { Token xsp; xsp = jj_scanpos; 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 871be2c4d0..406030f7c9 100644 --- a/theme-compiler/src/com/vaadin/sass/internal/parser/Parser.jj +++ b/theme-compiler/src/com/vaadin/sass/internal/parser/Parser.jj @@ -2382,8 +2382,9 @@ LexicalUnitImpl nonVariableTerm(LexicalUnitImpl prev) :
{
LexicalUnitImpl result && (Character.isDigit(s.charAt(i)) || (s.charAt(i) == '.'))) { i++; } + result = LexicalUnitImpl.createDimen(n.beginLine, n.beginColumn, prev, - Float.valueOf(s.substring(0, i)).floatValue(), + number(op,n,s.length()-i), s.substring(i)); } | result=function(op, prev) ) ) |