Package org.rythmengine.internal

Examples of org.rythmengine.internal.Token


                    // propName: name
                }
                final String propName = s;
                final String propDefVal = r.stringMatched(4);
                logger.warn("@get directive is deprecated. Please follow instruction at http://rythmengine.org/doc/directive.md#get to change your code");
                return new Token("", ctx()) {
                    @Override
                    protected void output() {
                        p("\np(__getRenderProperty(\"").p(propName).p("\", ").p(propDefVal == null ? "null" : propDefVal).p("));");
                    }
                };
View Full Code Here


                    // propName: name
                }
                final String propName = s;
                final String propVal = r.stringMatched(2);
                logger.warn("@set directive is deprecated. Please follow instruction at http://rythmengine.org/doc/directive.md#get to change your code");
                return new Token("", ctx()) {
                    @Override
                    protected void output() {
                        p("\n__setRenderProperty(\"").p(propName).p("\",").p(propVal).p(");");
                    }
                };
View Full Code Here

                    step(matched.length());
                    String s0 = r.stringMatched(3);
                    s0 = S.strip(s0, "{", "}");
                    s0 = S.strip(s0, "\n", "\n");
                    final String s = s0;
                    return new Token(s, ctx(), true) {
                        @Override
                        protected void output() {
                            s = compact(s);
                            s = s.replaceAll("(\\r?\\n)+", "\\\\n").replaceAll("\"", "\\\\\"");
                            p("p(org.rythmengine.utils.S.raw(\"").p(s).p("\"));");
View Full Code Here

        Matcher m = P.matcher(remain());
        if (m.matches()) {
            String s = m.group(1);
            IParser p = d.createBuildInParser(s, c);
            if (null != p) {
                Token tb = p.go();
                if (null != tb) return F.T2(p, tb);
            }
        }
        for (IParserFactory f : d.freeParsers()) {
            IParser p = f.create(c);
            Token tb = p.go();
            if (null != tb) return F.T2(p, tb);
        }
        return null;
    }
View Full Code Here

                    }
                }
                return new BlockCodeToken("", ctx()) {
                    @Override
                    public void openBlock() {
                        ctx().getCodeBuilder().addBuilder(new Token("", ctx()) {
                            @Override
                            protected void output() {
                                ctx().pushCompact(false);
                                super.output();
                            }
                        });
                    }

                    @Override
                    public String closeBlock() {
                        ctx().getCodeBuilder().addBuilder(new Token("", ctx()) {
                            @Override
                            protected void output() {
                                ctx().popCompact();
                                super.output();
                            }
View Full Code Here

                    }
                }
                return new BlockCodeToken("", ctx()) {
                    @Override
                    public void openBlock() {
                        ctx().getCodeBuilder().addBuilder(new Token("", ctx()) {
                            @Override
                            protected void output() {
                                ctx().pushCompact(true);
                                super.output();
                            }
                        });
                    }

                    @Override
                    public String closeBlock() {
                        ctx().getCodeBuilder().addBuilder(new Token("", ctx()) {
                            @Override
                            protected void output() {
                                ctx().popCompact();
                                super.output();
                            }
View Full Code Here

TOP

Related Classes of org.rythmengine.internal.Token

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.