Package ch.njol.skript.log

Examples of ch.njol.skript.log.ParseLogHandler.printLog()


      for (final Class<? extends T> c : types) {
        log.clear();
        assert c != null;
        final T t = Classes.parse(expr, c, context);
        if (t != null) {
          log.printLog();
          return new SimpleLiteral<T>(t, false);
        }
      }
      log.printError();
      return null;
View Full Code Here


   
    final ParseLogHandler log = SkriptLogger.startParseLogHandler();
    try {
      final Expression<? extends T> r = parseSingleExpr(false, null, types);
      if (r != null) {
        log.printLog();
        return r;
      }
      log.clear();
     
      final List<Expression<? extends T>> ts = new ArrayList<Expression<? extends T>>();
View Full Code Here

      }
     
      if (pieces.size() == 1) { // not a list of expressions, and a single one has failed to parse above
        if (expr.startsWith("(") && expr.endsWith(")") && next(expr, 0, context) == expr.length()) {
          log.clear();
          log.printLog();
          return new SkriptParser(this, "" + expr.substring(1, expr.length() - 1)).parseExpression(types);
        }
        if (isObject && (flags & PARSE_LITERALS) != 0) { // single expression - can return an UnparsedLiteral now
          log.clear();
          log.printLog();
View Full Code Here

          log.printLog();
          return new SkriptParser(this, "" + expr.substring(1, expr.length() - 1)).parseExpression(types);
        }
        if (isObject && (flags & PARSE_LITERALS) != 0) { // single expression - can return an UnparsedLiteral now
          log.clear();
          log.printLog();
          return (Expression<? extends T>) new UnparsedLiteral(expr, log.getError());
        }
        // results in useless errors most of the time
//        log.printError("'" + expr + "' " + Language.get("is") + " " + notOfType(types), ErrorQuality.NOT_AN_EXPRESSION);
        log.printError();
View Full Code Here

//      if (end != expectedEnd) {
//        log.printError("'" + lastExpr + "' " + Language.get("is") + " " + notOfType(types), ErrorQuality.NOT_AN_EXPRESSION);
//        return null;
//      }
     
      log.printLog();
     
      if (ts.size() == 1)
        return ts.get(0);
     
      if (and.isUnknown())
View Full Code Here

        final FunctionReference<T> e = new FunctionReference<T>(functionName, SkriptLogger.getNode(), types, params.toArray(new Expression[params.size()]));
        if (!e.validateFunction(true)) {
          log.printError();
          return null;
        }
        log.printLog();
        return e;
      }
      log.printLog();
      return null;
    } finally {
View Full Code Here

          return null;
        }
        log.printLog();
        return e;
      }
      log.printLog();
      return null;
    } finally {
      log.stop();
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.