Package webit.script.core.ast

Examples of webit.script.core.ast.TemplateAST


    public void reload() throws ParseException {
        parse(true);
    }

    private TemplateAST parse(boolean force) throws ParseException {
        TemplateAST myAst = this.ast;
        synchronized (this) {
            if (force || myAst == null || this.resource.isModified()) {
                myAst = new Parser().parse(this);
                this.ast = myAst;
                this.lastModified = System.currentTimeMillis();
View Full Code Here


     * @throws ScriptRuntimeException
     * @throws ParseException
     */
    public Context merge(final KeyValues root, final Out out) throws ScriptRuntimeException, ParseException {
        try {
            final TemplateAST myAst;
            return (((myAst = this.ast) == null || this.resource.isModified())
                    ? parse(false)
                    : myAst)
                    .execute(new Context(this, out, root));
        } catch (Exception e) {
View Full Code Here

     * @throws ScriptRuntimeException
     * @throws ParseException
     */
    public Context merge(final Context context, KeyValues params) throws ScriptRuntimeException, ParseException {
        try {
            final TemplateAST myAst;
            return (((myAst = this.ast) == null || this.resource.isModified())
                    ? parse(false)
                    : myAst)
                    .execute(context);
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of webit.script.core.ast.TemplateAST

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.