public override Node VisitEqualityExpression(ECMAScriptParser.EqualityExpressionContext context)
        {
            var anOperator = context.children[1].GetText();

            if (anOperator == "==" || anOperator == "!=")
            {
                throw new NotImplementedException(
                          GenerateErrorMessage(context, "only '===' and '!==' equality operators are supported."));
            }
            return(new BinaryExpression(
                       context,
                       OperatorsUtils.BinaryOperatorFromString(anOperator),
                       (Expression)Visit(context.singleExpression()[0]),
                       (Expression)Visit(context.singleExpression()[1])
                       ));
        }
Пример #2
0
 public UstNode VisitEqualityExpression([NotNull] ECMAScriptParser.EqualityExpressionContext context)
 {
     return(CreateBinaryOperatorExpression(
                context.singleExpression(0), context.GetChild <ITerminalNode>(0), context.singleExpression(1)));
 }