예제 #1
0
        /// <summary>
        /// Проверка на вложеный блочный коммантарий /* */
        /// </summary>
        /// <returns></returns>
        private bool Commnet1()
        {
            var state = _state;
            NextCh();

            if (Ch == '*')
            {
                NextCh();
                while (!Eof)
                {
                    if (Ch == '*')
                    {
                        NextCh();
                        if (Ch == '/')
                        {
                            NextCh();
                            return true;
                        }

                    }

                    NextCh();
                }
            }

            _state = state;
            return false;
        }
예제 #2
0
        /// <summary>
        /// Проверка на коментарий от // до конца строки
        /// </summary>
        /// <returns></returns>
        private bool Commnet0()
        {
            var state = _state;
            NextCh();

            if ( Ch == '/' )
            {
                NextCh();
                while (Ch != '\n' && !Eof) NextCh();
                return true;
            }

            _state = state;
            return false;
        }