Package freemarker.core.ast

Examples of freemarker.core.ast.Expression


        //        FMLexer token_source = new FMLexer(scs);
        FMLexer token_source = new FMLexer(scs);
        token_source.SwitchTo(FMConstants.EXPRESSION);
        FMParser parser = new FMParser(token_source);
        parser.setTemplate(caller.getTemplate());
        Expression exp = null;
        try {
            exp = parser.Exp();
        } catch (ParseException pe) {
            pe.setTemplateName(caller.getTemplate().getName());
            throw new TemplateException(pe, env);
        }
        return exp.getAsTemplateModel(env);
    }
View Full Code Here


* @version $Id: $
*/
public abstract class ExistenceBuiltIn extends BuiltIn {
    public TemplateModel get(Environment env, BuiltInExpression caller)
    throws TemplateException {
        final Expression target = caller.getTarget();
        try {
            return apply(target.getAsTemplateModel(env));
        }
        catch(InvalidReferenceException e) {
            if(!(target instanceof ParentheticalExpression)) {
                throw e;
            }
View Full Code Here

TOP

Related Classes of freemarker.core.ast.Expression

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.