LCOV - code coverage report
Current view: top level - libreoffice/autodoc/source/parser_i/idl - cx_sub.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 48 58 82.8 %
Date: 2012-12-27 Functions: 8 8 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include <precomp.h>
      21             : #include <s2_luidl/cx_sub.hxx>
      22             : 
      23             : 
      24             : 
      25             : // NOT FULLY DECLARED SERVICES
      26             : #include <s2_luidl/tokrecv.hxx>
      27             : #include <../../parser/inc/tokens/parseinc.hxx>
      28             : #include <x_parse2.hxx>
      29             : #include <s2_luidl/tk_const.hxx>
      30             : 
      31             : 
      32             : 
      33             : namespace csi
      34             : {
      35             : namespace uidl
      36             : {
      37             : 
      38             : bool
      39       39501 : Cx_Base::PassNewToken()
      40             : {
      41       39501 :     if (pNewToken)
      42             :     {
      43        3348 :         rReceiver.Receive(*pNewToken.Release());
      44        3348 :         return true;
      45             :     }
      46       36153 :     return false;
      47             : }
      48             : 
      49             : TkpContext &
      50       39501 : Cx_Base::FollowUpContext()
      51             : {
      52             :     csv_assert(pFollowUpContext != 0);
      53       39501 :     return *pFollowUpContext;
      54             : }
      55             : 
      56             : void
      57       12638 : Context_MLComment::ReadCharChain( CharacterSource & io_rText )
      58             : {
      59       12638 :     char cNext = NULCH;
      60             : 
      61       83275 :     do {
      62      150182 :         do {
      63      150182 :             cNext = jumpTo(io_rText,'*','\n');
      64      150182 :             if (cNext == '\n')
      65             :             {
      66       66921 :                 Receiver().Increment_CurLine();
      67       66921 :                 cNext = io_rText.MoveOn();
      68             :             }
      69       83261 :             else if (cNext == NULCH)
      70           0 :                 throw X_AutodocParser(X_AutodocParser::x_UnexpectedEOF);
      71             :         } while (cNext != '*');
      72             : 
      73       83275 :         cNext = jumpOver(io_rText,'*');
      74       83275 :         if (cNext == NULCH)
      75           0 :             throw X_AutodocParser(X_AutodocParser::x_UnexpectedEOF);
      76             :     } while (cNext != '/');
      77       12638 :     io_rText.MoveOn();
      78       12638 :     io_rText.CutToken();
      79       12638 :     SetToken(0);
      80       12638 : }
      81             : 
      82             : void
      83        2484 : Context_SLComment::ReadCharChain( CharacterSource & io_rText )
      84             : {
      85        2484 :     jumpToEol(io_rText);
      86        2484 :     if (io_rText.CurChar() != NULCH)
      87        2484 :         jumpOverEol(io_rText);
      88        2484 :     io_rText.CutToken();
      89        2484 :     SetToken(0);
      90             : 
      91        2484 :     Receiver().Increment_CurLine();
      92        2484 : }
      93             : 
      94             : void
      95       21031 : Context_Praeprocessor::ReadCharChain( CharacterSource & io_rText )
      96             : {
      97       21031 :     jumpToEol(io_rText);
      98       21031 :     if (io_rText.CurChar() != NULCH)
      99       21031 :         jumpOverEol(io_rText);
     100       21031 :     io_rText.CutToken();
     101       21031 :     SetToken(0);
     102             : 
     103       21031 :     Receiver().Increment_CurLine();
     104       21031 : }
     105             : 
     106             : void
     107        3348 : Context_Assignment::ReadCharChain( CharacterSource &    io_rText )
     108             : {
     109             :     // KORR_FUTURE
     110             :     // How to handle new lines within this, so he y get realised by
     111             :     //  ParserInfo?
     112             : 
     113        3348 :     char cNext = NULCH;
     114        3348 :     do {
     115        3348 :         if ( (cNext = jumpTo(io_rText,';',',','"','}')) == NULCH )
     116           0 :             throw X_AutodocParser(X_AutodocParser::x_UnexpectedEOF);
     117        3348 :         if (cNext == '"')
     118             :         {
     119           0 :             cNext = io_rText.MoveOn();
     120           0 :             while (cNext != '"')
     121             :             {
     122           0 :                 if ( (cNext = jumpTo(io_rText,'"','\\')) == NULCH )
     123           0 :                     throw X_AutodocParser(X_AutodocParser::x_UnexpectedEOF);
     124           0 :                 if (cNext == '\\')
     125           0 :                     io_rText.MoveOn();
     126             :             }
     127           0 :             cNext = io_rText.MoveOn();
     128             :         }   // endif (cNext == '"')
     129             :     } while (cNext != ';' AND cNext != ',' AND cNext != '}');
     130             : 
     131        3348 :     if (cNext == ',' OR cNext == ';')
     132        3343 :         io_rText.MoveOn();
     133        3348 :     SetToken(new TokAssignment(io_rText.CutToken()));
     134        3348 : }
     135             : 
     136             : 
     137             : }   // namespace uidl
     138           3 : }   // namespace csi
     139             : 
     140             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10