Edit File by line
/home/barbar84/www/wp-inclu.../js/codemirr...
File: csslint.js
c;
[5500] Fix | Delete
[5501] Fix | Delete
for (c = reader.peek(); c; c = reader.peek()) {
[5502] Fix | Delete
if (c === "\\") {
[5503] Fix | Delete
if (/^[^\r\n\f]$/.test(reader.peek(2))) {
[5504] Fix | Delete
ident += this.readEscape(reader.read(), true);
[5505] Fix | Delete
} else {
[5506] Fix | Delete
// Bad escape sequence.
[5507] Fix | Delete
break;
[5508] Fix | Delete
}
[5509] Fix | Delete
} else if (isNameChar(c)) {
[5510] Fix | Delete
ident += reader.read();
[5511] Fix | Delete
} else {
[5512] Fix | Delete
break;
[5513] Fix | Delete
}
[5514] Fix | Delete
}
[5515] Fix | Delete
[5516] Fix | Delete
return ident;
[5517] Fix | Delete
},
[5518] Fix | Delete
[5519] Fix | Delete
readEscape: function(first, unescape) {
[5520] Fix | Delete
var reader = this._reader,
[5521] Fix | Delete
cssEscape = first || "",
[5522] Fix | Delete
i = 0,
[5523] Fix | Delete
c = reader.peek();
[5524] Fix | Delete
[5525] Fix | Delete
if (isHexDigit(c)) {
[5526] Fix | Delete
do {
[5527] Fix | Delete
cssEscape += reader.read();
[5528] Fix | Delete
c = reader.peek();
[5529] Fix | Delete
} while (c && isHexDigit(c) && ++i < 6);
[5530] Fix | Delete
}
[5531] Fix | Delete
[5532] Fix | Delete
if (cssEscape.length === 1) {
[5533] Fix | Delete
if (/^[^\r\n\f0-9a-f]$/.test(c)) {
[5534] Fix | Delete
reader.read();
[5535] Fix | Delete
if (unescape) {
[5536] Fix | Delete
return c;
[5537] Fix | Delete
}
[5538] Fix | Delete
} else {
[5539] Fix | Delete
// We should never get here (readName won't call readEscape
[5540] Fix | Delete
// if the escape sequence is bad).
[5541] Fix | Delete
throw new Error("Bad escape sequence.");
[5542] Fix | Delete
}
[5543] Fix | Delete
} else if (c === "\r") {
[5544] Fix | Delete
reader.read();
[5545] Fix | Delete
if (reader.peek() === "\n") {
[5546] Fix | Delete
c += reader.read();
[5547] Fix | Delete
}
[5548] Fix | Delete
} else if (/^[ \t\n\f]$/.test(c)) {
[5549] Fix | Delete
reader.read();
[5550] Fix | Delete
} else {
[5551] Fix | Delete
c = "";
[5552] Fix | Delete
}
[5553] Fix | Delete
[5554] Fix | Delete
if (unescape) {
[5555] Fix | Delete
var cp = parseInt(cssEscape.slice(first.length), 16);
[5556] Fix | Delete
return String.fromCodePoint ? String.fromCodePoint(cp) :
[5557] Fix | Delete
String.fromCharCode(cp);
[5558] Fix | Delete
}
[5559] Fix | Delete
return cssEscape + c;
[5560] Fix | Delete
},
[5561] Fix | Delete
[5562] Fix | Delete
readComment: function(first) {
[5563] Fix | Delete
var reader = this._reader,
[5564] Fix | Delete
comment = first || "",
[5565] Fix | Delete
c = reader.read();
[5566] Fix | Delete
[5567] Fix | Delete
if (c === "*") {
[5568] Fix | Delete
while (c) {
[5569] Fix | Delete
comment += c;
[5570] Fix | Delete
[5571] Fix | Delete
//look for end of comment
[5572] Fix | Delete
if (comment.length > 2 && c === "*" && reader.peek() === "/") {
[5573] Fix | Delete
comment += reader.read();
[5574] Fix | Delete
break;
[5575] Fix | Delete
}
[5576] Fix | Delete
[5577] Fix | Delete
c = reader.read();
[5578] Fix | Delete
}
[5579] Fix | Delete
[5580] Fix | Delete
return comment;
[5581] Fix | Delete
} else {
[5582] Fix | Delete
return "";
[5583] Fix | Delete
}
[5584] Fix | Delete
[5585] Fix | Delete
}
[5586] Fix | Delete
});
[5587] Fix | Delete
[5588] Fix | Delete
},{"../util/TokenStreamBase":27,"./PropertyValuePart":11,"./Tokens":18}],18:[function(require,module,exports){
[5589] Fix | Delete
"use strict";
[5590] Fix | Delete
[5591] Fix | Delete
var Tokens = module.exports = [
[5592] Fix | Delete
[5593] Fix | Delete
/*
[5594] Fix | Delete
* The following token names are defined in CSS3 Grammar: https://www.w3.org/TR/css3-syntax/#lexical
[5595] Fix | Delete
*/
[5596] Fix | Delete
[5597] Fix | Delete
// HTML-style comments
[5598] Fix | Delete
{ name: "CDO" },
[5599] Fix | Delete
{ name: "CDC" },
[5600] Fix | Delete
[5601] Fix | Delete
// ignorables
[5602] Fix | Delete
{ name: "S", whitespace: true/*, channel: "ws"*/ },
[5603] Fix | Delete
{ name: "COMMENT", comment: true, hide: true, channel: "comment" },
[5604] Fix | Delete
[5605] Fix | Delete
// attribute equality
[5606] Fix | Delete
{ name: "INCLUDES", text: "~=" },
[5607] Fix | Delete
{ name: "DASHMATCH", text: "|=" },
[5608] Fix | Delete
{ name: "PREFIXMATCH", text: "^=" },
[5609] Fix | Delete
{ name: "SUFFIXMATCH", text: "$=" },
[5610] Fix | Delete
{ name: "SUBSTRINGMATCH", text: "*=" },
[5611] Fix | Delete
[5612] Fix | Delete
// identifier types
[5613] Fix | Delete
{ name: "STRING" },
[5614] Fix | Delete
{ name: "IDENT" },
[5615] Fix | Delete
{ name: "HASH" },
[5616] Fix | Delete
[5617] Fix | Delete
// at-keywords
[5618] Fix | Delete
{ name: "IMPORT_SYM", text: "@import" },
[5619] Fix | Delete
{ name: "PAGE_SYM", text: "@page" },
[5620] Fix | Delete
{ name: "MEDIA_SYM", text: "@media" },
[5621] Fix | Delete
{ name: "FONT_FACE_SYM", text: "@font-face" },
[5622] Fix | Delete
{ name: "CHARSET_SYM", text: "@charset" },
[5623] Fix | Delete
{ name: "NAMESPACE_SYM", text: "@namespace" },
[5624] Fix | Delete
{ name: "SUPPORTS_SYM", text: "@supports" },
[5625] Fix | Delete
{ name: "VIEWPORT_SYM", text: ["@viewport", "@-ms-viewport", "@-o-viewport"] },
[5626] Fix | Delete
{ name: "DOCUMENT_SYM", text: ["@document", "@-moz-document"] },
[5627] Fix | Delete
{ name: "UNKNOWN_SYM" },
[5628] Fix | Delete
//{ name: "ATKEYWORD"},
[5629] Fix | Delete
[5630] Fix | Delete
// CSS3 animations
[5631] Fix | Delete
{ name: "KEYFRAMES_SYM", text: [ "@keyframes", "@-webkit-keyframes", "@-moz-keyframes", "@-o-keyframes" ] },
[5632] Fix | Delete
[5633] Fix | Delete
// important symbol
[5634] Fix | Delete
{ name: "IMPORTANT_SYM" },
[5635] Fix | Delete
[5636] Fix | Delete
// measurements
[5637] Fix | Delete
{ name: "LENGTH" },
[5638] Fix | Delete
{ name: "ANGLE" },
[5639] Fix | Delete
{ name: "TIME" },
[5640] Fix | Delete
{ name: "FREQ" },
[5641] Fix | Delete
{ name: "DIMENSION" },
[5642] Fix | Delete
{ name: "PERCENTAGE" },
[5643] Fix | Delete
{ name: "NUMBER" },
[5644] Fix | Delete
[5645] Fix | Delete
// functions
[5646] Fix | Delete
{ name: "URI" },
[5647] Fix | Delete
{ name: "FUNCTION" },
[5648] Fix | Delete
[5649] Fix | Delete
// Unicode ranges
[5650] Fix | Delete
{ name: "UNICODE_RANGE" },
[5651] Fix | Delete
[5652] Fix | Delete
/*
[5653] Fix | Delete
* The following token names are defined in CSS3 Selectors: https://www.w3.org/TR/css3-selectors/#selector-syntax
[5654] Fix | Delete
*/
[5655] Fix | Delete
[5656] Fix | Delete
// invalid string
[5657] Fix | Delete
{ name: "INVALID" },
[5658] Fix | Delete
[5659] Fix | Delete
// combinators
[5660] Fix | Delete
{ name: "PLUS", text: "+" },
[5661] Fix | Delete
{ name: "GREATER", text: ">" },
[5662] Fix | Delete
{ name: "COMMA", text: "," },
[5663] Fix | Delete
{ name: "TILDE", text: "~" },
[5664] Fix | Delete
[5665] Fix | Delete
// modifier
[5666] Fix | Delete
{ name: "NOT" },
[5667] Fix | Delete
[5668] Fix | Delete
/*
[5669] Fix | Delete
* Defined in CSS3 Paged Media
[5670] Fix | Delete
*/
[5671] Fix | Delete
{ name: "TOPLEFTCORNER_SYM", text: "@top-left-corner" },
[5672] Fix | Delete
{ name: "TOPLEFT_SYM", text: "@top-left" },
[5673] Fix | Delete
{ name: "TOPCENTER_SYM", text: "@top-center" },
[5674] Fix | Delete
{ name: "TOPRIGHT_SYM", text: "@top-right" },
[5675] Fix | Delete
{ name: "TOPRIGHTCORNER_SYM", text: "@top-right-corner" },
[5676] Fix | Delete
{ name: "BOTTOMLEFTCORNER_SYM", text: "@bottom-left-corner" },
[5677] Fix | Delete
{ name: "BOTTOMLEFT_SYM", text: "@bottom-left" },
[5678] Fix | Delete
{ name: "BOTTOMCENTER_SYM", text: "@bottom-center" },
[5679] Fix | Delete
{ name: "BOTTOMRIGHT_SYM", text: "@bottom-right" },
[5680] Fix | Delete
{ name: "BOTTOMRIGHTCORNER_SYM", text: "@bottom-right-corner" },
[5681] Fix | Delete
{ name: "LEFTTOP_SYM", text: "@left-top" },
[5682] Fix | Delete
{ name: "LEFTMIDDLE_SYM", text: "@left-middle" },
[5683] Fix | Delete
{ name: "LEFTBOTTOM_SYM", text: "@left-bottom" },
[5684] Fix | Delete
{ name: "RIGHTTOP_SYM", text: "@right-top" },
[5685] Fix | Delete
{ name: "RIGHTMIDDLE_SYM", text: "@right-middle" },
[5686] Fix | Delete
{ name: "RIGHTBOTTOM_SYM", text: "@right-bottom" },
[5687] Fix | Delete
[5688] Fix | Delete
/*
[5689] Fix | Delete
* The following token names are defined in CSS3 Media Queries: https://www.w3.org/TR/css3-mediaqueries/#syntax
[5690] Fix | Delete
*/
[5691] Fix | Delete
/*{ name: "MEDIA_ONLY", state: "media"},
[5692] Fix | Delete
{ name: "MEDIA_NOT", state: "media"},
[5693] Fix | Delete
{ name: "MEDIA_AND", state: "media"},*/
[5694] Fix | Delete
{ name: "RESOLUTION", state: "media" },
[5695] Fix | Delete
[5696] Fix | Delete
/*
[5697] Fix | Delete
* The following token names are not defined in any CSS specification but are used by the lexer.
[5698] Fix | Delete
*/
[5699] Fix | Delete
[5700] Fix | Delete
// not a real token, but useful for stupid IE filters
[5701] Fix | Delete
{ name: "IE_FUNCTION" },
[5702] Fix | Delete
[5703] Fix | Delete
// part of CSS3 grammar but not the Flex code
[5704] Fix | Delete
{ name: "CHAR" },
[5705] Fix | Delete
[5706] Fix | Delete
// TODO: Needed?
[5707] Fix | Delete
// Not defined as tokens, but might as well be
[5708] Fix | Delete
{
[5709] Fix | Delete
name: "PIPE",
[5710] Fix | Delete
text: "|"
[5711] Fix | Delete
},
[5712] Fix | Delete
{
[5713] Fix | Delete
name: "SLASH",
[5714] Fix | Delete
text: "/"
[5715] Fix | Delete
},
[5716] Fix | Delete
{
[5717] Fix | Delete
name: "MINUS",
[5718] Fix | Delete
text: "-"
[5719] Fix | Delete
},
[5720] Fix | Delete
{
[5721] Fix | Delete
name: "STAR",
[5722] Fix | Delete
text: "*"
[5723] Fix | Delete
},
[5724] Fix | Delete
[5725] Fix | Delete
{
[5726] Fix | Delete
name: "LBRACE",
[5727] Fix | Delete
endChar: "}",
[5728] Fix | Delete
text: "{"
[5729] Fix | Delete
},
[5730] Fix | Delete
{
[5731] Fix | Delete
name: "RBRACE",
[5732] Fix | Delete
text: "}"
[5733] Fix | Delete
},
[5734] Fix | Delete
{
[5735] Fix | Delete
name: "LBRACKET",
[5736] Fix | Delete
endChar: "]",
[5737] Fix | Delete
text: "["
[5738] Fix | Delete
},
[5739] Fix | Delete
{
[5740] Fix | Delete
name: "RBRACKET",
[5741] Fix | Delete
text: "]"
[5742] Fix | Delete
},
[5743] Fix | Delete
{
[5744] Fix | Delete
name: "EQUALS",
[5745] Fix | Delete
text: "="
[5746] Fix | Delete
},
[5747] Fix | Delete
{
[5748] Fix | Delete
name: "COLON",
[5749] Fix | Delete
text: ":"
[5750] Fix | Delete
},
[5751] Fix | Delete
{
[5752] Fix | Delete
name: "SEMICOLON",
[5753] Fix | Delete
text: ";"
[5754] Fix | Delete
},
[5755] Fix | Delete
{
[5756] Fix | Delete
name: "LPAREN",
[5757] Fix | Delete
endChar: ")",
[5758] Fix | Delete
text: "("
[5759] Fix | Delete
},
[5760] Fix | Delete
{
[5761] Fix | Delete
name: "RPAREN",
[5762] Fix | Delete
text: ")"
[5763] Fix | Delete
},
[5764] Fix | Delete
{
[5765] Fix | Delete
name: "DOT",
[5766] Fix | Delete
text: "."
[5767] Fix | Delete
}
[5768] Fix | Delete
];
[5769] Fix | Delete
[5770] Fix | Delete
(function() {
[5771] Fix | Delete
var nameMap = [],
[5772] Fix | Delete
typeMap = Object.create(null);
[5773] Fix | Delete
[5774] Fix | Delete
Tokens.UNKNOWN = -1;
[5775] Fix | Delete
Tokens.unshift({ name:"EOF" });
[5776] Fix | Delete
for (var i=0, len = Tokens.length; i < len; i++) {
[5777] Fix | Delete
nameMap.push(Tokens[i].name);
[5778] Fix | Delete
Tokens[Tokens[i].name] = i;
[5779] Fix | Delete
if (Tokens[i].text) {
[5780] Fix | Delete
if (Tokens[i].text instanceof Array) {
[5781] Fix | Delete
for (var j=0; j < Tokens[i].text.length; j++) {
[5782] Fix | Delete
typeMap[Tokens[i].text[j]] = i;
[5783] Fix | Delete
}
[5784] Fix | Delete
} else {
[5785] Fix | Delete
typeMap[Tokens[i].text] = i;
[5786] Fix | Delete
}
[5787] Fix | Delete
}
[5788] Fix | Delete
}
[5789] Fix | Delete
[5790] Fix | Delete
Tokens.name = function(tt) {
[5791] Fix | Delete
return nameMap[tt];
[5792] Fix | Delete
};
[5793] Fix | Delete
[5794] Fix | Delete
Tokens.type = function(c) {
[5795] Fix | Delete
return typeMap[c] || -1;
[5796] Fix | Delete
};
[5797] Fix | Delete
})();
[5798] Fix | Delete
[5799] Fix | Delete
},{}],19:[function(require,module,exports){
[5800] Fix | Delete
"use strict";
[5801] Fix | Delete
[5802] Fix | Delete
/* exported Validation */
[5803] Fix | Delete
[5804] Fix | Delete
var Matcher = require("./Matcher");
[5805] Fix | Delete
var Properties = require("./Properties");
[5806] Fix | Delete
var ValidationTypes = require("./ValidationTypes");
[5807] Fix | Delete
var ValidationError = require("./ValidationError");
[5808] Fix | Delete
var PropertyValueIterator = require("./PropertyValueIterator");
[5809] Fix | Delete
[5810] Fix | Delete
var Validation = module.exports = {
[5811] Fix | Delete
[5812] Fix | Delete
validate: function(property, value) {
[5813] Fix | Delete
[5814] Fix | Delete
//normalize name
[5815] Fix | Delete
var name = property.toString().toLowerCase(),
[5816] Fix | Delete
expression = new PropertyValueIterator(value),
[5817] Fix | Delete
spec = Properties[name],
[5818] Fix | Delete
part;
[5819] Fix | Delete
[5820] Fix | Delete
if (!spec) {
[5821] Fix | Delete
if (name.indexOf("-") !== 0) { //vendor prefixed are ok
[5822] Fix | Delete
throw new ValidationError("Unknown property '" + property + "'.", property.line, property.col);
[5823] Fix | Delete
}
[5824] Fix | Delete
} else if (typeof spec !== "number") {
[5825] Fix | Delete
[5826] Fix | Delete
// All properties accept some CSS-wide values.
[5827] Fix | Delete
// https://drafts.csswg.org/css-values-3/#common-keywords
[5828] Fix | Delete
if (ValidationTypes.isAny(expression, "inherit | initial | unset")) {
[5829] Fix | Delete
if (expression.hasNext()) {
[5830] Fix | Delete
part = expression.next();
[5831] Fix | Delete
throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
[5832] Fix | Delete
}
[5833] Fix | Delete
return;
[5834] Fix | Delete
}
[5835] Fix | Delete
[5836] Fix | Delete
// Property-specific validation.
[5837] Fix | Delete
this.singleProperty(spec, expression);
[5838] Fix | Delete
[5839] Fix | Delete
}
[5840] Fix | Delete
[5841] Fix | Delete
},
[5842] Fix | Delete
[5843] Fix | Delete
singleProperty: function(types, expression) {
[5844] Fix | Delete
[5845] Fix | Delete
var result = false,
[5846] Fix | Delete
value = expression.value,
[5847] Fix | Delete
part;
[5848] Fix | Delete
[5849] Fix | Delete
result = Matcher.parse(types).match(expression);
[5850] Fix | Delete
[5851] Fix | Delete
if (!result) {
[5852] Fix | Delete
if (expression.hasNext() && !expression.isFirst()) {
[5853] Fix | Delete
part = expression.peek();
[5854] Fix | Delete
throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
[5855] Fix | Delete
} else {
[5856] Fix | Delete
throw new ValidationError("Expected (" + ValidationTypes.describe(types) + ") but found '" + value + "'.", value.line, value.col);
[5857] Fix | Delete
}
[5858] Fix | Delete
} else if (expression.hasNext()) {
[5859] Fix | Delete
part = expression.next();
[5860] Fix | Delete
throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
[5861] Fix | Delete
}
[5862] Fix | Delete
[5863] Fix | Delete
}
[5864] Fix | Delete
[5865] Fix | Delete
};
[5866] Fix | Delete
[5867] Fix | Delete
},{"./Matcher":3,"./Properties":7,"./PropertyValueIterator":10,"./ValidationError":20,"./ValidationTypes":21}],20:[function(require,module,exports){
[5868] Fix | Delete
"use strict";
[5869] Fix | Delete
[5870] Fix | Delete
module.exports = ValidationError;
[5871] Fix | Delete
[5872] Fix | Delete
/**
[5873] Fix | Delete
* Type to use when a validation error occurs.
[5874] Fix | Delete
* @class ValidationError
[5875] Fix | Delete
* @namespace parserlib.util
[5876] Fix | Delete
* @constructor
[5877] Fix | Delete
* @param {String} message The error message.
[5878] Fix | Delete
* @param {int} line The line at which the error occurred.
[5879] Fix | Delete
* @param {int} col The column at which the error occurred.
[5880] Fix | Delete
*/
[5881] Fix | Delete
function ValidationError(message, line, col) {
[5882] Fix | Delete
[5883] Fix | Delete
/**
[5884] Fix | Delete
* The column at which the error occurred.
[5885] Fix | Delete
* @type int
[5886] Fix | Delete
* @property col
[5887] Fix | Delete
*/
[5888] Fix | Delete
this.col = col;
[5889] Fix | Delete
[5890] Fix | Delete
/**
[5891] Fix | Delete
* The line at which the error occurred.
[5892] Fix | Delete
* @type int
[5893] Fix | Delete
* @property line
[5894] Fix | Delete
*/
[5895] Fix | Delete
this.line = line;
[5896] Fix | Delete
[5897] Fix | Delete
/**
[5898] Fix | Delete
* The text representation of the unit.
[5899] Fix | Delete
* @type String
[5900] Fix | Delete
* @property text
[5901] Fix | Delete
*/
[5902] Fix | Delete
this.message = message;
[5903] Fix | Delete
[5904] Fix | Delete
}
[5905] Fix | Delete
[5906] Fix | Delete
//inherit from Error
[5907] Fix | Delete
ValidationError.prototype = new Error();
[5908] Fix | Delete
[5909] Fix | Delete
},{}],21:[function(require,module,exports){
[5910] Fix | Delete
"use strict";
[5911] Fix | Delete
[5912] Fix | Delete
var ValidationTypes = module.exports;
[5913] Fix | Delete
[5914] Fix | Delete
var Matcher = require("./Matcher");
[5915] Fix | Delete
[5916] Fix | Delete
function copy(to, from) {
[5917] Fix | Delete
Object.keys(from).forEach(function(prop) {
[5918] Fix | Delete
to[prop] = from[prop];
[5919] Fix | Delete
});
[5920] Fix | Delete
}
[5921] Fix | Delete
copy(ValidationTypes, {
[5922] Fix | Delete
[5923] Fix | Delete
isLiteral: function (part, literals) {
[5924] Fix | Delete
var text = part.text.toString().toLowerCase(),
[5925] Fix | Delete
args = literals.split(" | "),
[5926] Fix | Delete
i, len, found = false;
[5927] Fix | Delete
[5928] Fix | Delete
for (i=0, len=args.length; i < len && !found; i++) {
[5929] Fix | Delete
if (args[i].charAt(0) === "<") {
[5930] Fix | Delete
found = this.simple[args[i]](part);
[5931] Fix | Delete
} else if (args[i].slice(-2) === "()") {
[5932] Fix | Delete
found = (part.type === "function" &&
[5933] Fix | Delete
part.name === args[i].slice(0, -2));
[5934] Fix | Delete
} else if (text === args[i].toLowerCase()) {
[5935] Fix | Delete
found = true;
[5936] Fix | Delete
}
[5937] Fix | Delete
}
[5938] Fix | Delete
[5939] Fix | Delete
return found;
[5940] Fix | Delete
},
[5941] Fix | Delete
[5942] Fix | Delete
isSimple: function(type) {
[5943] Fix | Delete
return Boolean(this.simple[type]);
[5944] Fix | Delete
},
[5945] Fix | Delete
[5946] Fix | Delete
isComplex: function(type) {
[5947] Fix | Delete
return Boolean(this.complex[type]);
[5948] Fix | Delete
},
[5949] Fix | Delete
[5950] Fix | Delete
describe: function(type) {
[5951] Fix | Delete
if (this.complex[type] instanceof Matcher) {
[5952] Fix | Delete
return this.complex[type].toString(0);
[5953] Fix | Delete
}
[5954] Fix | Delete
return type;
[5955] Fix | Delete
},
[5956] Fix | Delete
[5957] Fix | Delete
/**
[5958] Fix | Delete
* Determines if the next part(s) of the given expression
[5959] Fix | Delete
* are any of the given types.
[5960] Fix | Delete
*/
[5961] Fix | Delete
isAny: function (expression, types) {
[5962] Fix | Delete
var args = types.split(" | "),
[5963] Fix | Delete
i, len, found = false;
[5964] Fix | Delete
[5965] Fix | Delete
for (i=0, len=args.length; i < len && !found && expression.hasNext(); i++) {
[5966] Fix | Delete
found = this.isType(expression, args[i]);
[5967] Fix | Delete
}
[5968] Fix | Delete
[5969] Fix | Delete
return found;
[5970] Fix | Delete
},
[5971] Fix | Delete
[5972] Fix | Delete
/**
[5973] Fix | Delete
* Determines if the next part(s) of the given expression
[5974] Fix | Delete
* are one of a group.
[5975] Fix | Delete
*/
[5976] Fix | Delete
isAnyOfGroup: function(expression, types) {
[5977] Fix | Delete
var args = types.split(" || "),
[5978] Fix | Delete
i, len, found = false;
[5979] Fix | Delete
[5980] Fix | Delete
for (i=0, len=args.length; i < len && !found; i++) {
[5981] Fix | Delete
found = this.isType(expression, args[i]);
[5982] Fix | Delete
}
[5983] Fix | Delete
[5984] Fix | Delete
return found ? args[i-1] : false;
[5985] Fix | Delete
},
[5986] Fix | Delete
[5987] Fix | Delete
/**
[5988] Fix | Delete
* Determines if the next part(s) of the given expression
[5989] Fix | Delete
* are of a given type.
[5990] Fix | Delete
*/
[5991] Fix | Delete
isType: function (expression, type) {
[5992] Fix | Delete
var part = expression.peek(),
[5993] Fix | Delete
result = false;
[5994] Fix | Delete
[5995] Fix | Delete
if (type.charAt(0) !== "<") {
[5996] Fix | Delete
result = this.isLiteral(part, type);
[5997] Fix | Delete
if (result) {
[5998] Fix | Delete
expression.next();
[5999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function