Пример #1
0
 public object Visit(MemberReferenceAction n, object o)
 {
     _useTmpString = true;   // write to tmp string and check before writing since this reference may contain invalid C# commands
     n.MemberReference.Accept(this, null);
     CheckAndWriteTmp();
     return(null);
 }
Пример #2
0
        private ActionNode ParseActionStatement()
        {
            ActionNode         itsAST;
            SourceCodePosition itsPos = _currentToken.SourcePosition;

            if (_currentToken.Type == Token.TokenType.Identifier)
            {
                MemberExpressionNode itsMemberExpr = MemberReference();
                if (_currentToken.Type == Token.TokenType.AssignmentOperator)
                {
                    itsAST = new AssigningActionNode(itsMemberExpr, Assigning(), itsPos);
                }
                else
                {
                    itsAST = new MemberReferenceAction(itsMemberExpr, itsPos);
                }
                Accept(Token.TokenType.Semicolon);
            }
            else if (_currentToken.Type == Token.TokenType.This)
            {
                ThisExpressionNode itsMemberExpr = ThisReference();
                if (_currentToken.Type == Token.TokenType.AssignmentOperator)
                {
                    itsAST = new AssigningActionNode(itsMemberExpr, Assigning(), itsPos);
                }
                else
                {
                    itsAST = new ThisReferenceAction(itsMemberExpr, itsPos);
                }
                Accept(Token.TokenType.Semicolon);
            }
            else
            {
                itsAST = ControlStatement();
            }
            return(itsAST);
        }
Пример #3
0
 public object Visit(MemberReferenceAction n, object o)
 {
     return(null);
 }