Package freemarker.core.parser

Examples of freemarker.core.parser.ParsingProblem


  public void visit(LibraryLoad node) {
    String namespaceName = node.getNamespace();
    if (template.strictVariableDeclaration() &&
        template.declaresVariable(namespaceName)) {
      String msg = "The variable "+namespaceName + " is already declared and should not be used as a namespace name to import.";
      template.addParsingProblem(new ParsingProblem(msg, node));
    }
    template.declareVariable(namespaceName);
    super.visit(node);
  }
View Full Code Here


                !key.equals(Configurable.DATETIME_FORMAT_KEY) &&
                !key.equals(Configurable.TIME_ZONE_KEY) &&
                !key.equals(Configurable.BOOLEAN_FORMAT_KEY) &&
                !key.equals(Configurable.URL_ESCAPING_CHARSET_KEY))
            {
            ParsingProblem problem = new ParsingProblem("Invalid setting name, or it is not allowed to change the "
                        + "value of the setting with FTL: "
                        + key, node);
            template.addParsingProblem(problem);
            }
    }
View Full Code Here

      if (value == TemplateModel.INVALID_EXPRESSION) {
        msg = "Invalid expression: " + exp.getSource();
      } else {
        msg = "Expression: " + exp.getSource() + " is not a boolean (true/false) value.";
      }
      template.addParsingProblem(new ParsingProblem(msg, exp));
    }
  }
View Full Code Here

      if (value == TemplateModel.INVALID_EXPRESSION) {
        msg = "Invalid expression: " + exp.getSource();
      } else {
        msg = "Expression: " + exp.getSource() + " is not a string.";
      }
      template.addParsingProblem(new ParsingProblem(msg, exp));
    }
  }
View Full Code Here

      if (value == TemplateModel.INVALID_EXPRESSION) {
        msg = "Invalid expression: " + exp.getSource();
      } else {
        msg = "Expression: " + exp.getSource() + " is not a numerical value.";
      }
      template.addParsingProblem(new ParsingProblem(msg, exp));
    }
  }
View Full Code Here

      if (value == TemplateModel.INVALID_EXPRESSION) {
        msg = "Invalid expression: " + exp.getSource();
      } else {
        msg = "Expression: " + exp.getSource() + " is not a string, date, or number.";
      }
      template.addParsingProblem(new ParsingProblem(msg, exp));
    }
  }
View Full Code Here

TOP

Related Classes of freemarker.core.parser.ParsingProblem

Copyright © 2018 www.massapicom. 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.