first commit
This commit is contained in:
8
app_vue/node_modules/css-tree/lib/syntax/atrule/font-face.js
generated
vendored
Normal file
8
app_vue/node_modules/css-tree/lib/syntax/atrule/font-face.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
parse: {
|
||||
prelude: null,
|
||||
block: function() {
|
||||
return this.Block(true);
|
||||
}
|
||||
}
|
||||
};
|
40
app_vue/node_modules/css-tree/lib/syntax/atrule/import.js
generated
vendored
Normal file
40
app_vue/node_modules/css-tree/lib/syntax/atrule/import.js
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
var TYPE = require('../../tokenizer').TYPE;
|
||||
|
||||
var STRING = TYPE.String;
|
||||
var IDENT = TYPE.Ident;
|
||||
var URL = TYPE.Url;
|
||||
var FUNCTION = TYPE.Function;
|
||||
var LEFTPARENTHESIS = TYPE.LeftParenthesis;
|
||||
|
||||
module.exports = {
|
||||
parse: {
|
||||
prelude: function() {
|
||||
var children = this.createList();
|
||||
|
||||
this.scanner.skipSC();
|
||||
|
||||
switch (this.scanner.tokenType) {
|
||||
case STRING:
|
||||
children.push(this.String());
|
||||
break;
|
||||
|
||||
case URL:
|
||||
case FUNCTION:
|
||||
children.push(this.Url());
|
||||
break;
|
||||
|
||||
default:
|
||||
this.error('String or url() is expected');
|
||||
}
|
||||
|
||||
if (this.lookupNonWSType(0) === IDENT ||
|
||||
this.lookupNonWSType(0) === LEFTPARENTHESIS) {
|
||||
children.push(this.WhiteSpace());
|
||||
children.push(this.MediaQueryList());
|
||||
}
|
||||
|
||||
return children;
|
||||
},
|
||||
block: null
|
||||
}
|
||||
};
|
7
app_vue/node_modules/css-tree/lib/syntax/atrule/index.js
generated
vendored
Normal file
7
app_vue/node_modules/css-tree/lib/syntax/atrule/index.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
'font-face': require('./font-face'),
|
||||
'import': require('./import'),
|
||||
'media': require('./media'),
|
||||
'page': require('./page'),
|
||||
'supports': require('./supports')
|
||||
};
|
12
app_vue/node_modules/css-tree/lib/syntax/atrule/media.js
generated
vendored
Normal file
12
app_vue/node_modules/css-tree/lib/syntax/atrule/media.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
module.exports = {
|
||||
parse: {
|
||||
prelude: function() {
|
||||
return this.createSingleNodeList(
|
||||
this.MediaQueryList()
|
||||
);
|
||||
},
|
||||
block: function() {
|
||||
return this.Block(false);
|
||||
}
|
||||
}
|
||||
};
|
12
app_vue/node_modules/css-tree/lib/syntax/atrule/page.js
generated
vendored
Normal file
12
app_vue/node_modules/css-tree/lib/syntax/atrule/page.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
module.exports = {
|
||||
parse: {
|
||||
prelude: function() {
|
||||
return this.createSingleNodeList(
|
||||
this.SelectorList()
|
||||
);
|
||||
},
|
||||
block: function() {
|
||||
return this.Block(true);
|
||||
}
|
||||
}
|
||||
};
|
89
app_vue/node_modules/css-tree/lib/syntax/atrule/supports.js
generated
vendored
Normal file
89
app_vue/node_modules/css-tree/lib/syntax/atrule/supports.js
generated
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
var TYPE = require('../../tokenizer').TYPE;
|
||||
|
||||
var WHITESPACE = TYPE.WhiteSpace;
|
||||
var COMMENT = TYPE.Comment;
|
||||
var IDENT = TYPE.Ident;
|
||||
var FUNCTION = TYPE.Function;
|
||||
var COLON = TYPE.Colon;
|
||||
var LEFTPARENTHESIS = TYPE.LeftParenthesis;
|
||||
|
||||
function consumeRaw() {
|
||||
return this.createSingleNodeList(
|
||||
this.Raw(this.scanner.tokenIndex, null, false)
|
||||
);
|
||||
}
|
||||
|
||||
function parentheses() {
|
||||
this.scanner.skipSC();
|
||||
|
||||
if (this.scanner.tokenType === IDENT &&
|
||||
this.lookupNonWSType(1) === COLON) {
|
||||
return this.createSingleNodeList(
|
||||
this.Declaration()
|
||||
);
|
||||
}
|
||||
|
||||
return readSequence.call(this);
|
||||
}
|
||||
|
||||
function readSequence() {
|
||||
var children = this.createList();
|
||||
var space = null;
|
||||
var child;
|
||||
|
||||
this.scanner.skipSC();
|
||||
|
||||
scan:
|
||||
while (!this.scanner.eof) {
|
||||
switch (this.scanner.tokenType) {
|
||||
case WHITESPACE:
|
||||
space = this.WhiteSpace();
|
||||
continue;
|
||||
|
||||
case COMMENT:
|
||||
this.scanner.next();
|
||||
continue;
|
||||
|
||||
case FUNCTION:
|
||||
child = this.Function(consumeRaw, this.scope.AtrulePrelude);
|
||||
break;
|
||||
|
||||
case IDENT:
|
||||
child = this.Identifier();
|
||||
break;
|
||||
|
||||
case LEFTPARENTHESIS:
|
||||
child = this.Parentheses(parentheses, this.scope.AtrulePrelude);
|
||||
break;
|
||||
|
||||
default:
|
||||
break scan;
|
||||
}
|
||||
|
||||
if (space !== null) {
|
||||
children.push(space);
|
||||
space = null;
|
||||
}
|
||||
|
||||
children.push(child);
|
||||
}
|
||||
|
||||
return children;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
parse: {
|
||||
prelude: function() {
|
||||
var children = readSequence.call(this);
|
||||
|
||||
if (this.getFirstListNode(children) === null) {
|
||||
this.error('Condition is expected');
|
||||
}
|
||||
|
||||
return children;
|
||||
},
|
||||
block: function() {
|
||||
return this.Block(false);
|
||||
}
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user