Bike.Parser.Parser.ParseWhileStatement C# (CSharp) Method

ParseWhileStatement() public method

public ParseWhileStatement ( ) : WhileStatement
return WhileStatement
        public WhileStatement ParseWhileStatement()
        {
            var whileStatement = new WhileStatement { Token = Next() };
            Match(TokenType.While);
            Match(TokenType.LeftParen);
            whileStatement.Condition = ParseAssignmentExpression();
            Match(TokenType.RightParen);
            whileStatement.Body = ParseStatement();
            return whileStatement;
        }