LCOV - code coverage report
Current view: top level - gcc/rust/expand - rust-proc-macro-invoc-lexer.h (source / functions) Coverage Total Hit
Test: gcc.info Lines: 0.0 % 5 0
Test Date: 2024-04-27 14:03:13 Functions: 0.0 % 1 0
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : // Copyright (C) 2020-2024 Free Software Foundation, Inc.
       2                 :             : 
       3                 :             : // This file is part of GCC.
       4                 :             : 
       5                 :             : // GCC is free software; you can redistribute it and/or modify it under
       6                 :             : // the terms of the GNU General Public License as published by the Free
       7                 :             : // Software Foundation; either version 3, or (at your option) any later
       8                 :             : // version.
       9                 :             : 
      10                 :             : // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
      11                 :             : // WARRANTY; without even the implied warranty of MERCHANTABILITY or
      12                 :             : // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      13                 :             : // for more details.
      14                 :             : 
      15                 :             : // You should have received a copy of the GNU General Public License
      16                 :             : // along with GCC; see the file COPYING3.  If not see
      17                 :             : // <http://www.gnu.org/licenses/>.
      18                 :             : 
      19                 :             : #ifndef RUST_PROC_MACRO_INVOC_LEXER_H
      20                 :             : #define RUST_PROC_MACRO_INVOC_LEXER_H
      21                 :             : 
      22                 :             : #include "rust-lex.h"
      23                 :             : #include "rust-macro-invoc-lexer.h"
      24                 :             : 
      25                 :             : namespace Rust {
      26                 :           0 : class ProcMacroInvocLexer : public MacroInvocLexerBase<const_TokenPtr>
      27                 :             : {
      28                 :             : public:
      29                 :           0 :   ProcMacroInvocLexer (std::vector<const_TokenPtr> stream)
      30                 :           0 :     : MacroInvocLexerBase (std::move (stream))
      31                 :           0 :   {}
      32                 :             : 
      33                 :             :   // Returns token n tokens ahead of current position.
      34                 :             :   const_TokenPtr peek_token (int n);
      35                 :             : 
      36                 :             :   // Peeks the current token.
      37                 :           0 :   const_TokenPtr peek_token () { return peek_token (0); }
      38                 :             : 
      39                 :             :   // Splits the current token into two. Intended for use with nested generics
      40                 :             :   // closes (i.e. T<U<X>> where >> is wrongly lexed as one token). Note that
      41                 :             :   // this will only work with "simple" tokens like punctuation.
      42                 :             :   void split_current_token (TokenId new_left, TokenId new_right);
      43                 :             : 
      44                 :             :   void split_current_token (std::vector<TokenPtr> new_tokens);
      45                 :             : };
      46                 :             : } // namespace Rust
      47                 :             : 
      48                 :             : #endif /* ! RUST_PROC_MACRO_INVOC_LEXER_H */
        

Generated by: LCOV version 2.1-beta

LCOV profile is generated on x86_64 machine using following configure options: configure --disable-bootstrap --enable-coverage=opt --enable-languages=c,c++,fortran,go,jit,lto,rust,m2 --enable-host-shared. GCC test suite is run with the built compiler.