Package org.rythmengine.internal.parser

Examples of org.rythmengine.internal.parser.RemoveLeadingLineBreakAndSpacesParser


    protected String patternStr() {
        return R;
    }

    public IParser create(IContext c) {
        return new RemoveLeadingLineBreakAndSpacesParser(c) {
            public Token go() {
                Regex r = reg(dialect());
                if (r.search(remain())) {
                    step(r.stringMatched().length());
                    String condition = r.stringMatched(2);
View Full Code Here


    public Keyword keyword() {
        return Keyword.NOSIM;
    }

    public IParser create(IContext ctx) {
        return new RemoveLeadingLineBreakAndSpacesParser(ctx) {
            public Token go() {
                Regex r = reg(dialect());
                if (r.search(remain())) {
                    String s = r.stringMatched();
                    step(s.length());
View Full Code Here

    protected String patternStr() {
        return R;
    }

    public IParser create(final IContext ctx) {
        return new RemoveLeadingLineBreakAndSpacesParser(ctx) {
            public Token go() {
                Regex r = reg(dialect());
                if (!r.search(remain())) {
                    raiseParseException("Error parsing @exec statement. Correct usage: @exec(myMacro)");
                }
View Full Code Here

    public Keyword keyword() {
        return Keyword.EXIT_IF_NO_CLASS;
    }

    public IParser create(final IContext ctx) {
        return new RemoveLeadingLineBreakAndSpacesParser(ctx) {
            public Token go() {
                Regex r = reg(dialect());
                if (!r.search(remain())) {
                    raiseParseException("error parsing @debug, correct usage: @__exitIfNoClass__(My.Class.Name)");
                }
View Full Code Here

//            }
//        };
//    }

    public IParser create(IContext ctx) {
        return new RemoveLeadingLineBreakAndSpacesParser(ctx) {
            public Token go() {
                Regex r = reg(dialect());
                if (!r.search(remain()))
                    raiseParseException("bad @section statement. Correct usage: @section(\"mySection\"){...}");
                int curLine = ctx().currentLine();
View Full Code Here

    protected String patternStr() {
        return R;
    }

    public IParser create(final IContext ctx) {
        return new RemoveLeadingLineBreakAndSpacesParser(ctx) {
            public Token go() {
                Regex r = reg(dialect());
                if (r.search(remain())) {
                    final String matched = r.stringMatched();
                    if (matched.startsWith("\n") || matched.endsWith("\n")) {
View Full Code Here

*/
public class ElseIfParser extends CaretParserFactoryBase {

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

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

TOP

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

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.