private Components.Aphid.Parser.Expression ParseBinaryAndExpression() { Components.Aphid.Parser.Expression operand = this.ParseShiftExpression(); for ( ; (this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.BinaryAndOperator); ) { Components.Aphid.Lexer.AphidTokenType op = this._currentToken.TokenType; this.NextToken(); operand = new Components.Aphid.Parser.BinaryOperatorExpression(operand, op, this.ParseShiftExpression()); } return(operand); }
private Components.Aphid.Parser.Expression ParsePipelineExpression() { Components.Aphid.Parser.Expression operand = this.ParseLogicalExpression(); for ( ; (this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.PipelineOperator); ) { Components.Aphid.Lexer.AphidTokenType op = this._currentToken.TokenType; this.NextToken(); operand = new Components.Aphid.Parser.BinaryOperatorExpression(operand, op, this.ParseLogicalExpression()); } return(operand); }
private Components.Aphid.Parser.Expression ParseAdditionExpression() { Components.Aphid.Parser.Expression operand = this.ParseTerm(); for ( ; ((this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.AdditionOperator) || (this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.MinusOperator)); ) { Components.Aphid.Lexer.AphidTokenType op = this._currentToken.TokenType; this.NextToken(); operand = new Components.Aphid.Parser.BinaryOperatorExpression(operand, op, this.ParseTerm()); } return(operand); }
private Components.Aphid.Parser.Expression ParseTerm() { Components.Aphid.Parser.Expression operand = this.ParsePrefixUnaryOperatorExpression(); for ( ; (((this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.MultiplicationOperator) || (this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.DivisionOperator)) || (this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.ModulusOperator)); ) { Components.Aphid.Lexer.AphidTokenType op = this._currentToken.TokenType; this.NextToken(); operand = new Components.Aphid.Parser.BinaryOperatorExpression(operand, op, this.ParsePrefixUnaryOperatorExpression()); } return(operand); }
private Components.Aphid.Parser.Expression ParseComparisonExpression() { Components.Aphid.Parser.Expression operand = this.ParsePostfixUnaryOperationExpression(); for ( ; ((((((this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.EqualityOperator) || (this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.NotEqualOperator)) || (this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.LessThanOperator)) || (this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.LessThanOrEqualOperator)) || (this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.GreaterThanOperator)) || (this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.GreaterThanOrEqualOperator)); ) { Components.Aphid.Lexer.AphidTokenType op = this._currentToken.TokenType; this.NextToken(); operand = new Components.Aphid.Parser.BinaryOperatorExpression(operand, op, this.ParsePostfixUnaryOperationExpression()); } return(operand); }
private Components.Aphid.Parser.Expression ParseAssignmentExpression() { Components.Aphid.Parser.Expression operand = this.ParsePipelineExpression(); for ( ; ((((((((this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.AssignmentOperator) || (this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.PlusEqualOperator)) || (this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.MinusEqualOperator)) || (this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.MultiplicationEqualOperator)) || (this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.DivisionEqualOperator)) || (this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.ModulusEqualOperator)) || (this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.OrEqualOperator)) || (this._currentToken.TokenType == Components.Aphid.Lexer.AphidTokenType.XorEqualOperator)); ) { Components.Aphid.Lexer.AphidTokenType op = this._currentToken.TokenType; this.NextToken(); operand = new Components.Aphid.Parser.BinaryOperatorExpression(operand, op, this.ParsePipelineExpression()); } return(operand); }