summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/src/align_tools.h
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2023-12-01 12:38:43 +0900
committerMichele Calgaro <[email protected]>2023-12-01 12:38:43 +0900
commitb67b7f2b784c7105e88a5e639d9d84736ae2cbc1 (patch)
tree0fd16d439c681c07d57d7f0d544c7582e04c3a31 /debian/uncrustify-trinity/uncrustify-trinity-0.78.1/src/align_tools.h
parentc0a6f1b84c84749908961579b84513fd9f9d9eac (diff)
downloadextra-dependencies-b67b7f2b784c7105e88a5e639d9d84736ae2cbc1.tar.gz
extra-dependencies-b67b7f2b784c7105e88a5e639d9d84736ae2cbc1.zip
uncrustify-trinity: updated based on upstream version 0.78.1
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.1/src/align_tools.h')
-rw-r--r--debian/uncrustify-trinity/uncrustify-trinity-0.78.1/src/align_tools.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/src/align_tools.h b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/src/align_tools.h
new file mode 100644
index 00000000..897e2da2
--- /dev/null
+++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/src/align_tools.h
@@ -0,0 +1,48 @@
+/**
+ * @file align_tools.h
+ *
+ * @author Guy Maurel
+ * split from align.cpp
+ * @author Ben Gardner
+ * @license GPL v2+
+ */
+
+#ifndef ALIGN_TOOLS_H_INCLUDED
+#define ALIGN_TOOLS_H_INCLUDED
+
+#include "chunk.h"
+#include "uncrustify_types.h"
+
+
+/**
+ * @brief return the chunk the follows after a C array
+ *
+ * The provided chunk is considered an array if it is an opening square
+ * (CT_SQUARE_OPEN) and the matching close is followed by an equal sign '='
+ *
+ * Example: array[25] = 12;
+ * /|\ /|\
+ * | |
+ * provided chunk has to point to [ |
+ * returned chunk points to 12
+ *
+ * @param chunk chunk to operate on
+ *
+ * @return the chunk after the '=' if the check succeeds
+ * @return Chunk::NullChunkPtr in all other cases
+ */
+Chunk *skip_c99_array(Chunk *sq_open);
+
+/**
+ * Scans a line for stuff to align on.
+ *
+ * We trigger on BRACE_OPEN, FPAREN_OPEN, ASSIGN, and COMMA.
+ * We want to align the NEXT item.
+ */
+Chunk *scan_ib_line(Chunk *start);
+
+void ib_shift_out(size_t idx, size_t num);
+
+Chunk *step_back_over_member(Chunk *pc);
+
+#endif /* ALIGN_TOOLS_H_INCLUDED */