Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
bracketExpression: function(skip){
skip = skip || 0;
var start = this.input[skip];
assert(start === '(' || start === '{' || start === '[',
'The start character should be "(", "{" or "["');
var end = characterParser.BRACKETS[start];
var range;
try {
range = characterParser.parseUntil(this.input, end, {start: skip + 1});
} catch (ex) {
if (ex.index !== undefined) {
var idx = ex.index;
// starting from this.input[skip]
var tmp = this.input.substr(skip).indexOf('\n');
// starting from this.input[0]
var nextNewline = tmp + skip;
var ptr = 0;
while (idx > nextNewline && tmp !== -1) {
this.incrementLine(1);
idx -= nextNewline + 1;
ptr += nextNewline + 1;
tmp = nextNewline = this.input.substr(ptr).indexOf('\n');
bracketExpression: function(skip){
skip = skip || 0;
var start = this.input[skip];
assert(start === '(' || start === '{' || start === '[',
'The start character should be "(", "{" or "["');
var end = characterParser.BRACKETS[start];
var range;
try {
range = characterParser.parseUntil(this.input, end, {start: skip + 1});
} catch (ex) {
if (ex.index !== undefined) {
var idx = ex.index;
// starting from this.input[skip]
var tmp = this.input.substr(skip).indexOf('\n');
// starting from this.input[0]
var nextNewline = tmp + skip;
var ptr = 0;
while (idx > nextNewline && tmp !== -1) {
this.incrementLine(1);
idx -= nextNewline + 1;
ptr += nextNewline + 1;
tmp = nextNewline = this.input.substr(ptr).indexOf('\n');
bracketExpression: function(skip){
skip = skip || 0;
var start = this.input[skip];
assert(start === '(' || start === '{' || start === '[',
'The start character should be "(", "{" or "["');
var end = characterParser.BRACKETS[start];
var range;
try {
range = characterParser.parseUntil(this.input, end, {start: skip + 1});
} catch (ex) {
if (ex.index !== undefined) {
var idx = ex.index;
// starting from this.input[skip]
var tmp = this.input.substr(skip).indexOf('\n');
// starting from this.input[0]
var nextNewline = tmp + skip;
var ptr = 0;
while (idx > nextNewline && tmp !== -1) {
this.incrementLine(1);
idx -= nextNewline + 1;
ptr += nextNewline + 1;
tmp = nextNewline = this.input.substr(ptr).indexOf('\n');