Package org.rythmengine.internal.parser

Examples of org.rythmengine.internal.parser.RemoveLeadingSpacesIfLineBreakParser


        }
    }
   
    @Override
    public IParser create(final IContext ctx) {
        return new RemoveLeadingSpacesIfLineBreakParser(ctx) {
            @Override
            public Token go() {
                Regex r = reg(dialect());
                if (!r.search(remain())) {
                    raiseParseException("Error parsing @if statement. Correct usage: @if (some-condition) {some-template-code}");
View Full Code Here


*/
public class ElseForParser extends CaretParserFactoryBase {

    @Override
    public IParser create(final IContext ctx) {
        return new RemoveLeadingSpacesIfLineBreakParser(ctx) {

            @Override
            public Token go() {
                IBlockHandler bh = ctx().currentBlock();
                if (null == bh || !(bh instanceof ForEachCodeToken)) return null;
View Full Code Here

public class ForEachParser extends KeywordParserFactory {

    public IParser create(final IContext ctx) {

        return new RemoveLeadingSpacesIfLineBreakParser(ctx) {
            public Token go() {
                Regex r = new Regex(String.format(patternStr2(), dialect().a(), keyword()));
                String remain = remain();
                if (!r.search(remain)) {
                    raiseParseException("Error parsing @for statement, correct usage: @for(Type var: Iterable){...} or @for(int i = ...)");
View Full Code Here

TOP

Related Classes of org.rythmengine.internal.parser.RemoveLeadingSpacesIfLineBreakParser

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.