summaryrefslogtreecommitdiffstats
path: root/theme-compiler
diff options
context:
space:
mode:
Diffstat (limited to 'theme-compiler')
-rw-r--r--theme-compiler/src/com/vaadin/sass/internal/parser/Parser.java19
-rw-r--r--theme-compiler/src/com/vaadin/sass/internal/parser/Parser.jj4
2 files changed, 14 insertions, 9 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 928c889956..3863a30379 100644
--- a/theme-compiler/src/com/vaadin/sass/internal/parser/Parser.java
+++ b/theme-compiler/src/com/vaadin/sass/internal/parser/Parser.java
@@ -152,6 +152,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
@@ -314,10 +315,12 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants {
String encoding = source.getEncoding();
InputStream input = source.getByteStream();
if (!input.markSupported()) {
+ // If mark is not supported, wrap it in a stream which supports mark
input = new BufferedInputStream(input);
source.setByteStream(input);
- input.mark(100);
}
+ // Mark either the original stream or the wrapped stream
+ input.mark(100);
if (encoding == null) {
encoding = "ASCII";
@@ -6436,6 +6439,13 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants {
return false;
}
+ private boolean jj_3R_252() {
+ if (jj_scan_token(HASH)) {
+ return true;
+ }
+ return false;
+ }
+
private boolean jj_3R_184() {
if (jj_scan_token(SEMICOLON)) {
return true;
@@ -6451,13 +6461,6 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants {
return false;
}
- private boolean jj_3R_252() {
- if (jj_scan_token(HASH)) {
- return true;
- }
- return false;
- }
-
private boolean jj_3R_239() {
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 a0bd883101..1f9221de88 100644
--- a/theme-compiler/src/com/vaadin/sass/internal/parser/Parser.jj
+++ b/theme-compiler/src/com/vaadin/sass/internal/parser/Parser.jj
@@ -319,10 +319,12 @@ public class Parser implements org.w3c.css.sac.Parser {
String encoding = source.getEncoding();
InputStream input = source.getByteStream();
if (!input.markSupported()) {
+ // If mark is not supported, wrap it in a stream which supports mark
input = new BufferedInputStream(input);
source.setByteStream(input);
- input.mark(100);
}
+ // Mark either the original stream or the wrapped stream
+ input.mark(100);
if(encoding == null){
encoding = "ASCII";