/** * Checking from the current cursor position, check to see if the if-then-else block continues. * * @return boolean value */ protected boolean ifThenElseBlockContinues() { if ((cursor + 4) < length) { if (expr[cursor] != ';') cursor--; skipWhitespace(); return expr[cursor] == 'e' && expr[cursor + 1] == 'l' && expr[cursor + 2] == 's' && expr[cursor + 3] == 'e' && (isWhitespace(expr[cursor + 4]) || expr[cursor + 4] == '{'); } return false; }
/** * Checking from the current cursor position, check to see if the if-then-else block continues. * * @return boolean value */ protected boolean ifThenElseBlockContinues() { if ((cursor + 4) < end) { if (expr[cursor] != ';') cursor--; skipWhitespace(); return expr[cursor] == 'e' && expr[cursor + 1] == 'l' && expr[cursor + 2] == 's' && expr[cursor + 3] == 'e' && (isWhitespace(expr[cursor + 4]) || expr[cursor + 4] == '{'); } return false; }
/** * Checking from the current cursor position, check to see if the if-then-else block continues. * * @return boolean value */ protected boolean ifThenElseBlockContinues() { if ((cursor + 4) < end) { if (expr[cursor] != ';') cursor--; skipWhitespace(); return expr[cursor] == 'e' && expr[cursor + 1] == 'l' && expr[cursor + 2] == 's' && expr[cursor + 3] == 'e' && (isWhitespace(expr[cursor + 4]) || expr[cursor + 4] == '{'); } return false; }
/** * Checking from the current cursor position, check to see if we're inside a contiguous identifier. * * @return - */ protected boolean tokenContinues() { if (cursor == end) return false; else if (expr[cursor] == '.' || expr[cursor] == '[') return true; else if (isWhitespace(expr[cursor])) { int markCurrent = cursor; skipWhitespace(); if (cursor != end && (expr[cursor] == '.' || expr[cursor] == '[')) return true; cursor = markCurrent; } return false; }
/** * Checking from the current cursor position, check to see if we're inside a contiguous identifier. * * @return - */ protected boolean tokenContinues() { if (cursor == length) return false; else if (expr[cursor] == '.' || expr[cursor] == '[') return true; else if (isWhitespace(expr[cursor])) { int markCurrent = cursor; skipWhitespace(); if (cursor != length && (expr[cursor] == '.' || expr[cursor] == '[')) return true; cursor = markCurrent; } return false; }
/** * Checking from the current cursor position, check to see if we're inside a contiguous identifier. * * @return - */ protected boolean tokenContinues() { if (cursor == end) return false; else if (expr[cursor] == '.' || expr[cursor] == '[') return true; else if (isWhitespace(expr[cursor])) { int markCurrent = cursor; skipWhitespace(); if (cursor != end && (expr[cursor] == '.' || expr[cursor] == '[')) return true; cursor = markCurrent; } return false; }
/** * Handle a union between a closed statement and a residual property chain. * @param node * @return */ protected ASTNode handleUnion(ASTNode node) { if (cursor != length) { skipWhitespace(); int union = -1; switch (expr[cursor]) { case '.': union = cursor + 1; break; case '[': union = cursor; } if (union != -1) { captureToEOT(); return lastNode = new Union(expr, union, cursor, fields, node); } } return lastNode = node; }
skipWhitespace(); do { switch (expr[cursor]) { skipWhitespace(); break; skipWhitespace(); skipWhitespace(); break;
/** * Handle a union between a closed statement and a residual property chain. * * @param node an ast node * @return ASTNode */ protected ASTNode handleUnion(ASTNode node) { if (cursor != end) { skipWhitespace(); int union = -1; if (cursor < end) { switch (expr[cursor]) { case '.': union = cursor + 1; break; case '[': union = cursor; } } if (union != -1) { captureToEOT(); return lastNode = new Union(expr, union, cursor - union, fields, node, pCtx); } } return lastNode = node; }
skipWhitespace(); do { switch (expr[cursor]) { skipWhitespace(); break; skipWhitespace(); skipWhitespace(); break;
skipWhitespace(); do { switch (expr[cursor]) { skipWhitespace(); break; skipWhitespace(); skipWhitespace(); break;
/** * Handle a union between a closed statement and a residual property chain. * * @param node an ast node * @return ASTNode */ protected ASTNode handleUnion(ASTNode node) { if (cursor != end) { skipWhitespace(); int union = -1; if (cursor < end) { switch (expr[cursor]) { case '.': union = cursor + 1; break; case '[': union = cursor; } } if (union != -1) { captureToEOT(); return lastNode = new Union(expr, union, cursor - union, fields, node, pCtx); } } return lastNode = node; }
if (tk != null) { captureToNextTokenJunction(); skipWhitespace(); cond = expr[cursor] != '{' && expr[cursor] == 'i' && expr[++cursor] == 'f' && expr[cursor = incNextNonBlank()] == '('; skipWhitespace(); return _captureBlock(null, expr, false, type); skipWhitespace(); return _captureBlock(null, expr, true, type);
if (tk != null) { captureToNextTokenJunction(); skipWhitespace(); cond = expr[cursor] != '{' && expr[cursor] == 'i' && expr[++cursor] == 'f' && expr[cursor = incNextNonBlank()] == '('; skipWhitespace(); return _captureBlock(null, expr, false, type); skipWhitespace(); return _captureBlock(null, expr, true, type);
if (tk != null) { captureToNextTokenJunction(); skipWhitespace(); cond = expr[cursor] != '{' && expr[cursor] == 'i' && expr[++cursor] == 'f' && expr[cursor = incNextNonBlank()] == '('; skipWhitespace(); return _captureBlock(null, expr, false, type); skipWhitespace(); return _captureBlock(null, expr, true, type);
skipWhitespace(); if (cursor != end && expr[cursor] != ';') { switch (expr[cursor]) {
skipWhitespace(); if (cursor != end && expr[cursor] != ';') { switch (expr[cursor]) {
skipWhitespace(); if (cursor != length && expr[cursor] != ';') { switch (expr[cursor]) {
skipWhitespace(); if (cursor < end && expr[cursor] == ',') { st = ++cursor;
skipWhitespace(); if (cursor < length && expr[cursor] == ',') { start = ++cursor;