diff options
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.75.0/src/cs_top_is_question.cpp')
-rw-r--r-- | debian/uncrustify-trinity/uncrustify-trinity-0.75.0/src/cs_top_is_question.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.75.0/src/cs_top_is_question.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.75.0/src/cs_top_is_question.cpp new file mode 100644 index 00000000..4fd2fd66 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.75.0/src/cs_top_is_question.cpp @@ -0,0 +1,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); +} |