mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 05:32:18 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
3
web/node_modules/css-tree/lib/syntax/scope/atrulePrelude.js
generated
vendored
Normal file
3
web/node_modules/css-tree/lib/syntax/scope/atrulePrelude.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
getNode: require('./default')
|
||||
};
|
87
web/node_modules/css-tree/lib/syntax/scope/default.js
generated
vendored
Normal file
87
web/node_modules/css-tree/lib/syntax/scope/default.js
generated
vendored
Normal file
|
@ -0,0 +1,87 @@
|
|||
var cmpChar = require('../../tokenizer').cmpChar;
|
||||
var cmpStr = require('../../tokenizer').cmpStr;
|
||||
var TYPE = require('../../tokenizer').TYPE;
|
||||
|
||||
var IDENT = TYPE.Ident;
|
||||
var STRING = TYPE.String;
|
||||
var NUMBER = TYPE.Number;
|
||||
var FUNCTION = TYPE.Function;
|
||||
var URL = TYPE.Url;
|
||||
var HASH = TYPE.Hash;
|
||||
var DIMENSION = TYPE.Dimension;
|
||||
var PERCENTAGE = TYPE.Percentage;
|
||||
var LEFTPARENTHESIS = TYPE.LeftParenthesis;
|
||||
var LEFTSQUAREBRACKET = TYPE.LeftSquareBracket;
|
||||
var COMMA = TYPE.Comma;
|
||||
var DELIM = TYPE.Delim;
|
||||
var NUMBERSIGN = 0x0023; // U+0023 NUMBER SIGN (#)
|
||||
var ASTERISK = 0x002A; // U+002A ASTERISK (*)
|
||||
var PLUSSIGN = 0x002B; // U+002B PLUS SIGN (+)
|
||||
var HYPHENMINUS = 0x002D; // U+002D HYPHEN-MINUS (-)
|
||||
var SOLIDUS = 0x002F; // U+002F SOLIDUS (/)
|
||||
var U = 0x0075; // U+0075 LATIN SMALL LETTER U (u)
|
||||
|
||||
module.exports = function defaultRecognizer(context) {
|
||||
switch (this.scanner.tokenType) {
|
||||
case HASH:
|
||||
return this.HexColor();
|
||||
|
||||
case COMMA:
|
||||
context.space = null;
|
||||
context.ignoreWSAfter = true;
|
||||
return this.Operator();
|
||||
|
||||
case LEFTPARENTHESIS:
|
||||
return this.Parentheses(this.readSequence, context.recognizer);
|
||||
|
||||
case LEFTSQUAREBRACKET:
|
||||
return this.Brackets(this.readSequence, context.recognizer);
|
||||
|
||||
case STRING:
|
||||
return this.String();
|
||||
|
||||
case DIMENSION:
|
||||
return this.Dimension();
|
||||
|
||||
case PERCENTAGE:
|
||||
return this.Percentage();
|
||||
|
||||
case NUMBER:
|
||||
return this.Number();
|
||||
|
||||
case FUNCTION:
|
||||
return cmpStr(this.scanner.source, this.scanner.tokenStart, this.scanner.tokenEnd, 'url(')
|
||||
? this.Url()
|
||||
: this.Function(this.readSequence, context.recognizer);
|
||||
|
||||
case URL:
|
||||
return this.Url();
|
||||
|
||||
case IDENT:
|
||||
// check for unicode range, it should start with u+ or U+
|
||||
if (cmpChar(this.scanner.source, this.scanner.tokenStart, U) &&
|
||||
cmpChar(this.scanner.source, this.scanner.tokenStart + 1, PLUSSIGN)) {
|
||||
return this.UnicodeRange();
|
||||
} else {
|
||||
return this.Identifier();
|
||||
}
|
||||
|
||||
case DELIM:
|
||||
var code = this.scanner.source.charCodeAt(this.scanner.tokenStart);
|
||||
|
||||
if (code === SOLIDUS ||
|
||||
code === ASTERISK ||
|
||||
code === PLUSSIGN ||
|
||||
code === HYPHENMINUS) {
|
||||
return this.Operator(); // TODO: replace with Delim
|
||||
}
|
||||
|
||||
// TODO: produce a node with Delim node type
|
||||
|
||||
if (code === NUMBERSIGN) {
|
||||
this.error('Hex or identifier is expected', this.scanner.tokenStart + 1);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
};
|
5
web/node_modules/css-tree/lib/syntax/scope/index.js
generated
vendored
Normal file
5
web/node_modules/css-tree/lib/syntax/scope/index.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
AtrulePrelude: require('./atrulePrelude'),
|
||||
Selector: require('./selector'),
|
||||
Value: require('./value')
|
||||
};
|
80
web/node_modules/css-tree/lib/syntax/scope/selector.js
generated
vendored
Normal file
80
web/node_modules/css-tree/lib/syntax/scope/selector.js
generated
vendored
Normal file
|
@ -0,0 +1,80 @@
|
|||
var TYPE = require('../../tokenizer').TYPE;
|
||||
|
||||
var DELIM = TYPE.Delim;
|
||||
var IDENT = TYPE.Ident;
|
||||
var DIMENSION = TYPE.Dimension;
|
||||
var PERCENTAGE = TYPE.Percentage;
|
||||
var NUMBER = TYPE.Number;
|
||||
var HASH = TYPE.Hash;
|
||||
var COLON = TYPE.Colon;
|
||||
var LEFTSQUAREBRACKET = TYPE.LeftSquareBracket;
|
||||
var NUMBERSIGN = 0x0023; // U+0023 NUMBER SIGN (#)
|
||||
var ASTERISK = 0x002A; // U+002A ASTERISK (*)
|
||||
var PLUSSIGN = 0x002B; // U+002B PLUS SIGN (+)
|
||||
var SOLIDUS = 0x002F; // U+002F SOLIDUS (/)
|
||||
var FULLSTOP = 0x002E; // U+002E FULL STOP (.)
|
||||
var GREATERTHANSIGN = 0x003E; // U+003E GREATER-THAN SIGN (>)
|
||||
var VERTICALLINE = 0x007C; // U+007C VERTICAL LINE (|)
|
||||
var TILDE = 0x007E; // U+007E TILDE (~)
|
||||
|
||||
function getNode(context) {
|
||||
switch (this.scanner.tokenType) {
|
||||
case LEFTSQUAREBRACKET:
|
||||
return this.AttributeSelector();
|
||||
|
||||
case HASH:
|
||||
return this.IdSelector();
|
||||
|
||||
case COLON:
|
||||
if (this.scanner.lookupType(1) === COLON) {
|
||||
return this.PseudoElementSelector();
|
||||
} else {
|
||||
return this.PseudoClassSelector();
|
||||
}
|
||||
|
||||
case IDENT:
|
||||
return this.TypeSelector();
|
||||
|
||||
case NUMBER:
|
||||
case PERCENTAGE:
|
||||
return this.Percentage();
|
||||
|
||||
case DIMENSION:
|
||||
// throws when .123ident
|
||||
if (this.scanner.source.charCodeAt(this.scanner.tokenStart) === FULLSTOP) {
|
||||
this.error('Identifier is expected', this.scanner.tokenStart + 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case DELIM:
|
||||
var code = this.scanner.source.charCodeAt(this.scanner.tokenStart);
|
||||
|
||||
switch (code) {
|
||||
case PLUSSIGN:
|
||||
case GREATERTHANSIGN:
|
||||
case TILDE:
|
||||
context.space = null;
|
||||
context.ignoreWSAfter = true;
|
||||
return this.Combinator();
|
||||
|
||||
case SOLIDUS: // /deep/
|
||||
return this.Combinator();
|
||||
|
||||
case FULLSTOP:
|
||||
return this.ClassSelector();
|
||||
|
||||
case ASTERISK:
|
||||
case VERTICALLINE:
|
||||
return this.TypeSelector();
|
||||
|
||||
case NUMBERSIGN:
|
||||
return this.IdSelector();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
getNode: getNode
|
||||
};
|
7
web/node_modules/css-tree/lib/syntax/scope/value.js
generated
vendored
Normal file
7
web/node_modules/css-tree/lib/syntax/scope/value.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
module.exports = {
|
||||
getNode: require('./default'),
|
||||
'-moz-element': require('../function/element'),
|
||||
'element': require('../function/element'),
|
||||
'expression': require('../function/expression'),
|
||||
'var': require('../function/var')
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue