소스 검색

Fixes for sass compiler, handling mixins (#11288).

Keyframe selectors can now be comma-separated lists, interpolation
unquotes a quoted string and the parameters of an @include are no longer
lost.

Change-Id: I2622aca7471adc8004371affbb803d850e801307
tags/7.1.9
Mika Murtojarvi 10 년 전
부모
커밋
a3aa6cc93e

+ 3
- 2
theme-compiler/src/com/vaadin/sass/internal/handler/SCSSDocumentHandler.java 파일 보기

@@ -18,6 +18,7 @@ package com.vaadin.sass.internal.handler;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import org.w3c.css.sac.CSSException;
import org.w3c.css.sac.DocumentHandler;
@@ -50,7 +51,7 @@ public interface SCSSDocumentHandler extends DocumentHandler {

void endNestedProperties(String name);

void includeDirective(String name, Collection<LexicalUnitImpl> args);
void includeDirective(String name, List<LexicalUnitImpl> args);

void importStyle(String uri, SACMediaList media, boolean isURL);

@@ -98,7 +99,7 @@ public interface SCSSDocumentHandler extends DocumentHandler {

void contentDirective();

void startIncludeContentBlock(String name);
void startIncludeContentBlock(String name, List<LexicalUnitImpl> args);

void endIncludeContentBlock();


+ 4
- 3
theme-compiler/src/com/vaadin/sass/internal/handler/SCSSDocumentHandlerImpl.java 파일 보기

@@ -18,6 +18,7 @@ package com.vaadin.sass.internal.handler;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Stack;

import org.w3c.css.sac.CSSException;
@@ -244,7 +245,7 @@ public class SCSSDocumentHandlerImpl implements SCSSDocumentHandler {
}

@Override
public void includeDirective(String name, Collection<LexicalUnitImpl> args) {
public void includeDirective(String name, List<LexicalUnitImpl> args) {
MixinNode node = new MixinNode(name, args);
nodeStack.peek().appendChild(node);
}
@@ -374,8 +375,8 @@ public class SCSSDocumentHandlerImpl implements SCSSDocumentHandler {
}

@Override
public void startIncludeContentBlock(String name) {
MixinNode node = new MixinNode(name);
public void startIncludeContentBlock(String name, List<LexicalUnitImpl> args) {
MixinNode node = new MixinNode(name, args);
nodeStack.peek().appendChild(node);
nodeStack.push(node);


+ 13
- 0
theme-compiler/src/com/vaadin/sass/internal/parser/LexicalUnitImpl.java 파일 보기

@@ -377,6 +377,19 @@ public class LexicalUnitImpl implements LexicalUnit, SCSSLexicalUnit,
}
}

// A helper method for sass interpolation
public String unquotedString() {
String result = toString();
if (result.length() >= 2
&& ((result.charAt(0) == '"' && result
.charAt(result.length() - 1) == '"') || (result
.charAt(0) == '\'' && result
.charAt(result.length() - 1) == '\''))) {
result = result.substring(1, result.length() - 1);
}
return result;
}

@Override
public LexicalUnitImpl divide(LexicalUnitImpl denominator) {
if (denominator.getLexicalUnitType() != SAC_INTEGER

+ 7430
- 8223
theme-compiler/src/com/vaadin/sass/internal/parser/Parser.java
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 9
- 7
theme-compiler/src/com/vaadin/sass/internal/parser/Parser.jj 파일 보기

@@ -848,7 +848,7 @@ void keyframes() :
n=<KEY_FRAME_SYM> ( <S> )* {keyframeName = n.image;}
(n = <IDENT>{animationname += n.image; }|n = < INTERPOLATION >{ animationname += n.image; })+(<S>)*
{start = true; documentHandler.startKeyFrames(keyframeName, animationname); }
<LBRACE> ( <S> )* ( keyframeSelector() )* <RBRACE> ( <S> )*
<LBRACE> ( <S> )* ( keyframeSelector() | contentDirective() )* <RBRACE> ( <S> )*
} catch (ParseException e) {
reportError(getLocator(), e);
skipStatement();
@@ -862,14 +862,17 @@ void keyframes() :
void keyframeSelector():
{
Token n;
String selector = "";
boolean start = false;
}
{
try{
(n = <FROM> | n = <TO> | n = <PERCENTAGE>) (<S>)* <LBRACE> (<S>)*
(n = <FROM> | n = <TO> | n = <PERCENTAGE>){selector += n.image;} (<S>)*
(<COMMA> (<S>)* (n = <FROM> | n = <TO> | n = <PERCENTAGE>) {selector += (", " + n.image);} (<S>)* )*
<LBRACE> (<S>)*
{
start = true;
documentHandler.startKeyframeSelector(n.image);
documentHandler.startKeyframeSelector(selector);
}
(ifContentStatement() | microsoftExtension() )*
<RBRACE> (<S>)*
@@ -1726,12 +1729,11 @@ void includeDirective() :
(<S>)*
(name = property()|name = variableName(){ name = "$"+name;}
|(name = functionName()
args = argValuelist()) <RPARAN>)
(<S>)*
args = argValuelist()) <RPARAN>(<S>)*)
((";"(<S>)*)+
{documentHandler.includeDirective(name, args);}
| <LBRACE> (<S>)* {documentHandler.startIncludeContentBlock(name);}
(styleRuleOrDeclarationOrNestedProperties())*
| <LBRACE> (<S>)* {documentHandler.startIncludeContentBlock(name, args);}
(styleRuleOrDeclarationOrNestedProperties() | keyframeSelector())*
<RBRACE> (<S>)* {documentHandler.endIncludeContentBlock();}
)
}

+ 366
- 267
theme-compiler/src/com/vaadin/sass/internal/parser/ParserConstants.java 파일 보기

@@ -16,278 +16,377 @@
/* Generated By:JavaCC: Do not edit this line. ParserConstants.java */
package com.vaadin.sass.internal.parser;


/**
* Token literal values and constants. Generated by
* org.javacc.parser.OtherFilesGen#start()
* Token literal values and constants.
* Generated by org.javacc.parser.OtherFilesGen#start()
*/
public interface ParserConstants {

/** End of File. */
int EOF = 0;
/** RegularExpression Id. */
int S = 1;
/** RegularExpression Id. */
int SINGLE_LINE_COMMENT = 2;
/** RegularExpression Id. */
int FORMAL_COMMENT = 5;
/** RegularExpression Id. */
int MULTI_LINE_COMMENT = 6;
/** RegularExpression Id. */
int CDO = 8;
/** RegularExpression Id. */
int CDC = 9;
/** RegularExpression Id. */
int LBRACE = 10;
/** RegularExpression Id. */
int RBRACE = 11;
/** RegularExpression Id. */
int DASHMATCH = 12;
/** RegularExpression Id. */
int CARETMATCH = 13;
/** RegularExpression Id. */
int DOLLARMATCH = 14;
/** RegularExpression Id. */
int STARMATCH = 15;
/** RegularExpression Id. */
int INCLUDES = 16;
/** RegularExpression Id. */
int EQ = 17;
/** RegularExpression Id. */
int PLUS = 18;
/** RegularExpression Id. */
int MINUS = 19;
/** RegularExpression Id. */
int COMMA = 20;
/** RegularExpression Id. */
int SEMICOLON = 21;
/** RegularExpression Id. */
int PRECEDES = 22;
/** RegularExpression Id. */
int SIBLING = 23;
/** RegularExpression Id. */
int SUCCEEDS = 24;
/** RegularExpression Id. */
int DIV = 25;
/** RegularExpression Id. */
int LBRACKET = 26;
/** RegularExpression Id. */
int RBRACKET = 27;
/** RegularExpression Id. */
int ANY = 28;
/** RegularExpression Id. */
int MOD = 29;
/** RegularExpression Id. */
int PARENT = 30;
/** RegularExpression Id. */
int DOT = 31;
/** RegularExpression Id. */
int LPARAN = 32;
/** RegularExpression Id. */
int RPARAN = 33;
/** RegularExpression Id. */
int COMPARE = 34;
/** RegularExpression Id. */
int OR = 35;
/** RegularExpression Id. */
int AND = 36;
/** RegularExpression Id. */
int NOT_EQ = 37;
/** RegularExpression Id. */
int COLON = 38;
/** RegularExpression Id. */
int INTERPOLATION = 39;
/** RegularExpression Id. */
int NONASCII = 40;
/** RegularExpression Id. */
int H = 41;
/** RegularExpression Id. */
int UNICODE = 42;
/** RegularExpression Id. */
int ESCAPE = 43;
/** RegularExpression Id. */
int NMSTART = 44;
/** RegularExpression Id. */
int NMCHAR = 45;
/** RegularExpression Id. */
int STRINGCHAR = 46;
/** RegularExpression Id. */
int D = 47;
/** RegularExpression Id. */
int NAME = 48;
/** RegularExpression Id. */
int TO = 49;
/** RegularExpression Id. */
int THROUGH = 50;
/** RegularExpression Id. */
int EACH_IN = 51;
/** RegularExpression Id. */
int FROM = 52;
/** RegularExpression Id. */
int MIXIN_SYM = 53;
/** RegularExpression Id. */
int INCLUDE_SYM = 54;
/** RegularExpression Id. */
int FUNCTION_SYM = 55;
/** RegularExpression Id. */
int RETURN_SYM = 56;
/** RegularExpression Id. */
int DEBUG_SYM = 57;
/** RegularExpression Id. */
int WARN_SYM = 58;
/** RegularExpression Id. */
int FOR_SYM = 59;
/** RegularExpression Id. */
int EACH_SYM = 60;
/** RegularExpression Id. */
int WHILE_SYM = 61;
/** RegularExpression Id. */
int IF_SYM = 62;
/** RegularExpression Id. */
int ELSE_SYM = 63;
/** RegularExpression Id. */
int EXTEND_SYM = 64;
/** RegularExpression Id. */
int MOZ_DOCUMENT_SYM = 65;
/** RegularExpression Id. */
int SUPPORTS_SYM = 66;
/** RegularExpression Id. */
int CONTENT_SYM = 67;
/** RegularExpression Id. */
int MICROSOFT_RULE = 68;
/** RegularExpression Id. */
int IF = 69;
/** RegularExpression Id. */
int GUARDED_SYM = 70;
/** RegularExpression Id. */
int STRING = 71;
/** RegularExpression Id. */
int IDENT = 72;
/** RegularExpression Id. */
int NUMBER = 73;
/** RegularExpression Id. */
int _URL = 74;
/** RegularExpression Id. */
int URL = 75;
/** RegularExpression Id. */
int VARIABLE = 76;
/** RegularExpression Id. */
int PERCENTAGE = 77;
/** RegularExpression Id. */
int PT = 78;
/** RegularExpression Id. */
int MM = 79;
/** RegularExpression Id. */
int CM = 80;
/** RegularExpression Id. */
int PC = 81;
/** RegularExpression Id. */
int IN = 82;
/** RegularExpression Id. */
int PX = 83;
/** RegularExpression Id. */
int EMS = 84;
/** RegularExpression Id. */
int LEM = 85;
/** RegularExpression Id. */
int REM = 86;
/** RegularExpression Id. */
int EXS = 87;
/** RegularExpression Id. */
int DEG = 88;
/** RegularExpression Id. */
int RAD = 89;
/** RegularExpression Id. */
int GRAD = 90;
/** RegularExpression Id. */
int MS = 91;
/** RegularExpression Id. */
int SECOND = 92;
/** RegularExpression Id. */
int HZ = 93;
/** RegularExpression Id. */
int KHZ = 94;
/** RegularExpression Id. */
int DIMEN = 95;
/** RegularExpression Id. */
int HASH = 96;
/** RegularExpression Id. */
int IMPORT_SYM = 97;
/** RegularExpression Id. */
int MEDIA_SYM = 98;
/** RegularExpression Id. */
int CHARSET_SYM = 99;
/** RegularExpression Id. */
int PAGE_SYM = 100;
/** RegularExpression Id. */
int FONT_FACE_SYM = 101;
/** RegularExpression Id. */
int KEY_FRAME_SYM = 102;
/** RegularExpression Id. */
int ATKEYWORD = 103;
/** RegularExpression Id. */
int IMPORTANT_SYM = 104;
/** RegularExpression Id. */
int RANGE0 = 105;
/** RegularExpression Id. */
int RANGE1 = 106;
/** RegularExpression Id. */
int RANGE2 = 107;
/** RegularExpression Id. */
int RANGE3 = 108;
/** RegularExpression Id. */
int RANGE4 = 109;
/** RegularExpression Id. */
int RANGE5 = 110;
/** RegularExpression Id. */
int RANGE6 = 111;
/** RegularExpression Id. */
int RANGE = 112;
/** RegularExpression Id. */
int UNI = 113;
/** RegularExpression Id. */
int UNICODERANGE = 114;
/** RegularExpression Id. */
int REMOVE = 115;
/** RegularExpression Id. */
int APPEND = 116;
/** RegularExpression Id. */
int CONTAINS = 117;
/** RegularExpression Id. */
int FUNCTION = 118;
/** RegularExpression Id. */
int UNKNOWN = 119;
/** End of File. */
int EOF = 0;
/** RegularExpression Id. */
int S = 1;
/** RegularExpression Id. */
int SINGLE_LINE_COMMENT = 2;
/** RegularExpression Id. */
int FORMAL_COMMENT = 5;
/** RegularExpression Id. */
int MULTI_LINE_COMMENT = 6;
/** RegularExpression Id. */
int CDO = 8;
/** RegularExpression Id. */
int CDC = 9;
/** RegularExpression Id. */
int LBRACE = 10;
/** RegularExpression Id. */
int RBRACE = 11;
/** RegularExpression Id. */
int DASHMATCH = 12;
/** RegularExpression Id. */
int CARETMATCH = 13;
/** RegularExpression Id. */
int DOLLARMATCH = 14;
/** RegularExpression Id. */
int STARMATCH = 15;
/** RegularExpression Id. */
int INCLUDES = 16;
/** RegularExpression Id. */
int EQ = 17;
/** RegularExpression Id. */
int PLUS = 18;
/** RegularExpression Id. */
int MINUS = 19;
/** RegularExpression Id. */
int COMMA = 20;
/** RegularExpression Id. */
int SEMICOLON = 21;
/** RegularExpression Id. */
int PRECEDES = 22;
/** RegularExpression Id. */
int SIBLING = 23;
/** RegularExpression Id. */
int SUCCEEDS = 24;
/** RegularExpression Id. */
int DIV = 25;
/** RegularExpression Id. */
int LBRACKET = 26;
/** RegularExpression Id. */
int RBRACKET = 27;
/** RegularExpression Id. */
int ANY = 28;
/** RegularExpression Id. */
int MOD = 29;
/** RegularExpression Id. */
int PARENT = 30;
/** RegularExpression Id. */
int DOT = 31;
/** RegularExpression Id. */
int LPARAN = 32;
/** RegularExpression Id. */
int RPARAN = 33;
/** RegularExpression Id. */
int COMPARE = 34;
/** RegularExpression Id. */
int OR = 35;
/** RegularExpression Id. */
int AND = 36;
/** RegularExpression Id. */
int NOT_EQ = 37;
/** RegularExpression Id. */
int COLON = 38;
/** RegularExpression Id. */
int INTERPOLATION = 39;
/** RegularExpression Id. */
int NONASCII = 40;
/** RegularExpression Id. */
int H = 41;
/** RegularExpression Id. */
int UNICODE = 42;
/** RegularExpression Id. */
int ESCAPE = 43;
/** RegularExpression Id. */
int NMSTART = 44;
/** RegularExpression Id. */
int NMCHAR = 45;
/** RegularExpression Id. */
int STRINGCHAR = 46;
/** RegularExpression Id. */
int D = 47;
/** RegularExpression Id. */
int NAME = 48;
/** RegularExpression Id. */
int TO = 49;
/** RegularExpression Id. */
int THROUGH = 50;
/** RegularExpression Id. */
int EACH_IN = 51;
/** RegularExpression Id. */
int FROM = 52;
/** RegularExpression Id. */
int MIXIN_SYM = 53;
/** RegularExpression Id. */
int INCLUDE_SYM = 54;
/** RegularExpression Id. */
int FUNCTION_SYM = 55;
/** RegularExpression Id. */
int RETURN_SYM = 56;
/** RegularExpression Id. */
int DEBUG_SYM = 57;
/** RegularExpression Id. */
int WARN_SYM = 58;
/** RegularExpression Id. */
int FOR_SYM = 59;
/** RegularExpression Id. */
int EACH_SYM = 60;
/** RegularExpression Id. */
int WHILE_SYM = 61;
/** RegularExpression Id. */
int IF_SYM = 62;
/** RegularExpression Id. */
int ELSE_SYM = 63;
/** RegularExpression Id. */
int EXTEND_SYM = 64;
/** RegularExpression Id. */
int MOZ_DOCUMENT_SYM = 65;
/** RegularExpression Id. */
int SUPPORTS_SYM = 66;
/** RegularExpression Id. */
int CONTENT_SYM = 67;
/** RegularExpression Id. */
int MICROSOFT_RULE = 68;
/** RegularExpression Id. */
int IF = 69;
/** RegularExpression Id. */
int GUARDED_SYM = 70;
/** RegularExpression Id. */
int STRING = 71;
/** RegularExpression Id. */
int IDENT = 72;
/** RegularExpression Id. */
int NUMBER = 73;
/** RegularExpression Id. */
int _URL = 74;
/** RegularExpression Id. */
int URL = 75;
/** RegularExpression Id. */
int VARIABLE = 76;
/** RegularExpression Id. */
int PERCENTAGE = 77;
/** RegularExpression Id. */
int PT = 78;
/** RegularExpression Id. */
int MM = 79;
/** RegularExpression Id. */
int CM = 80;
/** RegularExpression Id. */
int PC = 81;
/** RegularExpression Id. */
int IN = 82;
/** RegularExpression Id. */
int PX = 83;
/** RegularExpression Id. */
int EMS = 84;
/** RegularExpression Id. */
int LEM = 85;
/** RegularExpression Id. */
int REM = 86;
/** RegularExpression Id. */
int EXS = 87;
/** RegularExpression Id. */
int DEG = 88;
/** RegularExpression Id. */
int RAD = 89;
/** RegularExpression Id. */
int GRAD = 90;
/** RegularExpression Id. */
int MS = 91;
/** RegularExpression Id. */
int SECOND = 92;
/** RegularExpression Id. */
int HZ = 93;
/** RegularExpression Id. */
int KHZ = 94;
/** RegularExpression Id. */
int DIMEN = 95;
/** RegularExpression Id. */
int HASH = 96;
/** RegularExpression Id. */
int IMPORT_SYM = 97;
/** RegularExpression Id. */
int MEDIA_SYM = 98;
/** RegularExpression Id. */
int CHARSET_SYM = 99;
/** RegularExpression Id. */
int PAGE_SYM = 100;
/** RegularExpression Id. */
int FONT_FACE_SYM = 101;
/** RegularExpression Id. */
int KEY_FRAME_SYM = 102;
/** RegularExpression Id. */
int ATKEYWORD = 103;
/** RegularExpression Id. */
int IMPORTANT_SYM = 104;
/** RegularExpression Id. */
int RANGE0 = 105;
/** RegularExpression Id. */
int RANGE1 = 106;
/** RegularExpression Id. */
int RANGE2 = 107;
/** RegularExpression Id. */
int RANGE3 = 108;
/** RegularExpression Id. */
int RANGE4 = 109;
/** RegularExpression Id. */
int RANGE5 = 110;
/** RegularExpression Id. */
int RANGE6 = 111;
/** RegularExpression Id. */
int RANGE = 112;
/** RegularExpression Id. */
int UNI = 113;
/** RegularExpression Id. */
int UNICODERANGE = 114;
/** RegularExpression Id. */
int REMOVE = 115;
/** RegularExpression Id. */
int APPEND = 116;
/** RegularExpression Id. */
int CONTAINS = 117;
/** RegularExpression Id. */
int FUNCTION = 118;
/** RegularExpression Id. */
int UNKNOWN = 119;

/** Lexical state. */
int DEFAULT = 0;
/** Lexical state. */
int IN_FORMAL_COMMENT = 1;
/** Lexical state. */
int IN_MULTI_LINE_COMMENT = 2;
/** Lexical state. */
int DEFAULT = 0;
/** Lexical state. */
int IN_FORMAL_COMMENT = 1;
/** Lexical state. */
int IN_MULTI_LINE_COMMENT = 2;

/** Literal token values. */
String[] tokenImage = { "<EOF>", "<S>", "<SINGLE_LINE_COMMENT>",
"<token of kind 3>", "\"/*\"", "\"*/\"", "\"*/\"",
"<token of kind 7>", "\"<!--\"", "\"-->\"", "\"{\"", "\"}\"",
"\"|=\"", "\"^=\"", "\"$=\"", "\"*=\"", "\"~=\"", "\"=\"", "\"+\"",
"\"-\"", "\",\"", "\";\"", "\">\"", "\"~\"", "\"<\"", "\"/\"",
"\"[\"", "\"]\"", "\"*\"", "\"%\"", "\"&\"", "\".\"", "\"(\"",
"\")\"", "\"==\"", "\"||\"", "\"&&\"", "\"!=\"", "\":\"",
"<INTERPOLATION>", "<NONASCII>", "<H>", "<UNICODE>", "<ESCAPE>",
"<NMSTART>", "<NMCHAR>", "<STRINGCHAR>", "<D>", "<NAME>", "\"to\"",
"\"through\"", "\"in\"", "\"from\"", "\"@mixin\"", "\"@include\"",
"\"@function\"", "\"@return\"", "\"@debug\"", "\"@warn\"",
"\"@for\"", "\"@each\"", "\"@while\"", "\"@if\"", "\"@else\"",
"\"@extend\"", "\"@-moz-document\"", "\"@supports\"",
"\"@content\"", "<MICROSOFT_RULE>", "\"if\"", "<GUARDED_SYM>",
"<STRING>", "<IDENT>", "<NUMBER>", "<_URL>", "<URL>", "<VARIABLE>",
"<PERCENTAGE>", "<PT>", "<MM>", "<CM>", "<PC>", "<IN>", "<PX>",
"<EMS>", "<LEM>", "<REM>", "<EXS>", "<DEG>", "<RAD>", "<GRAD>",
"<MS>", "<SECOND>", "<HZ>", "<KHZ>", "<DIMEN>", "<HASH>",
"\"@import\"", "\"@media\"", "\"@charset\"", "\"@page\"",
"\"@font-face\"", "<KEY_FRAME_SYM>", "<ATKEYWORD>",
"<IMPORTANT_SYM>", "<RANGE0>", "<RANGE1>", "<RANGE2>", "<RANGE3>",
"<RANGE4>", "<RANGE5>", "<RANGE6>", "<RANGE>", "<UNI>",
"<UNICODERANGE>", "<REMOVE>", "<APPEND>", "<CONTAINS>",
"<FUNCTION>", "<UNKNOWN>", };
/** Literal token values. */
String[] tokenImage = {
"<EOF>",
"<S>",
"<SINGLE_LINE_COMMENT>",
"<token of kind 3>",
"\"/*\"",
"\"*/\"",
"\"*/\"",
"<token of kind 7>",
"\"<!--\"",
"\"-->\"",
"\"{\"",
"\"}\"",
"\"|=\"",
"\"^=\"",
"\"$=\"",
"\"*=\"",
"\"~=\"",
"\"=\"",
"\"+\"",
"\"-\"",
"\",\"",
"\";\"",
"\">\"",
"\"~\"",
"\"<\"",
"\"/\"",
"\"[\"",
"\"]\"",
"\"*\"",
"\"%\"",
"\"&\"",
"\".\"",
"\"(\"",
"\")\"",
"\"==\"",
"\"||\"",
"\"&&\"",
"\"!=\"",
"\":\"",
"<INTERPOLATION>",
"<NONASCII>",
"<H>",
"<UNICODE>",
"<ESCAPE>",
"<NMSTART>",
"<NMCHAR>",
"<STRINGCHAR>",
"<D>",
"<NAME>",
"\"to\"",
"\"through\"",
"\"in\"",
"\"from\"",
"\"@mixin\"",
"\"@include\"",
"\"@function\"",
"\"@return\"",
"\"@debug\"",
"\"@warn\"",
"\"@for\"",
"\"@each\"",
"\"@while\"",
"\"@if\"",
"\"@else\"",
"\"@extend\"",
"\"@-moz-document\"",
"\"@supports\"",
"\"@content\"",
"<MICROSOFT_RULE>",
"\"if\"",
"<GUARDED_SYM>",
"<STRING>",
"<IDENT>",
"<NUMBER>",
"<_URL>",
"<URL>",
"<VARIABLE>",
"<PERCENTAGE>",
"<PT>",
"<MM>",
"<CM>",
"<PC>",
"<IN>",
"<PX>",
"<EMS>",
"<LEM>",
"<REM>",
"<EXS>",
"<DEG>",
"<RAD>",
"<GRAD>",
"<MS>",
"<SECOND>",
"<HZ>",
"<KHZ>",
"<DIMEN>",
"<HASH>",
"\"@import\"",
"\"@media\"",
"\"@charset\"",
"\"@page\"",
"\"@font-face\"",
"<KEY_FRAME_SYM>",
"<ATKEYWORD>",
"<IMPORTANT_SYM>",
"<RANGE0>",
"<RANGE1>",
"<RANGE2>",
"<RANGE3>",
"<RANGE4>",
"<RANGE5>",
"<RANGE6>",
"<RANGE>",
"<UNI>",
"<UNICODERANGE>",
"<REMOVE>",
"<APPEND>",
"<CONTAINS>",
"<FUNCTION>",
"<UNKNOWN>",
};

}

+ 4951
- 5913
theme-compiler/src/com/vaadin/sass/internal/parser/ParserTokenManager.java
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 2
- 1
theme-compiler/src/com/vaadin/sass/internal/tree/BlockNode.java 파일 보기

@@ -80,7 +80,8 @@ public class BlockNode extends Node implements IVariableNode {
String interpolation = "#{$" + var.getName() + "}";
if (selector.contains(interpolation)) {
String replace = selector.replace(interpolation, var
.getExpr().toString());
.getExpr().unquotedString());

selectorList.add(selectorList.indexOf(selector), replace);
selectorList.remove(selector);
}

+ 2
- 1
theme-compiler/src/com/vaadin/sass/internal/tree/KeyframesNode.java 파일 보기

@@ -54,7 +54,8 @@ public class KeyframesNode extends Node implements IVariableNode {
if (animationName != null && animationName.contains(interpolation)) {
if (animationName.contains(interpolation)) {
animationName = animationName.replaceAll(Pattern
.quote(interpolation), node.getExpr().toString());
.quote(interpolation), node.getExpr()
.unquotedString());
}
}
}

+ 3
- 2
theme-compiler/src/com/vaadin/sass/internal/tree/RuleNode.java 파일 보기

@@ -91,7 +91,8 @@ public class RuleNode extends Node implements IVariableNode {

if (variable != null && variable.contains(interpolation)) {
variable = variable.replaceAll(Pattern.quote(interpolation),
node.getExpr().toString());
node.getExpr().unquotedString());

}

if (value.getLexicalUnitType() == LexicalUnitImpl.SAC_FUNCTION) {
@@ -120,7 +121,7 @@ public class RuleNode extends Node implements IVariableNode {
.getValue()
.toString()
.replaceAll(Pattern.quote(interpolation),
node.getExpr().toString()));
node.getExpr().unquotedString()));
}
current = current.getNextLexicalUnit();
}

+ 1
- 0
theme-compiler/tests/resources/automatic/css/interpolation-singlequote.css 파일 보기

@@ -0,0 +1 @@
body { background-color: white; }

+ 10
- 0
theme-compiler/tests/resources/automatic/css/mixin-keyframes.css 파일 보기

@@ -0,0 +1,10 @@
@-webkit-keyframes fade-in {
0% { opacity: 0; }
20% , 50%,100% { opacity: 1; }
30%, 75% { opacity: 0; }
}
@-moz-keyframes fade-in {
0% { opacity: 0; }
20% , 50%,100% { opacity: 1; }
30%, 75% { opacity: 0; }
}

+ 7
- 0
theme-compiler/tests/resources/automatic/scss/interpolation-singlequote.scss 파일 보기

@@ -0,0 +1,7 @@
@mixin bgcolor ($name, $color) {
#{$name}{
background-color: $color;
}
}

@include bgcolor('body', white);

+ 14
- 0
theme-compiler/tests/resources/automatic/scss/mixin-keyframes.scss 파일 보기

@@ -0,0 +1,14 @@
@mixin keyframes ($name) {
@-webkit-keyframes #{$name} {
@content;
}
@-moz-keyframes #{$name} {
@content;
}
}

@include keyframes("fade-in") {
0% {opacity: 0;}
20% , 50%,100%{opacity: 1;}
30%, 75% {opacity: 0;}
}

Loading…
취소
저장