scratch

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 124  →  ?path2? @ 125
/bower_components/yaml.js/lib/Inline.js
@@ -1,5 +1,5 @@
// Generated by CoffeeScript 1.10.0
var DumpException, Escaper, Inline, ParseException, Pattern, Unescaper, Utils,
// Generated by CoffeeScript 1.12.4
var DumpException, Escaper, Inline, ParseException, ParseMore, Pattern, Unescaper, Utils,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
 
Pattern = require('./Pattern');
@@ -12,6 +12,8 @@
 
ParseException = require('./Exception/ParseException');
 
ParseMore = require('./Exception/ParseMore');
 
DumpException = require('./Exception/DumpException');
 
Inline = (function() {
@@ -113,7 +115,7 @@
return (type === 'string' ? "'" + value + "'" : String(parseFloat(value)));
}
if (type === 'number') {
return (value === Infinity ? '.Inf' : (value === -Infinity ? '-.Inf' : (isNaN(value) ? '.NaN' : value)));
return (value === 2e308 ? '.Inf' : (value === -2e308 ? '-.Inf' : (isNaN(value) ? '.NaN' : value)));
}
if (Escaper.requiresDoubleQuoting(value)) {
return Escaper.escapeWithDoubleQuotes(value);
@@ -220,7 +222,7 @@
var i, match, output;
i = context.i;
if (!(match = this.PATTERN_QUOTED_SCALAR.exec(scalar.slice(i)))) {
throw new ParseException('Malformed inline YAML string (' + scalar.slice(i) + ').');
throw new ParseMore('Malformed inline YAML string (' + scalar.slice(i) + ').');
}
output = match[0].substr(1, match[0].length - 2);
if ('"' === scalar.charAt(i)) {
@@ -234,7 +236,7 @@
};
 
Inline.parseSequence = function(sequence, context) {
var e, error, i, isQuoted, len, output, ref, value;
var e, i, isQuoted, len, output, ref, value;
output = [];
len = sequence.length;
i = context.i;
@@ -272,7 +274,7 @@
}
++i;
}
throw new ParseException('Malformed inline YAML string ' + sequence);
throw new ParseMore('Malformed inline YAML string ' + sequence);
};
 
Inline.parseMapping = function(mapping, context) {
@@ -340,7 +342,7 @@
}
}
}
throw new ParseException('Malformed inline YAML string ' + mapping);
throw new ParseMore('Malformed inline YAML string ' + mapping);
};
 
Inline.evaluateScalar = function(scalar, context) {
@@ -357,11 +359,11 @@
case 'false':
return false;
case '.inf':
return Infinity;
return 2e308;
case '.nan':
return NaN;
return 0/0;
case '-.inf':
return Infinity;
return 2e308;
default:
firstChar = scalarLower.charAt(0);
switch (firstChar) {