Examples of currentLine()


Examples of org.rythmengine.internal.IContext.currentLine()

        if (!r.search(ctx.getRemain())) return null;
        if (!ctx.getDialect().enableScripting()) {
            throw new TemplateParser.ScriptingDisabledException(ctx);
        }
        String s = r.stringMatched(1);
        int curLine = ctx.currentLine();
        ctx.step(s.length());
        s = r.stringMatched(2);
        s = s.substring(1); // strip left "{"
        s = s.substring(0, s.length() - 1); // strip right "}"
        r = new Regex(".*[ \\t\\n\\r\\}]+if[ \\t]*\\(.*");
 
View Full Code Here

Examples of org.rythmengine.internal.IContext.currentLine()

                    String s = matched;
                    if (matched.indexOf('@') > -1) {
                        // process internal template
                        char ch = s.charAt(0);
                        s = s.substring(1); //prevent CodeTypeBlockStartSensor to sense it again
                        String code = ctx.getCodeBuilder().addInlineInclude(s, ctx.currentLine());
                        if (matched.endsWith("\n")) {
                            code = code + ";p(\"\\n\");";
                        }
                        s = String.format("p('%s');", String.valueOf(ch)) + code + String.format(";__ctx.pushCodeType(%s);", type.newInstanceStr());
                    } else {
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.