summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/src/cs_top_is_question.cpp
blob: b9b5b9583ae0bb74caba568c23c4a119cde63583 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**
 * @file cs_top_is_question.cpp
 *
 * @author  Guy Maurel
 * @license GPL v2+
 * extract from combine.cpp
 */

#include "cs_top_is_question.h"

#include "chunk.h"


bool cs_top_is_question(ChunkStack &cs, size_t level)
{
   Chunk *pc = cs.Empty() ? Chunk::NullChunkPtr : cs.Top()->m_pc;

   return(  pc->Is(CT_QUESTION)
         && pc->GetLevel() == level);
}