// Path: src/org/emberjs/lang/lexer/EmberJSTokenTypes.java
// public interface EmberJSTokenTypes extends JSTokenTypes {
//     EmberJSTokenType ESCAPE_SEQUENCE = new EmberJSTokenType("ESCAPE_SEQUENCE");
//     EmberJSTokenType INVALID_ESCAPE_SEQUENCE = new EmberJSTokenType("INVALID_ESCAPE_SEQUENCE");
//     EmberJSTokenType TRACK_BY_KEYWORD = new EmberJSTokenType("TRACK_BY_KEYWORD");
//     EmberJSTokenType ONE_TIME_BINDING = new EmberJSTokenType("ONE_TIME_BINDING");
// }


import com.intellij.lang.PsiBuilder;
import com.intellij.lang.javascript.JSBundle;
import com.intellij.lang.javascript.JSElementTypes;
import com.intellij.lang.javascript.JSTokenTypes;
import com.intellij.lang.javascript.JavaScriptSupportLoader;
import com.intellij.lang.javascript.parsing.ExpressionParser;
import com.intellij.lang.javascript.parsing.FunctionParser;
import com.intellij.lang.javascript.parsing.JavaScriptParser;
import com.intellij.lang.javascript.parsing.StatementParser;
import com.intellij.psi.tree.IElementType;
import org.emberjs.lang.lexer.EmberJSTokenTypes;
                if (!getExpressionParser().parseInExpression()) {
                    statement.drop();
                    return false;
                }
                statement.done(JSElementTypes.EXPRESSION_STATEMENT);
                return true;
            }
        };
    }

    public void parseEmber(IElementType root) {
        final PsiBuilder.Marker rootMarker = builder.mark();
        while (!builder.eof()) {
            getStatementParser().parseStatement();
        }
        rootMarker.done(root);
    }

    protected class EmberJSExpressionParser extends ExpressionParser<EmberJSParser> {
        public EmberJSExpressionParser() {
            super(EmberJSParser.this);
        }

        @Override
        protected boolean parseUnaryExpression() {
            final IElementType tokenType = builder.getTokenType();
            if (tokenType == JSTokenTypes.OR) {
                builder.advanceLexer();
                return true;
            }
// Path: src/org/emberjs/lang/lexer/EmberJSTokenTypes.java
// public interface EmberJSTokenTypes extends JSTokenTypes {
//     EmberJSTokenType ESCAPE_SEQUENCE = new EmberJSTokenType("ESCAPE_SEQUENCE");
//     EmberJSTokenType INVALID_ESCAPE_SEQUENCE = new EmberJSTokenType("INVALID_ESCAPE_SEQUENCE");
//     EmberJSTokenType TRACK_BY_KEYWORD = new EmberJSTokenType("TRACK_BY_KEYWORD");
//     EmberJSTokenType ONE_TIME_BINDING = new EmberJSTokenType("ONE_TIME_BINDING");
// }


// Path: src/org/emberjs/lang/parser/EmberJSParser.java
import com.intellij.lang.PsiBuilder;
import com.intellij.lang.javascript.JSBundle;
import com.intellij.lang.javascript.JSElementTypes;
import com.intellij.lang.javascript.JSTokenTypes;
import com.intellij.lang.javascript.JavaScriptSupportLoader;
import com.intellij.lang.javascript.parsing.ExpressionParser;
import com.intellij.lang.javascript.parsing.FunctionParser;
import com.intellij.lang.javascript.parsing.JavaScriptParser;
import com.intellij.lang.javascript.parsing.StatementParser;
import com.intellij.psi.tree.IElementType;
import org.emberjs.lang.lexer.EmberJSTokenTypes;

                if (!getExpressionParser().parseInExpression()) {
                    statement.drop();
                    return false;
                }
                statement.done(JSElementTypes.EXPRESSION_STATEMENT);
                return true;
            }
        };
    }

    public void parseEmber(IElementType root) {
        final PsiBuilder.Marker rootMarker = builder.mark();
        while (!builder.eof()) {
            getStatementParser().parseStatement();
        }
        rootMarker.done(root);
    }

    protected class EmberJSExpressionParser extends ExpressionParser<EmberJSParser> {
        public EmberJSExpressionParser() {
            super(EmberJSParser.this);
        }

        @Override
        protected boolean parseUnaryExpression() {
            final IElementType tokenType = builder.getTokenType();
            if (tokenType == JSTokenTypes.OR) {
                builder.advanceLexer();
                return true;
            }
            if (tokenType == EmberJSTokenTypes.ONE_TIME_BINDING) {