예제 #1
0
        private BindingParserNode ReadSemicolonSeparatedExpression()
        {
            var startIndex = CurrentIndex;
            var first      = ReadUnsupportedOperatorExpression();

            if (Peek() is BindingToken operatorToken && operatorToken.Type == BindingTokenType.Semicolon)
            {
                Read();

                var second = Peek() == null
                    ? new VoidBindingParserNode()
                    : ReadSemicolonSeparatedExpression();

                if (second is IdentifierNameBindingParserNode identifier && identifier.Name.Length == 0)
                {
                    second = new VoidBindingParserNode();
                }

                first = CreateNode(new BlockBindingParserNode(first, second), startIndex);
            }
            return(first);
        }
예제 #2
0
 protected virtual T VisitVoid(VoidBindingParserNode node)
 {
     return(DefaultVisit(node));
 }