summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.75.0/src/cs_top_is_question.cpp
blob: 4fd2fd66d1d10ead2eb986ec52922a58a3169ec5 (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() ? nullptr : cs.Top()->m_pc;

   return(  chunk_is_token(pc, CT_QUESTION)
         && pc->level == level);
}