uncrustify: updated to version 0.73

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/3/head
Michele Calgaro 4 years ago
parent 6eae1a16a1
commit 71fb4a1391
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -1,3 +0,0 @@
TODO list:
* Convert copyright file to machine-readable format.

@ -1,7 +0,0 @@
[DEFAULT]
compression = xz
[import-orig]
upstream-branch = upstream-nondfsg
pristine-tar = False
merge = False

@ -1,30 +0,0 @@
Backported commit 45681e88 from upstream git repository. This fixes FTBFS on ppcel and armxx archs.
--- a/src/output.cpp
+++ b/src/output.cpp
@@ -544,11 +544,7 @@
{
for (auto *ch = pc->text(); *ch != '\0'; ++ch)
{
- if ( *ch > 0
- || !chunk_is_token(pc, CT_COMMENT_MULTI))
- {
- fprintf(pfile, "%c", *ch);
- }
+ fprintf(pfile, "%c", *ch);
if (*ch == '"')
{
--- a/tests/cli/output/class_enum_struct_union.csv
+++ b/tests/cli/output/class_enum_struct_union.csv
@@ -1,9 +1,9 @@
number of loops,4,
language,CPP,
Line,Tag,Parent_type,Type of the parent,Column,Orig Col Strt,Orig Col End,Orig Sp Before,Br,Lvl,pp,Flags,Nl Before,Nl After,Text,
-1,COMMENT_MULTI,COMMENT_WHOLE,PARENT_NOT_SET,1,4,7,3,0,0,0,"",9,0," /** * the enum (and variable declarations thereof) could be of * the following forms: * * ""enum type [: integral_type] { ... } [x, ...]"" * ""enum type [: integral_type]"" * ""enum class type [: integral_type] { ... } [x, ...]"" * ""enum class type [: integral_type]"" * ""enum [: integral_type] { ... } x, ..."" */"
+1,COMMENT_MULTI,COMMENT_WHOLE,PARENT_NOT_SET,1,4,7,3,0,0,0,"",9,0," /**␤ * the enum (and variable declarations thereof) could be of␤ * the following forms:␤ *␤ * ""enum type [: integral_type] { ... } [x, ...]""␤ * ""enum type [: integral_type]""␤ * ""enum class type [: integral_type] { ... } [x, ...]""␤ * ""enum class type [: integral_type]""␤ * ""enum [: integral_type] { ... } x, ...""␤ */"
10,NEWLINE,NONE,PARENT_NOT_SET,7,7,4,0,0,0,0,"",2,0,
-12,COMMENT_MULTI,COMMENT_WHOLE,PARENT_NOT_SET,1,4,7,0,0,0,0,"",9,0," /** * the class/struct (and variable declarations thereof) could be of * the following forms: * * template<...> class/struct[<...>] [macros/attributes ...] type [: bases ...] { } * template<...> class/struct[<...>] [macros/attributes ...] type * class/struct[ [macros/attributes ...] type [: bases ...] { } [x, ...] * class/struct [macros/attributes ...] type [x, ...] * class/struct [macros/attributes ...] [: bases] { } x, ... */"
+12,COMMENT_MULTI,COMMENT_WHOLE,PARENT_NOT_SET,1,4,7,0,0,0,0,"",9,0," /**␤ * the class/struct (and variable declarations thereof) could be of␤ * the following forms:␤ *␤ * template<...> class/struct[<...>] [macros/attributes ...] type [: bases ...] { }␤ * template<...> class/struct[<...>] [macros/attributes ...] type␤ * class/struct[ [macros/attributes ...] type [: bases ...] { } [x, ...]␤ * class/struct [macros/attributes ...] type [x, ...]␤ * class/struct [macros/attributes ...] [: bases] { } x, ...␤ */"
21,NEWLINE,NONE,PARENT_NOT_SET,7,7,1,0,0,0,0,"",2,0,
23,PREPROC,PP_DEFINE,PARENT_NOT_SET,1,1,2,0,1,1,0,"IN_PREPROC,STMT_START,EXPR_START,DONT_INDENT,PUNCTUATOR",0,0," #"
23,PP_DEFINE,NONE,PARENT_NOT_SET,2,2,8,0,1,1,0,"IN_PREPROC,FORCE_SPACE",0,0," define"

@ -1,25 +0,0 @@
Backported commit 64d93e3fb from upstream git repository.
--- a/src/align_func_proto.cpp
+++ b/src/align_func_proto.cpp
@@ -47,8 +47,8 @@
log_rule_B("align_var_def_amp_style");
size_t myamp_style = options::align_var_def_amp_style();
- const size_t max_level_count = 8;
- const size_t max_brace_level = 8;
+ const size_t max_level_count = 16;
+ const size_t max_brace_level = 16;
AlignStack many_as[max_level_count + 1][max_brace_level + 1];
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -194,7 +194,7 @@
return;
}
// the value of buffer_length is experimental
- const int buffer_length = 4100;
+ const int buffer_length = 40000;
char buf[buffer_length];
// it MUST be a 'unsigned int' variable to be runable under windows

@ -1,183 +0,0 @@
Backported commits 5f3f392a and fb66774e from upstream. This solves upstream issues 3040.
--- a/src/braces.cpp
+++ b/src/braces.cpp
@@ -1290,7 +1290,7 @@
static chunk_t *mod_case_brace_add(chunk_t *cl_colon)
{
LOG_FUNC_ENTRY();
- LOG_FMT(LMCB, "%s(%d): line %zu",
+ LOG_FMT(LMCB, "%s(%d): line %zu\n",
__func__, __LINE__, cl_colon->orig_line);
chunk_t *pc = cl_colon;
@@ -1309,7 +1309,28 @@
&& ( chunk_is_token(pc, CT_CASE)
|| chunk_is_token(pc, CT_BREAK)))
{
- last = pc;
+ // check if previous line is a preprocessor Issue #3040
+ chunk_t *prev = chunk_get_prev_ncnl(pc);
+ LOG_FMT(LMCB, "%s(%d): prev->text() is '%s', orig_line %zu\n",
+ __func__, __LINE__, prev->text(), prev->orig_line);
+
+ if ( chunk_is_preproc(prev)
+ && chunk_is_not_token(prev, CT_PP_ENDIF))
+ {
+ // previous line is a preprocessor, but NOT #endif
+ while (chunk_is_preproc(prev))
+ {
+ prev = chunk_get_prev_ncnl(prev);
+ }
+ chunk_t *next_prev = chunk_get_next_ncnl(prev);
+ LOG_FMT(LMCB, "%s(%d): next_prev->text() is '%s', orig_line %zu\n",
+ __func__, __LINE__, next_prev->text(), next_prev->orig_line);
+ last = next_prev;
+ }
+ else
+ {
+ last = pc;
+ }
break;
}
}
--- /dev/null
+++ b/tests/config/Issue_3040.cfg
@@ -0,0 +1,7 @@
+indent_columns = 2
+indent_switch_case = 2
+nl_before_case = true
+nl_after_case = true
+eat_blanks_before_close_brace = true
+mod_move_case_break = true
+mod_case_brace = force
--- a/tests/cpp.test
+++ b/tests/cpp.test
@@ -827,6 +827,7 @@
34322 issue_2623_1.cfg cpp/issue_2623.cpp
34323 issue_2623_2.cfg cpp/issue_2623.cpp
34324 issue_2623_3.cfg cpp/issue_2623.cpp
+34326 Issue_3040.cfg cpp/Issue_3040.cpp
# Adopt some UT tests
10000 empty.cfg cpp/621_this-spacing.cpp
--- /dev/null
+++ b/tests/expected/cpp/34326-Issue_3040.cpp
@@ -0,0 +1,62 @@
+void main()
+{
+ switch (opcode ) {
+
+ case LocaleCompare:
+ {
+ return Number(localeCompare(s, a0.toString(exec)));
+ }
+
+#ifndef KJS_PURE_ECMA
+ case Big:
+ {
+ result = String("<big>" + s + "</big>");
+ break;
+ }
+#endif
+ }
+
+ switch (ev->command)
+ {
+ case (MIDI_NOTEON):
+ {
+ ev->note = *ptrdata; ptrdata++; currentpos++;
+ ev->vel = *ptrdata; ptrdata++; currentpos++;
+ if (ev->vel==0)
+ note[ev->chn][ev->note]=FALSE;
+ else
+ note[ev->chn][ev->note]=TRUE;
+
+#ifdef TRACKDEBUG2
+ if (ev->chn==6) {
+ if (ev->vel==0) printfdebug("Note Onf\n");
+ else printfdebug("Note On\n");
+ };
+#endif
+ break;
+ }
+
+ case (MIDI_NOTEOFF):
+ {
+#ifdef TRACKDEBUG2
+ if (ev->chn==6) printfdebug("Note Off\n");
+#endif
+ ev->note = *ptrdata; ptrdata++; currentpos++;
+ ev->vel = *ptrdata; ptrdata++; currentpos++;
+ note[ev->chn][ev->note]=FALSE;
+
+ break;
+ }
+
+ case (MIDI_KEY_PRESSURE):
+ {
+#ifdef TRACKDEBUG2
+ if (ev->chn==6) printfdebug ("Key press\n");
+#endif
+ ev->note = *ptrdata; ptrdata++; currentpos++;
+ ev->vel = *ptrdata; ptrdata++; currentpos++;
+ break;
+ }
+ }
+}
+
--- /dev/null
+++ b/tests/input/cpp/Issue_3040.cpp
@@ -0,0 +1,52 @@
+void main()
+{
+ switch (opcode ) {
+
+ case LocaleCompare:
+ return Number(localeCompare(s, a0.toString(exec)));
+
+#ifndef KJS_PURE_ECMA
+ case Big:
+ result = String("<big>" + s + "</big>");
+ break;
+#endif
+
+ }
+
+ switch (ev->command)
+ {
+ case (MIDI_NOTEON):
+ ev->note = *ptrdata; ptrdata++; currentpos++;
+ ev->vel = *ptrdata; ptrdata++; currentpos++;
+ if (ev->vel==0)
+ note[ev->chn][ev->note]=FALSE;
+ else
+ note[ev->chn][ev->note]=TRUE;
+
+#ifdef TRACKDEBUG2
+ if (ev->chn==6) {
+ if (ev->vel==0) printfdebug("Note Onf\n");
+ else printfdebug("Note On\n");
+ };
+#endif
+ break;
+ case (MIDI_NOTEOFF) :
+#ifdef TRACKDEBUG2
+ if (ev->chn==6) printfdebug("Note Off\n");
+#endif
+ ev->note = *ptrdata;ptrdata++;currentpos++;
+ ev->vel = *ptrdata;ptrdata++;currentpos++;
+ note[ev->chn][ev->note]=FALSE;
+
+ break;
+ case (MIDI_KEY_PRESSURE) :
+#ifdef TRACKDEBUG2
+ if (ev->chn==6) printfdebug ("Key press\n");
+#endif
+ ev->note = *ptrdata;ptrdata++;currentpos++;
+ ev->vel = *ptrdata;ptrdata++;currentpos++;
+ break;
+
+ }
+}
+

@ -1,21 +0,0 @@
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
ifneq "$(wildcard /usr/bin/ninja)" ""
MAKE = ninja -v
DEB_MAKE_ENVVARS += DESTDIR=$(DEB_DESTDIR)
DEB_MAKE_INSTALL_TARGET = install
DEB_CMAKE_NORMAL_ARGS += -GNinja
endif
%:
dh $@
override_dh_auto_configure:
dh_auto_configure $@ -- $(DEB_CMAKE_NORMAL_ARGS) -DUNCRUSTIFY_SEPARATE_TESTS=ON
override_dh_clean:
dh_clean
rm -rf tests/results

@ -1,5 +0,0 @@
version=4
opts=dversionmangle=s/\+dfsg\d*$// \
https://github.com/uncrustify/uncrustify/releases \
(?:.*?/)?uncrustify-(\d[\d.]*)\.tar\.gz debian uupdate

@ -1,182 +0,0 @@
/**
* @file align_func_proto.cpp
*
* @author Guy Maurel
* split from align.cpp
* @author Ben Gardner
* @license GPL v2+
*/
#include "align_func_proto.h"
#include "align_stack.h"
#include "align_tools.h"
#include "log_rules.h"
#include "uncrustify_limits.h"
#include <algorithm> // to get max
using namespace uncrustify;
void align_func_proto(size_t span)
{
LOG_FUNC_ENTRY();
size_t myspan = span;
size_t mythresh = 0;
log_rule_B("align_func_proto_gap");
size_t mygap = options::align_func_proto_gap();
log_rule_B("align_func_proto_thresh");
mythresh = options::align_func_proto_thresh();
// Issue #2771
// we align token-1 and token-2 if:
// token-1->level == token-2->level
// and
// token-1->brace_level == token-2->brace_level
// we don't check if token-1 and token-2 are in the same block
size_t max_level_is = 0;
size_t max_brace_level_is = 0;
log_rule_B("align_var_def_star_style");
size_t mystar_style = options::align_var_def_star_style();
log_rule_B("align_var_def_amp_style");
size_t myamp_style = options::align_var_def_amp_style();
const size_t max_level_count = 8;
const size_t max_brace_level = 8;
AlignStack many_as[max_level_count + 1][max_brace_level + 1];
// Issue #2771
AlignStack many_as_brace[max_level_count + 1][max_brace_level + 1];
log_rule_B("align_single_line_brace_gap");
size_t mybr_gap = options::align_single_line_brace_gap();
for (size_t idx = 0; idx <= max_level_count; idx++)
{
for (size_t idx_brace = 0; idx_brace <= max_brace_level; idx_brace++)
{
many_as[idx][idx_brace].Start(myspan, mythresh);
many_as[idx][idx_brace].m_gap = mygap;
many_as[idx][idx_brace].m_star_style = static_cast<AlignStack::StarStyle>(mystar_style);
many_as[idx][idx_brace].m_amp_style = static_cast<AlignStack::StarStyle>(myamp_style);
many_as_brace[idx][idx_brace].Start(myspan, 0);
many_as_brace[idx][idx_brace].m_gap = mybr_gap;
}
}
bool look_bro = false;
chunk_t *toadd;
for (chunk_t *pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next(pc))
{
LOG_FMT(LAS, "%s(%d): orig_line is %zu, orig_col is %zu, text() is '%s', type is %s, level is %zu, brace_level is %zu\n",
__func__, __LINE__, pc->orig_line, pc->orig_col, pc->text(),
get_token_name(pc->type), pc->level, pc->brace_level);
if (pc->level > max_level_count) // Issue #2960
{
fprintf(stderr, "%s(%d): pc->level is %zu. This is too big, at line %zu, column %zu. Make a report, please.\n",
__func__, __LINE__, pc->level, pc->orig_line, pc->orig_col);
log_flush(true);
exit(EX_SOFTWARE);
}
if (pc->brace_level > max_brace_level)
{
fprintf(stderr, "%s(%d): pc->brace_level is %zu. This is too big, at line %zu, column %zu. Make a report, please.\n",
__func__, __LINE__, pc->level, pc->orig_line, pc->orig_col);
log_flush(true);
exit(EX_SOFTWARE);
}
if ( chunk_is_newline(pc)
&& !pc->flags.test(PCF_IN_FCN_CALL)) // Issue #2831
{
look_bro = false;
many_as[pc->level][pc->brace_level].Debug();
many_as_brace[pc->level][pc->brace_level].Debug();
for (size_t idx = 0; idx <= max_level_count; idx++)
{
for (size_t idx_brace = 0; idx_brace <= max_brace_level; idx_brace++)
{
many_as[idx][idx_brace].NewLines(pc->nl_count);
}
}
many_as_brace[pc->level][pc->brace_level].NewLines(pc->nl_count);
}
else if ( chunk_is_token(pc, CT_FUNC_PROTO)
|| ( chunk_is_token(pc, CT_FUNC_DEF)
&& options::align_single_line_func()))
{
log_rule_B("align_single_line_func");
log_rule_B("align_on_operator");
if ( get_chunk_parent_type(pc) == CT_OPERATOR
&& options::align_on_operator())
{
toadd = chunk_get_prev_ncnl(pc);
}
else
{
toadd = pc;
}
if (pc->level > max_level_count)
{
fprintf(stderr, "%s(%d): Not enought memory for Stack\n",
__func__, __LINE__);
fprintf(stderr, "%s(%d): the current maximum for level is %zu\n",
__func__, __LINE__, max_level_count);
log_flush(true);
}
if (pc->level > max_brace_level)
{
fprintf(stderr, "%s(%d): Not enought memory for Stack\n",
__func__, __LINE__);
fprintf(stderr, "%s(%d): the current maximum for brace_level is %zu\n",
__func__, __LINE__, max_brace_level);
log_flush(true);
exit(EX_SOFTWARE);
}
chunk_t *tmp = step_back_over_member(toadd);
LOG_FMT(LAS, "%s(%d): tmp->text() is '%s', orig_line is %zu, orig_col is %zu, level is %zu, brace_level is %zu\n",
__func__, __LINE__, tmp->text(), tmp->orig_line, tmp->orig_col,
tmp->level, tmp->brace_level);
max_level_is = max(max_level_is, pc->level);
max_brace_level_is = max(max_brace_level_is, pc->level);
many_as[pc->level][pc->brace_level].Add(tmp);
log_rule_B("align_single_line_brace");
look_bro = (chunk_is_token(pc, CT_FUNC_DEF))
&& options::align_single_line_brace();
}
else if ( look_bro
&& chunk_is_token(pc, CT_BRACE_OPEN)
&& pc->flags.test(PCF_ONE_LINER))
{
many_as_brace[pc->level][pc->brace_level].Add(pc);
look_bro = false;
}
}
LOG_FMT(LAS, "%s(%d): as\n", __func__, __LINE__);
for (size_t idx = 0; idx <= max_level_count; idx++)
{
for (size_t idx_brace = 0; idx_brace <= max_brace_level; idx_brace++)
{
many_as[idx][idx_brace].End();
many_as_brace[idx][idx_brace].End();
}
}
} // align_func_proto

@ -1,169 +0,0 @@
/**
* @file combine_skip.cpp
*
* @author Guy Maurel
* @license GPL v2+
* extract from combine.cpp
*/
#include "combine_skip.h"
chunk_t *skip_align(chunk_t *start)
{
chunk_t *pc = start;
if (chunk_is_token(pc, CT_ALIGN))
{
pc = chunk_get_next_ncnl(pc);
if (chunk_is_token(pc, CT_PAREN_OPEN))
{
pc = chunk_get_next_type(pc, CT_PAREN_CLOSE, pc->level);
pc = chunk_get_next_ncnl(pc);
if (chunk_is_token(pc, CT_COLON))
{
pc = chunk_get_next_ncnl(pc);
}
}
}
return(pc);
}
chunk_t *skip_expression(chunk_t *start)
{
chunk_t *pc = start;
while (pc != nullptr && pc->level >= start->level)
{
if ( pc->level == start->level
&& (chunk_is_semicolon(pc) || chunk_is_token(pc, CT_COMMA)))
{
return(pc);
}
pc = chunk_get_next_ncnl(pc);
}
return(pc);
}
chunk_t *skip_to_next_statement(chunk_t *pc)
{
while ( pc != nullptr
&& !chunk_is_semicolon(pc)
&& chunk_is_not_token(pc, CT_BRACE_OPEN)
&& chunk_is_not_token(pc, CT_BRACE_CLOSE))
{
pc = chunk_get_next_ncnl(pc);
}
return(pc);
}
chunk_t *skip_parent_types(chunk_t *colon)
{
auto pc = chunk_get_next_ncnlnp(colon);
while (pc)
{
// Skip access specifier
if (chunk_is_token(pc, CT_ACCESS))
{
pc = chunk_get_next_ncnlnp(pc);
continue;
}
// Check for a type name
if (!(chunk_is_token(pc, CT_WORD) || chunk_is_token(pc, CT_TYPE)))
{
LOG_FMT(LPCU,
"%s is confused; expected a word at %zu:%zu "
"following type list at %zu:%zu\n", __func__,
colon->orig_line, colon->orig_col,
pc->orig_line, pc->orig_col);
return(colon);
}
// Get next token
auto next = skip_template_next(chunk_get_next_ncnlnp(pc));
if (chunk_is_token(next, CT_DC_MEMBER) || chunk_is_token(next, CT_COMMA))
{
pc = chunk_get_next_ncnlnp(next);
}
else if (next)
{
LOG_FMT(LPCU, "%s -> %zu:%zu ('%s')\n", __func__,
next->orig_line, next->orig_col, next->text());
return(next);
}
else
{
break;
}
}
LOG_FMT(LPCU, "%s: did not find end of type list (start was %zu:%zu)\n",
__func__, colon->orig_line, colon->orig_col);
return(colon);
} // skip_parent_types
chunk_t *skip_template_prev(chunk_t *ang_close)
{
if (chunk_is_token(ang_close, CT_ANGLE_CLOSE))
{
chunk_t *pc = chunk_get_prev_type(ang_close, CT_ANGLE_OPEN, ang_close->level);
return(chunk_get_prev_ncnlni(pc)); // Issue #2279
}
return(ang_close);
}
chunk_t *skip_tsquare_next(chunk_t *ary_def)
{
if (chunk_is_token(ary_def, CT_SQUARE_OPEN) || chunk_is_token(ary_def, CT_TSQUARE))
{
return(chunk_get_next_nisq(ary_def));
}
return(ary_def);
}
chunk_t *skip_attribute_next(chunk_t *attr)
{
chunk_t *pc = attr;
while (chunk_is_token(pc, CT_ATTRIBUTE))
{
pc = chunk_get_next_ncnl(pc);
if (chunk_is_token(pc, CT_FPAREN_OPEN))
{
pc = chunk_get_next_type(pc, CT_FPAREN_CLOSE, pc->level);
pc = chunk_get_next_ncnl(pc);
}
}
return(pc);
}
chunk_t *skip_attribute_prev(chunk_t *fp_close)
{
chunk_t *pc = fp_close;
while (true)
{
if ( chunk_is_token(pc, CT_FPAREN_CLOSE)
&& get_chunk_parent_type(pc) == CT_ATTRIBUTE)
{
pc = chunk_get_prev_type(pc, CT_ATTRIBUTE, pc->level);
}
else if (chunk_is_not_token(pc, CT_ATTRIBUTE))
{
break;
}
pc = chunk_get_prev_ncnlni(pc); // Issue #2279
}
return(pc);
}

@ -1,80 +0,0 @@
/**
* @file combine_skip.h
*
* @author Guy Maurel
* @license GPL v2+
* extract from combine.cpp
*/
#ifndef COMBINE_SKIP_H_INCLUDED
#define COMBINE_SKIP_H_INCLUDED
#include "chunk_list.h"
/**
* Skips the D 'align()' statement and the colon, if present.
* align(2) int foo; -- returns 'int'
* align(4): -- returns 'int'
* int bar;
*/
chunk_t *skip_align(chunk_t *start);
/**
* Skips everything until a comma or semicolon at the same level.
* Returns the semicolon, comma, or close brace/paren or nullptr.
*/
chunk_t *skip_expression(chunk_t *start);
/**
* Skips the list of class/struct parent types.
*/
chunk_t *skip_parent_types(chunk_t *colon);
/**
* Skips over the rest of the template if ang_open is indeed a CT_ANGLE_OPEN.
* Points to the chunk after the CT_ANGLE_CLOSE.
* If the chunk isn't an CT_ANGLE_OPEN, then it is returned.
*/
chunk_t *skip_template_next(chunk_t *ang_open);
/**
* Skips over the rest of the template if ang_close is indeed a CT_ANGLE_CLOSE.
* Points to the chunk before the CT_ANGLE_OPEN
* If the chunk isn't an CT_ANGLE_CLOSE, then it is returned.
*/
chunk_t *skip_template_prev(chunk_t *ang_close);
//! Skips to the start of the next statement.
chunk_t *skip_to_next_statement(chunk_t *pc);
/**
* Skips the rest of the array definitions if ary_def is indeed a
* CT_TSQUARE or CT_SQUARE_OPEN
*/
chunk_t *skip_tsquare_next(chunk_t *ary_def);
/**
* If attr is CT_ATTRIBUTE, then skip it and the parens and return the chunk
* after the CT_FPAREN_CLOSE.
* If the chunk isn't an CT_ATTRIBUTE, then it is returned.
*/
chunk_t *skip_attribute_next(chunk_t *attr);
/**
* If fp_close is a CT_FPAREN_CLOSE with a parent of CT_ATTRIBUTE, then skip it
* and the '__attribute__' thingy and return the chunk before CT_ATTRIBUTE.
* Otherwise return fp_close.
*/
chunk_t *skip_attribute_prev(chunk_t *fp_close);
#endif /* COMBINE_SKIP_H_INCLUDED */

@ -1,131 +0,0 @@
/**
* @file log_levels.h
*
* Enum for log levels.
* Use these for the log severities in LOG_FMT(), etc.
*
* @author Ben Gardner
* @author Guy Maurel since version 0.62 for uncrustify4Qt
* October 2015, 2016
* @license GPL v2+
*/
#ifndef LOG_LEVELS_H_INCLUDED
#define LOG_LEVELS_H_INCLUDED
/**
* list of available log levels
*
* The user defines which log level is active using the
* -L or -log option.
* use -L A to set all the levels
* All messages which have a level that is active will be stored to the log
* file.
* All other log messages will be discarded.
* Different parts of the software use different log levels.
* This allows to log only operations of a specific operation.
* This eases debugging.
* To get all log messages use the option -La
* By default only system messages (level=LSYS) are logged.
*/
enum log_sev_t
{
LSYS = 0, //! system messages
LERR = 1, //! error messages
LWARN = 2, //! warnings
LNOTE = 3, //! user notifications
LINFO = 4, //! user informations
LDATA = 5, //! data logging
LFILELIST = 8, //! Files in the file list file
LLINEENDS = 9, //! Show which line endings are used
LCASTS = 10, //! align casts
LALBR = 11, //! align braces
LALTD = 12, //! Align Typedef
LALPP = 13, //! align #define
LALPROTO = 14, //! align prototype
LALNLC = 15, //! align backslash-newline
LALTC = 16, //! align trailing comments
LALADD = 17, //! align add
LALASS = 18, //! align assign
LFVD = 19, //! fix_var_def
LFVD2 = 20, //! fix_var_def-2
LINDENT = 21, //! indent_text
LINDENT2 = 22, //! indent_text tab level
LINDPSE = 23, //! indent_text stack
LINDPC = 24, //! indent play-by-play
LNEWLINE = 25, //! newlines
LPF = 26, //! Parse Frame
LSTMT = 27, //! Marking statements/expressions
LTOK = 28, //! Tokenize
LALRC = 29, //! align right comment
LCMTIND = 30, //! Comment Indent
LINDLINE = 31, //! indent line
LSIB = 32, //! Scan IB
LRETURN = 33, //! add/remove parens for return
LBRDEL = 34, //! brace removal
LFCN = 35, //! function detection
LFCNP = 36, //! function parameters
LPCU = 37, //! parse cleanup
LDYNKW = 38, //! dynamic keywords
LOUTIND = 39, //! output indent
LBCSAFTER = 40, //! Brace cleanup stack - after each token
LBCSPOP = 41, //! Brace cleanup stack - log pops
LBCSPUSH = 42, //! Brace cleanup stack - log push
LBCSSWAP = 43, //! Brace cleanup stack - log swaps
LFTOR = 44, //! Class Ctor or Dtor
LAS = 45, //! align_stack
LPPIS = 46, //! Preprocessor Indent and Space
LTYPEDEF = 47, //! Typedef and function types
LVARDEF = 48, //! Variable def marking
LDEFVAL = 49, //! define values
LPVSEMI = 50, //! Pawn: virtual semicolons
LPFUNC = 51, //! Pawn: function recognition
LSPLIT = 52, //! Line splitting
LFTYPE = 53, //! Function type detection
LTEMPL = 54, //! Template detection
LPARADD = 55, //! adding parens in if/while
LPARADD2 = 56, //! adding parens in if/while - details
LBLANKD = 57, //! blank line details
LTEMPFUNC = 58, //! Template function detection
LSCANSEMI = 59, //! scan semicolon removal
LDELSEMI = 60, //! Removing semicolons
LFPARAM = 61, //! Testing for a full parameter
LNL1LINE = 62, //! NL check for 1 liners
LPFCHK = 63, //! Parse Frame check function call
LAVDB = 64, //! align var def braces
LSORT = 65, //! Sorting
LSPACE = 66, //! Space
LALIGN = 67, //! align
LALAGAIN = 68, //! align again
LOPERATOR = 69, //! operator
LASFCP = 70, //! Align Same Function Call Params
LINDLINED = 71, //! indent line details
LBCTRL = 72, //! beautifier control
LRMRETURN = 73, //! remove 'return;'
LPPIF = 74, //! #if/#else/#endif pair processing
LMCB = 75, //! mod_case_brace
LBRCH = 76, //! if brace chain
LFCNR = 77, //! function return type
LOCCLASS = 78, //! OC Class stuff
LOCMSG = 79, //! OC Message stuff
LBLANK = 80, //! Blank Lines
LOBJCWORD = 81, //! Convert keyword to CT_WORD in certain circumstances
LCHANGE = 82, //! something changed
LCONTTEXT = 83, //! comment cont_text set
LANNOT = 84, //! Java annotation
LOCBLK = 85, //! OC Block stuff
LFLPAREN = 86, //! Flag paren
LOCMSGD = 87, //! OC Message declaration
LINDENTAG = 88, //! indent again
LNFD = 89, //! newline-function-def
LJDBI = 90, //! Java Double Brace Init
LSETPAR = 91, //! set_chunk_parent()
LSETTYP = 92, //! set_chunk_type()
LSETFLG = 93, //! set_chunk_flags()
LNLFUNCT = 94, //! newlines before function
LCHUNK = 95, //! Add or delete chunk
LGUY98 = 98, //! for guy-test
LGUY = 99, //! for guy-test
};
#endif /* LOG_LEVELS_H_INCLUDED */

@ -1,62 +0,0 @@
/**
* @file log_rules.cpp
* is an extract from space.cpp
*
* @author Guy Maurel
* @license GPL v2+
*/
#include "log_rules.h"
#include <string.h>
void log_rule2(const char *func, size_t line, const char *rule, chunk_t *first, chunk_t *second)
{
LOG_FUNC_ENTRY();
if (second->type != CT_NEWLINE)
{
LOG_FMT(LSPACE, "%s(%zu): first->orig_line is %zu, first->orig_col is %zu, first->text() is '%s', [%s/%s] <===>\n",
func, line, first->orig_line, first->orig_col, first->text(),
get_token_name(first->type), get_token_name(get_chunk_parent_type(first)));
LOG_FMT(LSPACE, " second->orig_line is %zu, second->orig_col is %zu, second->text() '%s', [%s/%s] : rule %s[line %zu]\n",
second->orig_line, second->orig_col, second->text(),
get_token_name(second->type), get_token_name(get_chunk_parent_type(second)),
rule, line);
}
}
void log_rule3(const char *func, const char *rule)
{
const char *where = nullptr;
#ifdef WIN32
// some Windows provide "ABC::XYZ::function_Name" as __func__
// we look for the last ':' character
// a function rindex cannot be found
size_t length_of_string = strlen(func);
for (int which = length_of_string - 1; which > 0; which--)
{
char oneChar = func[which];
if (oneChar == ':')
{
where = func + which;
break;
}
}
#else // not WIN32
where = rindex(func, ':');
#endif /* ifdef WIN32 */
if (where == nullptr)
{
LOG_FMT(LSPACE, "log_rule(%s): rule is '%s'\n", func, rule);
}
else
{
LOG_FMT(LSPACE, "log_rule(%s): rule is '%s'\n", where + 1, rule);
}
}

@ -1,36 +0,0 @@
/**
* @file log_rules.h
* prototypes for log_rules.cpp
*
* @author Guy Maurel
* @license GPL v2+
*/
#ifndef LOG_RULES_H_INCLUDED
#define LOG_RULES_H_INCLUDED
#include "chunk_list.h"
#include "uncrustify.h"
#include "uncrustify_types.h"
using namespace uncrustify;
#define log_rule(rule) \
do { if (log_sev_on(LSPACE)) { \
log_rule2(__func__, __LINE__, (rule), first, second); } \
} while (0)
#define log_rule_B(rule) \
do { if (log_sev_on(LSPACE)) { \
log_rule3(__func__, (rule)); } \
} while (0)
void log_rule2(const char *func, size_t line, const char *rule, chunk_t *first, chunk_t *second);
void log_rule3(const char *func, const char *rule);
#endif /* LOG_RULES_H_INCLUDED */

@ -1,31 +0,0 @@
/**
* @file tokenize.h
* prototypes for tokenize.c
*
* @author Ben Gardner
* @license GPL v2+
*/
#ifndef TOKENIZE_H_INCLUDED
#define TOKENIZE_H_INCLUDED
#include "uncrustify_types.h"
/**
* @brief Parse the text into chunks
*
* This function parses or tokenizes the whole buffer into a list.
* It has to do some tricks to parse preprocessors.
*
* If output_text() were called immediately after, two things would happen:
* - trailing whitespace are removed.
* - leading space & tabs are converted to the appropriate format.
*
* All the tokens are inserted before ref. If ref is NULL, they are inserted
* at the end of the list. Line numbers are relative to the start of the data.
*/
void tokenize(const std::deque<int> &data, chunk_t *ref);
#endif /* TOKENIZE_H_INCLUDED */

@ -1,52 +0,0 @@
indent_text : pc->line is 1, pc->column is 1, pc->text() is 'struct, indent_column is 1
indent_text : orig_line is 1, indent set to 1, for 'struct'
indent_text : pc->line is 2, pc->column is 1, pc->text() is '{, indent_column is 1
indent_text : orig_line is 2, indent set to 1, for '{'
indent_text : pc->line is 3, pc->column is 1, pc->text() is 'TelegramIndex, indent_column is 9
indent_text : orig_line is 3, indent set to 9, for 'TelegramIndex'
indent_text : pc->line is 4, pc->column is 1, pc->text() is 'pTelName, indent_column is 17
indent_text : orig_line is 4, indent set to 17, for 'pTelName'
indent_text : pc->line is 5, pc->column is 1, pc->text() is 'nTelIndex, indent_column is 17
indent_text : orig_line is 5, indent set to 17, for 'nTelIndex'
indent_text : pc->line is 6, pc->column is 1, pc->text() is '{, indent_column is 9
indent_text : orig_line is 6, indent set to 9, for '{'
indent_text : pc->line is 7, pc->column is 1, pc->text() is '}, indent_column is 9
indent_text : orig_line is 7, indent set to 9, for '}'
indent_text : pc->line is 9, pc->column is 1, pc->text() is '~, indent_column is 9
indent_text : orig_line is 9, indent set to 9, for '~'
indent_text : pc->line is 10, pc->column is 1, pc->text() is '{, indent_column is 9
indent_text : orig_line is 10, indent set to 9, for '{'
indent_text : pc->line is 11, pc->column is 1, pc->text() is '}, indent_column is 9
indent_text : orig_line is 11, indent set to 9, for '}'
indent_text : pc->line is 13, pc->column is 1, pc->text() is 'const, indent_column is 9
indent_text : orig_line is 13, indent set to 9, for 'const'
indent_text : pc->line is 14, pc->column is 1, pc->text() is 'unsigned, indent_column is 9
indent_text : orig_line is 14, indent set to 9, for 'unsigned'
indent_text : pc->line is 15, pc->column is 1, pc->text() is '}, indent_column is 1
indent_text : orig_line is 15, indent set to 1, for '}'
indent_text : pc->line is 1, pc->column is 1, pc->text() is 'struct, indent_column is 1
indent_text : orig_line is 1, indent set to 1, for 'struct'
indent_text : pc->line is 2, pc->column is 1, pc->text() is '{, indent_column is 1
indent_text : orig_line is 2, indent set to 1, for '{'
indent_text : pc->line is 3, pc->column is 9, pc->text() is 'TelegramIndex, indent_column is 9
indent_text : orig_line is 3, indent set to 9, for 'TelegramIndex'
indent_text : pc->line is 4, pc->column is 17, pc->text() is 'pTelName, indent_column is 17
indent_text : orig_line is 4, indent set to 17, for 'pTelName'
indent_text : pc->line is 5, pc->column is 17, pc->text() is 'nTelIndex, indent_column is 17
indent_text : orig_line is 5, indent set to 17, for 'nTelIndex'
indent_text : pc->line is 6, pc->column is 9, pc->text() is '{, indent_column is 9
indent_text : orig_line is 6, indent set to 9, for '{'
indent_text : pc->line is 7, pc->column is 9, pc->text() is '}, indent_column is 9
indent_text : orig_line is 7, indent set to 9, for '}'
indent_text : pc->line is 9, pc->column is 9, pc->text() is '~, indent_column is 9
indent_text : orig_line is 9, indent set to 9, for '~'
indent_text : pc->line is 10, pc->column is 9, pc->text() is '{, indent_column is 9
indent_text : orig_line is 10, indent set to 9, for '{'
indent_text : pc->line is 11, pc->column is 9, pc->text() is '}, indent_column is 9
indent_text : orig_line is 11, indent set to 9, for '}'
indent_text : pc->line is 13, pc->column is 9, pc->text() is 'const, indent_column is 9
indent_text : orig_line is 13, indent set to 9, for 'const'
indent_text : pc->line is 14, pc->column is 9, pc->text() is 'unsigned, indent_column is 9
indent_text : orig_line is 14, indent set to 9, for 'unsigned'
indent_text : pc->line is 15, pc->column is 1, pc->text() is '}, indent_column is 1
indent_text : orig_line is 15, indent set to 1, for '}'

@ -1,17 +0,0 @@
Newline loop start: 0
newline_add_between : start->text() is ';', type is SEMICOLON, orig_line is 14, orig_col is 24
newline_add_between : and end->text() is '}', orig_line is 15, orig_col is 1
[CallStack]
newline_add_between : start->text() is '{', type is BRACE_OPEN, orig_line is 6, orig_col is 1
newline_add_between : and end->text() is '}', orig_line is 7, orig_col is 1
[CallStack]
newline_add_between : start->text() is '{', type is BRACE_OPEN, orig_line is 6, orig_col is 1
newline_add_between : and end->text() is '}', orig_line is 7, orig_col is 1
[CallStack]
newline_add_between : start->text() is '{', type is BRACE_OPEN, orig_line is 10, orig_col is 1
newline_add_between : and end->text() is '}', orig_line is 11, orig_col is 1
[CallStack]
newline_add_between : start->text() is '{', type is BRACE_OPEN, orig_line is 10, orig_col is 1
newline_add_between : and end->text() is '}', orig_line is 11, orig_col is 1
[CallStack]
newlines_functions_remove_extra_blank_lines : nl_max_blank_in_func is zero

@ -1,684 +0,0 @@
number of loops,4,
language,CPP,
Line,Tag,Parent_type,Type of the parent,Column,Orig Col Strt,Orig Col End,Orig Sp Before,Br,Lvl,pp,Flags,Nl Before,Nl After,Text,
1,COMMENT_MULTI,COMMENT_WHOLE,PARENT_NOT_SET,1,4,7,3,0,0,0,"",9,0," /** * the enum (and variable declarations thereof) could be of * the following forms: * * ""enum type [: integral_type] { ... } [x, ...]"" * ""enum type [: integral_type]"" * ""enum class type [: integral_type] { ... } [x, ...]"" * ""enum class type [: integral_type]"" * ""enum [: integral_type] { ... } x, ..."" */"
10,NEWLINE,NONE,PARENT_NOT_SET,7,7,4,0,0,0,0,"",2,0,
12,COMMENT_MULTI,COMMENT_WHOLE,PARENT_NOT_SET,1,4,7,0,0,0,0,"",9,0," /** * the class/struct (and variable declarations thereof) could be of * the following forms: * * template<...> class/struct[<...>] [macros/attributes ...] type [: bases ...] { } * template<...> class/struct[<...>] [macros/attributes ...] type * class/struct[ [macros/attributes ...] type [: bases ...] { } [x, ...] * class/struct [macros/attributes ...] type [x, ...] * class/struct [macros/attributes ...] [: bases] { } x, ... */"
21,NEWLINE,NONE,PARENT_NOT_SET,7,7,1,0,0,0,0,"",2,0,
23,PREPROC,PP_DEFINE,PARENT_NOT_SET,1,1,2,0,1,1,0,"IN_PREPROC,STMT_START,EXPR_START,DONT_INDENT,PUNCTUATOR",0,0," #"
23,PP_DEFINE,NONE,PARENT_NOT_SET,2,2,8,0,1,1,0,"IN_PREPROC,FORCE_SPACE",0,0," define"
23,MACRO_FUNC,NONE,PARENT_NOT_SET,9,9,16,1,1,1,0,"IN_PREPROC,EXPR_START",0,0," ALIGNAS"
23,FPAREN_OPEN,MACRO_FUNC,PARENT_NOT_SET,16,16,17,0,1,1,0,"IN_PREPROC,PUNCTUATOR",0,0," ("
23,WORD,NONE,PARENT_NOT_SET,17,17,31,0,1,2,0,"IN_PREPROC,IN_FCN_CALL,EXPR_START",0,0," byte_alignment"
23,FPAREN_CLOSE,MACRO_FUNC,PARENT_NOT_SET,31,31,32,0,1,1,0,"IN_PREPROC,IN_FCN_CALL,PUNCTUATOR",0,0," )"
23,ATTRIBUTE,NONE,PARENT_NOT_SET,33,33,46,1,1,1,0,"IN_PREPROC",0,0," __attribute__"
23,FPAREN_OPEN,ATTRIBUTE,PARENT_NOT_SET,46,46,47,0,1,1,0,"IN_PREPROC,PUNCTUATOR",0,0," ("
23,PAREN_OPEN,NONE,PARENT_NOT_SET,47,47,48,0,1,2,0,"IN_PREPROC,EXPR_START,PUNCTUATOR",0,0," ("
23,FUNC_CALL,NONE,PARENT_NOT_SET,48,48,55,0,1,3,0,"IN_PREPROC,EXPR_START",0,0," aligned"
23,FPAREN_OPEN,FUNC_CALL,PARENT_NOT_SET,55,55,56,0,1,3,0,"IN_PREPROC,PUNCTUATOR",0,0," ("
23,WORD,NONE,PARENT_NOT_SET,56,56,70,0,1,4,0,"IN_PREPROC,IN_FCN_CALL,EXPR_START",0,0," byte_alignment"
23,FPAREN_CLOSE,FUNC_CALL,PARENT_NOT_SET,70,70,71,0,1,3,0,"IN_PREPROC,IN_FCN_CALL,PUNCTUATOR",0,0," )"
23,PAREN_CLOSE,NONE,PARENT_NOT_SET,71,71,72,0,1,2,0,"IN_PREPROC,PUNCTUATOR",0,0," )"
23,FPAREN_CLOSE,ATTRIBUTE,PARENT_NOT_SET,72,72,73,0,1,1,0,"IN_PREPROC,PUNCTUATOR",0,0," )"
23,NEWLINE,NONE,PARENT_NOT_SET,73,73,1,0,0,0,0,"",2,0,
25,PREPROC,PP_IF,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_PREPROC,DONT_INDENT,PUNCTUATOR",0,0," #"
25,PP_IF,NONE,PARENT_NOT_SET,2,2,4,0,0,0,1,"IN_PREPROC,FORCE_SPACE",0,0," if"
25,PP_DEFINED,NONE,PARENT_NOT_SET,5,5,12,1,0,0,1,"IN_PREPROC,EXPR_START",0,0," defined"
25,PAREN_OPEN,NONE,PARENT_NOT_SET,13,13,14,1,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," ("
25,WORD,NONE,PARENT_NOT_SET,14,14,22,0,0,0,1,"IN_PREPROC,EXPR_START",0,0," __unix__"
25,PAREN_CLOSE,NONE,PARENT_NOT_SET,22,22,23,0,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," )"
25,BOOL,NONE,PARENT_NOT_SET,24,24,26,1,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," ||"
25,PAREN_OPEN,NONE,PARENT_NOT_SET,27,27,28,1,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," ("
25,PP_DEFINED,NONE,PARENT_NOT_SET,28,28,35,0,0,0,1,"IN_PREPROC,EXPR_START",0,0," defined"
25,PAREN_OPEN,NONE,PARENT_NOT_SET,36,36,37,1,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," ("
25,WORD,NONE,PARENT_NOT_SET,37,37,46,0,0,0,1,"IN_PREPROC,EXPR_START",0,0," __APPLE__"
25,PAREN_CLOSE,NONE,PARENT_NOT_SET,46,46,47,0,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," )"
25,BOOL,NONE,PARENT_NOT_SET,48,48,50,1,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," &&"
25,PP_DEFINED,NONE,PARENT_NOT_SET,51,51,58,1,0,0,1,"IN_PREPROC",0,0," defined"
25,PAREN_OPEN,NONE,PARENT_NOT_SET,59,59,60,1,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," ("
25,WORD,NONE,PARENT_NOT_SET,60,60,68,0,0,0,1,"IN_PREPROC,EXPR_START",0,0," __MACH__"
25,PAREN_CLOSE,NONE,PARENT_NOT_SET,68,68,69,0,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," )"
25,PAREN_CLOSE,NONE,PARENT_NOT_SET,69,69,70,0,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," )"
25,NEWLINE,NONE,PARENT_NOT_SET,70,70,1,0,0,0,1,"",1,0,
26,PREPROC,PP_DEFINE,PARENT_NOT_SET,1,1,2,0,1,1,1,"IN_PREPROC,STMT_START,EXPR_START,DONT_INDENT,PUNCTUATOR",0,0," #"
26,PP_DEFINE,NONE,PARENT_NOT_SET,2,2,8,0,1,1,1,"IN_PREPROC,FORCE_SPACE",0,0," define"
26,MACRO,NONE,PARENT_NOT_SET,9,9,19,1,1,1,1,"IN_PREPROC,FORCE_SPACE",0,0," API_EXPORT"
26,ATTRIBUTE,NONE,PARENT_NOT_SET,20,20,33,1,1,1,1,"IN_PREPROC,EXPR_START",0,0," __attribute__"
26,FPAREN_OPEN,ATTRIBUTE,PARENT_NOT_SET,34,34,35,1,1,1,1,"IN_PREPROC,PUNCTUATOR",0,0," ("
26,PAREN_OPEN,NONE,PARENT_NOT_SET,35,35,36,0,1,2,1,"IN_PREPROC,EXPR_START,PUNCTUATOR",0,0," ("
26,FUNC_CALL,NONE,PARENT_NOT_SET,36,36,46,0,1,3,1,"IN_PREPROC,EXPR_START",0,0," visibility"
26,FPAREN_OPEN,FUNC_CALL,PARENT_NOT_SET,46,46,47,0,1,3,1,"IN_PREPROC,PUNCTUATOR",0,0," ("
26,STRING,PP_INCLUDE,PARENT_NOT_SET,47,47,56,0,1,4,1,"IN_PREPROC,IN_FCN_CALL,EXPR_START",0,0," ""default"""
26,FPAREN_CLOSE,FUNC_CALL,PARENT_NOT_SET,56,56,57,0,1,3,1,"IN_PREPROC,IN_FCN_CALL,PUNCTUATOR",0,0," )"
26,PAREN_CLOSE,NONE,PARENT_NOT_SET,57,57,58,0,1,2,1,"IN_PREPROC,PUNCTUATOR",0,0," )"
26,FPAREN_CLOSE,ATTRIBUTE,PARENT_NOT_SET,58,58,59,0,1,1,1,"IN_PREPROC,PUNCTUATOR",0,0," )"
26,NEWLINE,NONE,PARENT_NOT_SET,59,59,1,0,0,0,1,"",1,0,
27,PREPROC,PP_ELSE,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_PREPROC,DONT_INDENT,PUNCTUATOR",0,0," #"
27,PP_ELSE,NONE,PARENT_NOT_SET,2,2,6,0,0,0,1,"IN_PREPROC,FORCE_SPACE",0,0," elif"
27,PP_DEFINED,NONE,PARENT_NOT_SET,7,7,14,1,0,0,1,"IN_PREPROC,FORCE_SPACE,EXPR_START",0,0," defined"
27,WORD,NONE,PARENT_NOT_SET,15,15,21,1,0,0,1,"IN_PREPROC",0,0," _WIN32"
27,NEWLINE,NONE,PARENT_NOT_SET,21,21,1,0,0,0,1,"",1,0,
28,PREPROC,PP_DEFINE,PARENT_NOT_SET,1,1,2,0,1,1,1,"IN_PREPROC,STMT_START,EXPR_START,DONT_INDENT,PUNCTUATOR",0,0," #"
28,PP_DEFINE,NONE,PARENT_NOT_SET,2,2,8,0,1,1,1,"IN_PREPROC,FORCE_SPACE",0,0," define"
28,MACRO,NONE,PARENT_NOT_SET,9,9,19,1,1,1,1,"IN_PREPROC,FORCE_SPACE",0,0," API_EXPORT"
28,DECLSPEC,NONE,PARENT_NOT_SET,20,20,30,1,1,1,1,"IN_PREPROC,EXPR_START",0,0," __declspec"
28,PAREN_OPEN,DECLSPEC,PARENT_NOT_SET,30,30,31,0,1,1,1,"IN_PREPROC,PUNCTUATOR",0,0," ("
28,WORD,NONE,PARENT_NOT_SET,31,31,40,0,1,2,1,"IN_PREPROC,EXPR_START",0,0," dllexport"
28,PAREN_CLOSE,DECLSPEC,PARENT_NOT_SET,40,40,41,0,1,1,1,"IN_PREPROC,PUNCTUATOR",0,0," )"
28,NEWLINE,NONE,PARENT_NOT_SET,41,41,1,0,0,0,1,"",1,0,
29,PREPROC,PP_ELSE,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_PREPROC,DONT_INDENT,PUNCTUATOR",0,0," #"
29,PP_ELSE,NONE,PARENT_NOT_SET,2,2,6,0,0,0,1,"IN_PREPROC",0,0," else"
29,NEWLINE,NONE,PARENT_NOT_SET,6,6,1,0,0,0,1,"",1,0,
30,PREPROC,PP_DEFINE,PARENT_NOT_SET,1,1,2,0,1,1,1,"IN_PREPROC,STMT_START,EXPR_START,DONT_INDENT,PUNCTUATOR",0,0," #"
30,PP_DEFINE,NONE,PARENT_NOT_SET,2,2,8,0,1,1,1,"IN_PREPROC,FORCE_SPACE",0,0," define"
30,MACRO,NONE,PARENT_NOT_SET,9,9,19,1,1,1,1,"IN_PREPROC",0,0," API_EXPORT"
30,NEWLINE,NONE,PARENT_NOT_SET,19,19,1,0,0,0,1,"",1,0,
31,PREPROC,PP_ENDIF,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_PREPROC,DONT_INDENT,PUNCTUATOR",0,0," #"
31,PP_ENDIF,NONE,PARENT_NOT_SET,2,2,7,0,0,0,0,"IN_PREPROC",0,0," endif"
31,NEWLINE,NONE,PARENT_NOT_SET,7,7,1,0,0,0,0,"",2,0,
33,NAMESPACE,NONE,PARENT_NOT_SET,1,1,10,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START,LVALUE",0,0," namespace"
33,WORD,NAMESPACE,PARENT_NOT_SET,11,11,26,1,0,0,0,"LVALUE",0,0," outer_namespace"
33,NEWLINE,NONE,PARENT_NOT_SET,26,26,1,0,0,0,0,"",1,0,
34,BRACE_OPEN,NAMESPACE,PARENT_NOT_SET,1,1,2,0,0,0,0,"PUNCTUATOR",0,0," {"
34,NEWLINE,NONE,PARENT_NOT_SET,2,2,1,0,1,1,0,"IN_NAMESPACE",2,0,
36,NAMESPACE,NONE,PARENT_NOT_SET,1,1,10,0,1,1,0,"IN_NAMESPACE,FORCE_SPACE,STMT_START,EXPR_START,LVALUE",0,0," namespace"
36,WORD,NAMESPACE,PARENT_NOT_SET,11,11,26,1,1,1,0,"IN_NAMESPACE,LVALUE",0,0," inner_namespace"
36,NEWLINE,NONE,PARENT_NOT_SET,26,26,1,0,1,1,0,"IN_NAMESPACE",1,0,
37,BRACE_OPEN,NAMESPACE,PARENT_NOT_SET,1,1,2,0,1,1,0,"IN_NAMESPACE,PUNCTUATOR",0,0," {"
37,NEWLINE,NONE,PARENT_NOT_SET,2,2,1,0,2,2,0,"IN_NAMESPACE",2,0,
39,CLASS,NONE,PARENT_NOT_SET,1,1,6,0,2,2,0,"IN_NAMESPACE,FORCE_SPACE,STMT_START,EXPR_START,LVALUE",0,0," class"
39,TYPE,CLASS,PARENT_NOT_SET,7,7,12,1,2,2,0,"IN_NAMESPACE,LVALUE",0,0," Base1"
39,BRACE_OPEN,CLASS,PARENT_NOT_SET,13,13,14,1,2,2,0,"IN_CLASS,IN_NAMESPACE,ONE_LINER,EMPTY_BODY,PUNCTUATOR",0,0," {"
39,BRACE_CLOSE,CLASS,PARENT_NOT_SET,15,15,16,1,2,2,0,"IN_CLASS,IN_NAMESPACE,ONE_LINER,EMPTY_BODY,PUNCTUATOR",0,0," }"
39,SEMICOLON,CLASS,PARENT_NOT_SET,16,16,17,0,2,2,0,"PUNCTUATOR",0,0," ;"
39,NEWLINE,NONE,PARENT_NOT_SET,17,17,1,0,2,2,0,"",2,0,
41,TEMPLATE,NONE,PARENT_NOT_SET,1,1,9,0,2,2,0,"STMT_START,EXPR_START,LVALUE",0,0," template"
41,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,9,9,10,0,2,2,0,"IN_TEMPLATE,LVALUE,PUNCTUATOR",0,0," <"
41,TYPENAME,NONE,PARENT_NOT_SET,10,10,18,0,2,3,0,"IN_TEMPLATE,EXPR_START,LVALUE",0,0," typename"
41,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,18,18,19,0,2,2,0,"IN_TEMPLATE,LVALUE,PUNCTUATOR",0,0," >"
41,CLASS,TEMPLATE,PARENT_NOT_SET,20,20,25,1,2,2,0,"FORCE_SPACE,EXPR_START,LVALUE",0,0," class"
41,TYPE,CLASS,PARENT_NOT_SET,26,26,31,1,2,2,0,"LVALUE",0,0," Base2"
41,BRACE_OPEN,CLASS,PARENT_NOT_SET,32,32,33,1,2,2,0,"IN_CLASS,ONE_LINER,EMPTY_BODY,PUNCTUATOR",0,0," {"
41,BRACE_CLOSE,CLASS,PARENT_NOT_SET,34,34,35,1,2,2,0,"IN_CLASS,ONE_LINER,EMPTY_BODY,PUNCTUATOR",0,0," }"
41,SEMICOLON,CLASS,PARENT_NOT_SET,35,35,36,0,2,2,0,"PUNCTUATOR",0,0," ;"
41,NEWLINE,NONE,PARENT_NOT_SET,36,36,1,0,2,2,0,"",2,0,
43,BRACE_CLOSE,NAMESPACE,PARENT_NOT_SET,1,1,2,0,1,1,0,"PUNCTUATOR",0,0," }"
43,NEWLINE,NONE,PARENT_NOT_SET,2,2,1,0,1,1,0,"",2,0,
45,BRACE_CLOSE,NAMESPACE,PARENT_NOT_SET,1,1,2,0,0,0,0,"PUNCTUATOR",0,0," }"
45,NEWLINE,NONE,PARENT_NOT_SET,2,2,1,0,0,0,0,"",2,0,
47,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,82,0,0,0,0,"",0,0," // template<...> class/struct[<...>] [macros/attributes ...] type : bases ... { }"
47,NEWLINE,NONE,PARENT_NOT_SET,82,82,1,0,0,0,0,"",1,0,
48,TEMPLATE,NONE,PARENT_NOT_SET,1,1,9,0,0,0,0,"STMT_START,EXPR_START",0,0," template"
48,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,9,9,10,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," <"
48,TYPENAME,NONE,PARENT_NOT_SET,10,10,18,0,0,1,0,"IN_TEMPLATE,EXPR_START",0,0," typename"
48,COMMA,NONE,PARENT_NOT_SET,18,18,19,0,0,1,0,"IN_TEMPLATE,PUNCTUATOR",0,0," ,"
48,TYPENAME,NONE,PARENT_NOT_SET,20,20,28,1,0,1,0,"IN_TEMPLATE,EXPR_START",0,0," typename"
48,ELLIPSIS,NONE,PARENT_NOT_SET,29,29,32,1,0,1,0,"IN_TEMPLATE,PUNCTUATOR",0,0," ..."
48,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,32,32,33,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," >"
48,NEWLINE,NONE,PARENT_NOT_SET,33,33,1,0,0,0,0,"",1,0,
49,CLASS,TEMPLATE,PARENT_NOT_SET,1,1,6,0,0,0,0,"FORCE_SPACE,EXPR_START",0,0," class"
49,TYPE,CLASS,PARENT_NOT_SET,7,7,17,1,0,0,0,"FORCE_SPACE",0,0," API_EXPORT"
49,ATTRIBUTE,CLASS,PARENT_NOT_SET,18,18,31,1,0,0,0,"",0,0," __attribute__"
49,FPAREN_OPEN,ATTRIBUTE,PARENT_NOT_SET,31,31,32,0,0,0,0,"PUNCTUATOR",0,0," ("
49,PAREN_OPEN,NONE,PARENT_NOT_SET,32,32,33,0,0,1,0,"EXPR_START,PUNCTUATOR",0,0," ("
49,TYPE,NONE,PARENT_NOT_SET,33,33,47,0,0,2,0,"EXPR_START",0,0," __deprecated__"
49,PAREN_CLOSE,NONE,PARENT_NOT_SET,47,47,48,0,0,1,0,"PUNCTUATOR",0,0," )"
49,FPAREN_CLOSE,FUNC_DEF,PARENT_NOT_SET,48,48,49,0,0,0,0,"PUNCTUATOR",0,0," )"
49,FUNC_DEF,NONE,PARENT_NOT_SET,50,50,57,1,0,0,0,"VAR_DEF,VAR_1ST",0,0," ALIGNAS"
49,FPAREN_OPEN,FUNC_DEF,PARENT_NOT_SET,57,57,58,0,0,0,0,"PUNCTUATOR",0,0," ("
49,NUMBER,NONE,PARENT_NOT_SET,58,58,59,0,0,1,0,"IN_FCN_DEF,EXPR_START",0,0," 4"
49,FPAREN_CLOSE,FUNC_DEF,PARENT_NOT_SET,59,59,60,0,0,0,0,"IN_FCN_DEF,PUNCTUATOR",0,0," )"
49,WORD,FUNC_DEF,PARENT_NOT_SET,61,61,63,1,0,0,0,"VAR_DEF,OLD_FCN_PARAMS",0,0," c1"
49,NEWLINE,NONE,PARENT_NOT_SET,63,63,1,0,0,0,0,"",1,0,
50,CLASS_COLON,FUNC_DEF,PARENT_NOT_SET,9,1,2,0,0,0,0,"IN_CLASS_BASE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," :"
50,QUALIFIER,FUNC_DEF,PARENT_NOT_SET,11,3,9,1,0,0,0,"IN_CLASS_BASE,FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE,OLD_FCN_PARAMS",0,0," public"
50,TYPE,FUNC_DEF,PARENT_NOT_SET,18,10,25,1,0,0,0,"IN_CLASS_BASE,VAR_TYPE,OLD_FCN_PARAMS",0,0," outer_namespace"
50,DC_MEMBER,FUNC_DEF,PARENT_NOT_SET,33,25,27,0,0,0,0,"IN_CLASS_BASE,VAR_TYPE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," ::"
50,TYPE,FUNC_DEF,PARENT_NOT_SET,35,27,42,0,0,0,0,"IN_CLASS_BASE,VAR_TYPE,OLD_FCN_PARAMS",0,0," inner_namespace"
50,DC_MEMBER,FUNC_DEF,PARENT_NOT_SET,50,42,44,0,0,0,0,"IN_CLASS_BASE,VAR_TYPE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," ::"
50,WORD,FUNC_DEF,PARENT_NOT_SET,52,44,49,0,0,0,0,"IN_CLASS_BASE,VAR_DEF,VAR_1ST,OLD_FCN_PARAMS",0,0," Base1"
50,COMMA,FUNC_DEF,PARENT_NOT_SET,57,49,50,0,0,0,0,"IN_CLASS_BASE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," ,"
50,NEWLINE,NONE,PARENT_NOT_SET,58,50,3,0,0,0,0,"",1,0,
51,QUALIFIER,FUNC_DEF,PARENT_NOT_SET,9,3,9,0,0,0,0,"IN_CLASS_BASE,FORCE_SPACE,EXPR_START,OLD_FCN_PARAMS",0,0," public"
51,TYPE,FUNC_DEF,PARENT_NOT_SET,16,10,25,1,0,0,0,"IN_CLASS_BASE,OLD_FCN_PARAMS",0,0," outer_namespace"
51,DC_MEMBER,FUNC_DEF,PARENT_NOT_SET,31,25,27,0,0,0,0,"IN_CLASS_BASE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," ::"
51,TYPE,FUNC_DEF,PARENT_NOT_SET,33,27,42,0,0,0,0,"IN_CLASS_BASE,OLD_FCN_PARAMS",0,0," inner_namespace"
51,DC_MEMBER,FUNC_DEF,PARENT_NOT_SET,48,42,44,0,0,0,0,"IN_CLASS_BASE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," ::"
51,WORD,FUNC_DEF,PARENT_NOT_SET,50,44,49,0,0,0,0,"IN_CLASS_BASE,VAR_DEF,OLD_FCN_PARAMS",0,0," Base2"
51,ANGLE_OPEN,FUNC_DEF,PARENT_NOT_SET,55,49,50,0,0,0,0,"IN_TEMPLATE,IN_CLASS_BASE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," <"
51,TYPE,FUNC_DEF,PARENT_NOT_SET,56,50,65,0,0,1,0,"IN_TEMPLATE,IN_CLASS_BASE,EXPR_START,OLD_FCN_PARAMS",0,0," outer_namespace"
51,DC_MEMBER,FUNC_DEF,PARENT_NOT_SET,71,65,67,0,0,1,0,"IN_TEMPLATE,IN_CLASS_BASE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," ::"
51,TYPE,FUNC_DEF,PARENT_NOT_SET,73,67,82,0,0,1,0,"IN_TEMPLATE,IN_CLASS_BASE,OLD_FCN_PARAMS",0,0," inner_namespace"
51,DC_MEMBER,FUNC_DEF,PARENT_NOT_SET,88,82,84,0,0,1,0,"IN_TEMPLATE,IN_CLASS_BASE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," ::"
51,TYPE,FUNC_DEF,PARENT_NOT_SET,90,84,89,0,0,1,0,"IN_TEMPLATE,IN_CLASS_BASE,OLD_FCN_PARAMS",0,0," Base1"
51,ANGLE_CLOSE,FUNC_DEF,PARENT_NOT_SET,95,89,90,0,0,0,0,"IN_TEMPLATE,IN_CLASS_BASE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," >"
51,NEWLINE,NONE,PARENT_NOT_SET,96,90,1,0,0,0,0,"",1,0,
52,BRACE_OPEN,FUNC_DEF,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_CLASS,EXPR_START,EMPTY_BODY,PUNCTUATOR",0,0," {"
52,NEWLINE,NONE,PARENT_NOT_SET,2,2,1,0,1,1,0,"",2,0,
54,BRACE_CLOSE,FUNC_DEF,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_CLASS,EMPTY_BODY,PUNCTUATOR",0,0," }"
54,SEMICOLON,CLASS,PARENT_NOT_SET,2,2,3,0,0,0,0,"PUNCTUATOR",0,0," ;"
54,NEWLINE,NONE,PARENT_NOT_SET,3,3,1,0,0,0,0,"",2,0,
56,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,70,0,0,0,0,"",0,0," // template<...> class/struct[<...>] [macros/attributes ...] type { }"
56,NEWLINE,NONE,PARENT_NOT_SET,70,70,1,0,0,0,0,"",1,0,
57,TEMPLATE,NONE,PARENT_NOT_SET,1,1,9,0,0,0,0,"STMT_START,EXPR_START",0,0," template"
57,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,9,9,10,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," <"
57,TYPENAME,NONE,PARENT_NOT_SET,10,10,18,0,0,1,0,"IN_TEMPLATE,EXPR_START",0,0," typename"
57,COMMA,NONE,PARENT_NOT_SET,18,18,19,0,0,1,0,"IN_TEMPLATE,PUNCTUATOR",0,0," ,"
57,TYPENAME,NONE,PARENT_NOT_SET,20,20,28,1,0,1,0,"IN_TEMPLATE,EXPR_START,LVALUE",0,0," typename"
57,ELLIPSIS,NONE,PARENT_NOT_SET,29,29,32,1,0,1,0,"IN_TEMPLATE,LVALUE,PUNCTUATOR",0,0," ..."
57,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,32,32,33,0,0,0,0,"IN_TEMPLATE,LVALUE,PUNCTUATOR",0,0," >"
57,NEWLINE,NONE,PARENT_NOT_SET,33,33,1,0,0,0,0,"",1,0,
58,CLASS,TEMPLATE,PARENT_NOT_SET,1,1,6,0,0,0,0,"FORCE_SPACE,EXPR_START,LVALUE",0,0," class"
58,TYPE,CLASS,PARENT_NOT_SET,7,7,17,1,0,0,0,"FORCE_SPACE,LVALUE",0,0," API_EXPORT"
58,WORD,CLASS,PARENT_NOT_SET,18,18,20,1,0,0,0,"VAR_DEF,VAR_1ST,LVALUE",0,0," c2"
58,NEWLINE,NONE,PARENT_NOT_SET,20,20,1,0,0,0,0,"",1,0,
59,BRACE_OPEN,CLASS,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_CLASS,PUNCTUATOR",0,0," {"
59,NEWLINE,NONE,PARENT_NOT_SET,2,2,1,0,1,1,0,"",1,0,
60,ACCESS,NONE,PARENT_NOT_SET,1,1,7,0,1,1,0,"IN_CLASS,STMT_START,EXPR_START,LVALUE",0,0," public"
60,ACCESS_COLON,NONE,PARENT_NOT_SET,7,7,8,0,1,1,0,"IN_CLASS,LVALUE,PUNCTUATOR",0,0," :"
60,NEWLINE,NONE,PARENT_NOT_SET,8,8,4,0,1,1,0,"",2,0,
62,TEMPLATE,NONE,PARENT_NOT_SET,1,4,12,0,1,1,0,"IN_CLASS,STMT_START,EXPR_START,LVALUE",0,0," template"
62,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,9,12,13,0,1,1,0,"IN_TEMPLATE,IN_CLASS,LVALUE,PUNCTUATOR",0,0," <"
62,TYPENAME,NONE,PARENT_NOT_SET,10,13,21,0,1,2,0,"IN_TEMPLATE,IN_CLASS,FORCE_SPACE,EXPR_START,LVALUE",0,0," typename"
62,TYPE,NONE,PARENT_NOT_SET,19,22,23,1,1,2,0,"IN_TEMPLATE,IN_CLASS,LVALUE",0,0," T"
62,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,20,23,24,0,1,1,0,"IN_TEMPLATE,IN_CLASS,LVALUE,PUNCTUATOR",0,0," >"
62,NEWLINE,NONE,PARENT_NOT_SET,21,24,4,0,1,1,0,"",1,0,
63,STRUCT,TEMPLATE,PARENT_NOT_SET,1,4,10,0,1,1,0,"IN_CLASS,FORCE_SPACE,EXPR_START,LVALUE",0,0," struct"
63,TYPE,STRUCT,PARENT_NOT_SET,8,11,22,1,1,1,0,"IN_CLASS,LVALUE",0,0," inner_class"
63,NEWLINE,NONE,PARENT_NOT_SET,19,22,4,0,1,1,0,"",1,0,
64,BRACE_OPEN,STRUCT,PARENT_NOT_SET,1,4,5,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," {"
64,NEWLINE,NONE,PARENT_NOT_SET,2,5,7,0,2,2,0,"IN_STRUCT",1,0,
65,QUALIFIER,NONE,PARENT_NOT_SET,9,7,13,0,2,2,0,"IN_STRUCT,IN_CLASS,FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE",0,0," static"
65,TYPE,NONE,PARENT_NOT_SET,16,14,25,1,2,2,0,"IN_STRUCT,IN_CLASS,VAR_TYPE",0,0," inner_class"
65,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,27,25,26,0,2,2,0,"IN_STRUCT,IN_TEMPLATE,IN_CLASS,PUNCTUATOR",0,0," <"
65,TYPE,NONE,PARENT_NOT_SET,28,26,27,0,2,3,0,"IN_STRUCT,IN_TEMPLATE,IN_CLASS,EXPR_START",0,0," T"
65,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,29,27,28,0,2,2,0,"IN_STRUCT,IN_TEMPLATE,IN_CLASS,PUNCTUATOR",0,0," >"
65,PTR_TYPE,NONE,PARENT_NOT_SET,31,29,30,1,2,2,0,"IN_STRUCT,IN_CLASS,EXPR_START,VAR_TYPE,PUNCTUATOR",0,0," *"
65,WORD,NONE,PARENT_NOT_SET,32,30,43,0,2,2,0,"IN_STRUCT,IN_CLASS,EXPR_START,VAR_DEF,VAR_1ST",0,0," m_inner_class"
65,SEMICOLON,CLASS,PARENT_NOT_SET,45,43,44,0,2,2,0,"IN_STRUCT,IN_CLASS,PUNCTUATOR",0,0," ;"
65,NEWLINE,NONE,PARENT_NOT_SET,46,44,4,0,2,2,0,"IN_STRUCT",1,0,
66,BRACE_CLOSE,STRUCT,PARENT_NOT_SET,1,4,5,0,1,1,0,"IN_STRUCT,IN_CLASS,PUNCTUATOR",0,0," }"
66,SEMICOLON,STRUCT,PARENT_NOT_SET,2,5,6,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ;"
66,NEWLINE,NONE,PARENT_NOT_SET,3,6,1,0,1,1,0,"",1,0,
67,BRACE_CLOSE,CLASS,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_CLASS,PUNCTUATOR",0,0," }"
67,SEMICOLON,CLASS,PARENT_NOT_SET,2,2,3,0,0,0,0,"PUNCTUATOR",0,0," ;"
67,NEWLINE,NONE,PARENT_NOT_SET,3,3,1,0,0,0,0,"",2,0,
69,TEMPLATE,NONE,PARENT_NOT_SET,1,1,9,0,0,0,0,"STMT_START,EXPR_START,LVALUE",0,0," template"
69,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,9,9,10,0,0,0,0,"IN_TEMPLATE,LVALUE,PUNCTUATOR",0,0," <"
69,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,10,10,11,0,0,0,0,"IN_TEMPLATE,EXPR_START,LVALUE,PUNCTUATOR",0,0," >"
69,TEMPLATE,NONE,PARENT_NOT_SET,12,12,20,1,0,0,0,"EXPR_START,LVALUE",0,0," template"
69,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,20,20,21,0,0,0,0,"IN_TEMPLATE,LVALUE,PUNCTUATOR",0,0," <"
69,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,21,21,22,0,0,0,0,"IN_TEMPLATE,EXPR_START,LVALUE,PUNCTUATOR",0,0," >"
69,STRUCT,TEMPLATE,PARENT_NOT_SET,23,23,29,1,0,0,0,"FORCE_SPACE,EXPR_START,LVALUE",0,0," struct"
69,TYPE,STRUCT,PARENT_NOT_SET,30,30,40,1,0,0,0,"FORCE_SPACE,LVALUE",0,0," API_EXPORT"
69,WORD,STRUCT,PARENT_NOT_SET,41,41,43,1,0,0,0,"VAR_DEF,VAR_1ST,LVALUE",0,0," c2"
69,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,43,43,44,0,0,0,0,"IN_TEMPLATE,LVALUE,PUNCTUATOR",0,0," <"
69,TYPE,NONE,PARENT_NOT_SET,44,44,47,0,0,1,0,"IN_TEMPLATE,EXPR_START,LVALUE",0,0," int"
69,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,47,47,48,0,0,0,0,"IN_TEMPLATE,LVALUE,PUNCTUATOR",0,0," >"
69,DC_MEMBER,NONE,PARENT_NOT_SET,48,48,50,0,0,0,0,"EXPR_START,LVALUE,PUNCTUATOR",0,0," ::"
69,WORD,NONE,PARENT_NOT_SET,50,50,61,0,0,0,0,"VAR_DEF,LVALUE",0,0," inner_class"
69,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,61,61,62,0,0,0,0,"IN_TEMPLATE,LVALUE,PUNCTUATOR",0,0," <"
69,TYPE,NONE,PARENT_NOT_SET,62,62,65,0,0,1,0,"IN_TEMPLATE,EXPR_START,LVALUE",0,0," int"
69,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,65,65,66,0,0,0,0,"IN_TEMPLATE,LVALUE,PUNCTUATOR",0,0," >"
69,PTR_TYPE,NONE,PARENT_NOT_SET,67,67,68,1,0,0,0,"EXPR_START,LVALUE,PUNCTUATOR",0,0," *"
69,WORD,NONE,PARENT_NOT_SET,68,68,70,0,0,0,0,"EXPR_START,VAR_DEF,LVALUE",0,0," c2"
69,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,70,70,71,0,0,0,0,"IN_TEMPLATE,LVALUE,PUNCTUATOR",0,0," <"
69,TYPE,NONE,PARENT_NOT_SET,71,71,74,0,0,1,0,"IN_TEMPLATE,EXPR_START,LVALUE",0,0," int"
69,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,74,74,75,0,0,0,0,"IN_TEMPLATE,LVALUE,PUNCTUATOR",0,0," >"
69,DC_MEMBER,NONE,PARENT_NOT_SET,75,75,77,0,0,0,0,"EXPR_START,LVALUE,PUNCTUATOR",0,0," ::"
69,WORD,NONE,PARENT_NOT_SET,77,77,88,0,0,0,0,"VAR_DEF,LVALUE",0,0," inner_class"
69,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,88,88,89,0,0,0,0,"IN_TEMPLATE,LVALUE,PUNCTUATOR",0,0," <"
69,TYPE,NONE,PARENT_NOT_SET,89,89,92,0,0,1,0,"IN_TEMPLATE,EXPR_START,LVALUE",0,0," int"
69,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,92,92,93,0,0,0,0,"IN_TEMPLATE,LVALUE,PUNCTUATOR",0,0," >"
69,DC_MEMBER,NONE,PARENT_NOT_SET,93,93,95,0,0,0,0,"EXPR_START,LVALUE,PUNCTUATOR",0,0," ::"
69,WORD,NONE,PARENT_NOT_SET,95,95,108,0,0,0,0,"VAR_DEF,LVALUE",0,0," m_inner_class"
69,ASSIGN,NONE,PARENT_NOT_SET,109,109,110,1,0,0,0,"PUNCTUATOR",0,0," ="
69,WORD,NONE,PARENT_NOT_SET,111,111,118,1,0,0,0,"EXPR_START",0,0," nullptr"
69,SEMICOLON,TEMPLATE,PARENT_NOT_SET,118,118,119,0,0,0,0,"PUNCTUATOR",0,0," ;"
69,NEWLINE,NONE,PARENT_NOT_SET,119,119,1,0,0,0,0,"",2,0,
71,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,66,0,0,0,0,"",0,0," // template<...> class/struct[<...>] [macros/attributes ...] type"
71,NEWLINE,NONE,PARENT_NOT_SET,66,66,1,0,0,0,0,"",1,0,
72,TEMPLATE,NONE,PARENT_NOT_SET,1,1,9,0,0,0,0,"STMT_START,EXPR_START",0,0," template"
72,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,9,9,10,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," <"
72,TYPENAME,NONE,PARENT_NOT_SET,10,10,18,0,0,1,0,"IN_TEMPLATE,EXPR_START",0,0," typename"
72,COMMA,NONE,PARENT_NOT_SET,18,18,19,0,0,1,0,"IN_TEMPLATE,PUNCTUATOR",0,0," ,"
72,TYPENAME,NONE,PARENT_NOT_SET,20,20,28,1,0,1,0,"IN_TEMPLATE,EXPR_START",0,0," typename"
72,ELLIPSIS,NONE,PARENT_NOT_SET,29,29,32,1,0,1,0,"IN_TEMPLATE,PUNCTUATOR",0,0," ..."
72,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,32,32,33,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," >"
72,NEWLINE,NONE,PARENT_NOT_SET,33,33,1,0,0,0,0,"",1,0,
73,CLASS,TEMPLATE,PARENT_NOT_SET,1,1,6,0,0,0,0,"FORCE_SPACE,EXPR_START",0,0," class"
73,TYPE,CLASS,PARENT_NOT_SET,7,7,17,1,0,0,0,"FORCE_SPACE",0,0," API_EXPORT"
73,WORD,CLASS,PARENT_NOT_SET,18,18,20,1,0,0,0,"VAR_DEF,VAR_1ST",0,0," c2"
73,SEMICOLON,CLASS,PARENT_NOT_SET,20,20,21,0,0,0,0,"PUNCTUATOR",0,0," ;"
73,NEWLINE,NONE,PARENT_NOT_SET,21,21,1,0,0,0,0,"",2,0,
75,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,68,0,0,0,0,"",0,0," // class/struct [macros/attributes ...] type : bases ... { } x, ..."
75,NEWLINE,NONE,PARENT_NOT_SET,68,68,1,0,0,0,0,"",1,0,
76,CLASS,NONE,PARENT_NOT_SET,1,1,6,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," class"
76,TYPE,CLASS,PARENT_NOT_SET,7,7,17,1,0,0,0,"FORCE_SPACE",0,0," API_EXPORT"
76,ATTRIBUTE,CLASS,PARENT_NOT_SET,18,18,31,1,0,0,0,"",0,0," __attribute__"
76,FPAREN_OPEN,ATTRIBUTE,PARENT_NOT_SET,31,31,32,0,0,0,0,"PUNCTUATOR",0,0," ("
76,PAREN_OPEN,NONE,PARENT_NOT_SET,32,32,33,0,0,1,0,"EXPR_START,PUNCTUATOR",0,0," ("
76,TYPE,NONE,PARENT_NOT_SET,33,33,47,0,0,2,0,"EXPR_START",0,0," __deprecated__"
76,PAREN_CLOSE,NONE,PARENT_NOT_SET,47,47,48,0,0,1,0,"PUNCTUATOR",0,0," )"
76,FPAREN_CLOSE,FUNC_DEF,PARENT_NOT_SET,48,48,49,0,0,0,0,"PUNCTUATOR",0,0," )"
76,FUNC_DEF,NONE,PARENT_NOT_SET,50,50,57,1,0,0,0,"VAR_DEF,VAR_1ST",0,0," ALIGNAS"
76,FPAREN_OPEN,FUNC_DEF,PARENT_NOT_SET,57,57,58,0,0,0,0,"PUNCTUATOR",0,0," ("
76,NUMBER,NONE,PARENT_NOT_SET,58,58,59,0,0,1,0,"IN_FCN_DEF,EXPR_START",0,0," 4"
76,FPAREN_CLOSE,FUNC_DEF,PARENT_NOT_SET,59,59,60,0,0,0,0,"IN_FCN_DEF,PUNCTUATOR",0,0," )"
76,WORD,FUNC_DEF,PARENT_NOT_SET,61,61,63,1,0,0,0,"VAR_DEF,OLD_FCN_PARAMS",0,0," c3"
76,NEWLINE,NONE,PARENT_NOT_SET,63,63,1,0,0,0,0,"",1,0,
77,CLASS_COLON,FUNC_DEF,PARENT_NOT_SET,9,1,2,0,0,0,0,"IN_CLASS_BASE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," :"
77,QUALIFIER,FUNC_DEF,PARENT_NOT_SET,11,3,9,1,0,0,0,"IN_CLASS_BASE,FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE,OLD_FCN_PARAMS",0,0," public"
77,TYPE,FUNC_DEF,PARENT_NOT_SET,18,10,25,1,0,0,0,"IN_CLASS_BASE,VAR_TYPE,OLD_FCN_PARAMS",0,0," outer_namespace"
77,DC_MEMBER,FUNC_DEF,PARENT_NOT_SET,33,25,27,0,0,0,0,"IN_CLASS_BASE,VAR_TYPE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," ::"
77,TYPE,FUNC_DEF,PARENT_NOT_SET,35,27,42,0,0,0,0,"IN_CLASS_BASE,VAR_TYPE,OLD_FCN_PARAMS",0,0," inner_namespace"
77,DC_MEMBER,FUNC_DEF,PARENT_NOT_SET,50,42,44,0,0,0,0,"IN_CLASS_BASE,VAR_TYPE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," ::"
77,WORD,FUNC_DEF,PARENT_NOT_SET,52,44,49,0,0,0,0,"IN_CLASS_BASE,VAR_DEF,VAR_1ST,OLD_FCN_PARAMS",0,0," Base2"
77,ANGLE_OPEN,FUNC_DEF,PARENT_NOT_SET,57,49,50,0,0,0,0,"IN_TEMPLATE,IN_CLASS_BASE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," <"
77,TYPE,FUNC_DEF,PARENT_NOT_SET,58,50,53,0,0,1,0,"IN_TEMPLATE,IN_CLASS_BASE,EXPR_START,OLD_FCN_PARAMS",0,0," int"
77,ANGLE_CLOSE,FUNC_DEF,PARENT_NOT_SET,61,53,54,0,0,0,0,"IN_TEMPLATE,IN_CLASS_BASE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," >"
77,COMMA,FUNC_DEF,PARENT_NOT_SET,62,54,55,0,0,0,0,"IN_CLASS_BASE,EXPR_START,OLD_FCN_PARAMS,PUNCTUATOR",0,0," ,"
77,NEWLINE,NONE,PARENT_NOT_SET,63,55,3,0,0,0,0,"",1,0,
78,QUALIFIER,FUNC_DEF,PARENT_NOT_SET,9,3,9,0,0,0,0,"IN_CLASS_BASE,FORCE_SPACE,EXPR_START,OLD_FCN_PARAMS",0,0," public"
78,WORD,FUNC_DEF,PARENT_NOT_SET,16,10,12,1,0,0,0,"IN_CLASS_BASE,VAR_DEF,OLD_FCN_PARAMS",0,0," c2"
78,ANGLE_OPEN,FUNC_DEF,PARENT_NOT_SET,18,12,13,0,0,0,0,"IN_TEMPLATE,IN_CLASS_BASE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," <"
78,TYPE,FUNC_DEF,PARENT_NOT_SET,19,13,16,0,0,1,0,"IN_TEMPLATE,IN_CLASS_BASE,EXPR_START,OLD_FCN_PARAMS",0,0," int"
78,ANGLE_CLOSE,FUNC_DEF,PARENT_NOT_SET,22,16,17,0,0,0,0,"IN_TEMPLATE,IN_CLASS_BASE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," >"
78,DC_MEMBER,FUNC_DEF,PARENT_NOT_SET,23,17,19,0,0,0,0,"IN_CLASS_BASE,EXPR_START,OLD_FCN_PARAMS,PUNCTUATOR",0,0," ::"
78,WORD,FUNC_DEF,PARENT_NOT_SET,25,19,30,0,0,0,0,"IN_CLASS_BASE,VAR_DEF,OLD_FCN_PARAMS",0,0," inner_class"
78,ANGLE_OPEN,FUNC_DEF,PARENT_NOT_SET,36,30,31,0,0,0,0,"IN_TEMPLATE,IN_CLASS_BASE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," <"
78,TYPE,FUNC_DEF,PARENT_NOT_SET,37,31,34,0,0,1,0,"IN_TEMPLATE,IN_CLASS_BASE,EXPR_START,OLD_FCN_PARAMS",0,0," int"
78,ANGLE_CLOSE,FUNC_DEF,PARENT_NOT_SET,40,34,35,0,0,0,0,"IN_TEMPLATE,IN_CLASS_BASE,OLD_FCN_PARAMS,PUNCTUATOR",0,0," >"
78,NEWLINE,NONE,PARENT_NOT_SET,41,35,1,0,0,0,0,"",1,0,
79,BRACE_OPEN,FUNC_DEF,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_CLASS,EXPR_START,PUNCTUATOR",0,0," {"
79,NEWLINE,NONE,PARENT_NOT_SET,2,2,1,0,1,1,0,"",1,0,
80,ACCESS,NONE,PARENT_NOT_SET,1,1,7,0,1,1,0,"IN_CLASS,STMT_START,EXPR_START",0,0," public"
80,ACCESS_COLON,NONE,PARENT_NOT_SET,7,7,8,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," :"
80,NEWLINE,NONE,PARENT_NOT_SET,8,8,4,0,1,1,0,"",1,0,
81,FUNC_CALL,NONE,PARENT_NOT_SET,9,4,6,0,1,1,0,"IN_CLASS,STMT_START,EXPR_START",0,0," c3"
81,FPAREN_OPEN,FUNC_CALL,PARENT_NOT_SET,11,6,7,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ("
81,TYPE,NONE,PARENT_NOT_SET,12,7,10,0,1,2,0,"IN_FCN_CALL,IN_CLASS,FORCE_SPACE,EXPR_START,LVALUE",0,0," int"
81,WORD,NONE,PARENT_NOT_SET,16,11,12,1,1,2,0,"IN_FCN_CALL,IN_CLASS,LVALUE",0,0," x"
81,ASSIGN,NONE,PARENT_NOT_SET,18,13,14,1,1,2,0,"IN_FCN_CALL,IN_CLASS,PUNCTUATOR",0,0," ="
81,NUMBER,NONE,PARENT_NOT_SET,20,15,16,1,1,2,0,"IN_FCN_CALL,IN_CLASS,EXPR_START",0,0," 0"
81,COMMA,NONE,PARENT_NOT_SET,21,16,17,0,1,2,0,"IN_FCN_CALL,IN_CLASS,PUNCTUATOR",0,0," ,"
81,TYPE,NONE,PARENT_NOT_SET,23,18,21,1,1,2,0,"IN_FCN_CALL,IN_CLASS,FORCE_SPACE,EXPR_START,LVALUE",0,0," int"
81,WORD,NONE,PARENT_NOT_SET,27,22,23,1,1,2,0,"IN_FCN_CALL,IN_CLASS,LVALUE",0,0," y"
81,ASSIGN,NONE,PARENT_NOT_SET,29,24,25,1,1,2,0,"IN_FCN_CALL,IN_CLASS,PUNCTUATOR",0,0," ="
81,NUMBER,NONE,PARENT_NOT_SET,31,26,27,1,1,2,0,"IN_FCN_CALL,IN_CLASS,EXPR_START",0,0," 0"
81,COMMA,NONE,PARENT_NOT_SET,32,27,28,0,1,2,0,"IN_FCN_CALL,IN_CLASS,PUNCTUATOR",0,0," ,"
81,TYPE,NONE,PARENT_NOT_SET,34,29,32,1,1,2,0,"IN_FCN_CALL,IN_CLASS,FORCE_SPACE,EXPR_START,LVALUE",0,0," int"
81,WORD,NONE,PARENT_NOT_SET,38,33,34,1,1,2,0,"IN_FCN_CALL,IN_CLASS,LVALUE",0,0," z"
81,ASSIGN,NONE,PARENT_NOT_SET,40,35,36,1,1,2,0,"IN_FCN_CALL,IN_CLASS,PUNCTUATOR",0,0," ="
81,NUMBER,NONE,PARENT_NOT_SET,42,37,38,1,1,2,0,"IN_FCN_CALL,IN_CLASS,EXPR_START",0,0," 0"
81,FPAREN_CLOSE,FUNC_CALL,PARENT_NOT_SET,43,38,39,0,1,1,0,"IN_FCN_CALL,IN_CLASS,PUNCTUATOR",0,0," )"
81,CLASS_COLON,NONE,PARENT_NOT_SET,45,40,41,1,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," :"
81,FUNC_CALL,NONE,PARENT_NOT_SET,47,42,45,1,1,1,0,"IN_CLASS,STMT_START,EXPR_START",0,0," m_x"
81,FPAREN_OPEN,FUNC_CALL,PARENT_NOT_SET,50,45,46,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ("
81,WORD,NONE,PARENT_NOT_SET,51,46,47,0,1,2,0,"IN_FCN_CALL,IN_CLASS,EXPR_START",0,0," x"
81,FPAREN_CLOSE,FUNC_CALL,PARENT_NOT_SET,52,47,48,0,1,1,0,"IN_FCN_CALL,IN_CLASS,PUNCTUATOR",0,0," )"
81,COMMA,NONE,PARENT_NOT_SET,53,48,49,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ,"
81,FUNC_CALL,NONE,PARENT_NOT_SET,55,50,53,1,1,1,0,"IN_CLASS,EXPR_START",0,0," m_y"
81,FPAREN_OPEN,FUNC_CALL,PARENT_NOT_SET,58,53,54,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ("
81,WORD,NONE,PARENT_NOT_SET,59,54,55,0,1,2,0,"IN_FCN_CALL,IN_CLASS,EXPR_START",0,0," y"
81,FPAREN_CLOSE,FUNC_CALL,PARENT_NOT_SET,60,55,56,0,1,1,0,"IN_FCN_CALL,IN_CLASS,PUNCTUATOR",0,0," )"
81,COMMA,NONE,PARENT_NOT_SET,61,56,57,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ,"
81,FUNC_CALL,NONE,PARENT_NOT_SET,63,58,61,1,1,1,0,"IN_CLASS,EXPR_START",0,0," m_z"
81,FPAREN_OPEN,FUNC_CALL,PARENT_NOT_SET,66,61,62,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ("
81,WORD,NONE,PARENT_NOT_SET,67,62,63,0,1,2,0,"IN_FCN_CALL,IN_CLASS,EXPR_START",0,0," z"
81,FPAREN_CLOSE,FUNC_CALL,PARENT_NOT_SET,68,63,64,0,1,1,0,"IN_FCN_CALL,IN_CLASS,PUNCTUATOR",0,0," )"
81,BRACE_OPEN,FUNC_CALL,PARENT_NOT_SET,70,65,66,1,1,1,0,"IN_CLASS,EMPTY_BODY,PUNCTUATOR",0,0," {"
81,NEWLINE,NONE,PARENT_NOT_SET,71,67,0,0,1,1,0,"IN_CLASS",1,0,
81,BRACE_CLOSE,FUNC_CALL,PARENT_NOT_SET,9,67,68,1,1,1,0,"IN_CLASS,EMPTY_BODY,PUNCTUATOR",0,0," }"
81,NEWLINE,NONE,PARENT_NOT_SET,10,68,4,0,1,1,0,"",2,0,
83,TYPE,NONE,PARENT_NOT_SET,9,4,7,0,1,1,0,"IN_CLASS,FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE",0,0," int"
83,WORD,NONE,PARENT_NOT_SET,13,8,11,1,1,1,0,"IN_CLASS,VAR_DEF,VAR_1ST",0,0," m_x"
83,SEMICOLON,NONE,PARENT_NOT_SET,16,11,12,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ;"
83,NEWLINE,NONE,PARENT_NOT_SET,17,12,4,0,1,1,0,"",1,0,
84,TYPE,NONE,PARENT_NOT_SET,9,4,7,0,1,1,0,"IN_CLASS,FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE",0,0," int"
84,WORD,NONE,PARENT_NOT_SET,13,8,11,1,1,1,0,"IN_CLASS,VAR_DEF,VAR_1ST",0,0," m_y"
84,SEMICOLON,NONE,PARENT_NOT_SET,16,11,12,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ;"
84,NEWLINE,NONE,PARENT_NOT_SET,17,12,4,0,1,1,0,"",1,0,
85,TYPE,NONE,PARENT_NOT_SET,9,4,7,0,1,1,0,"IN_CLASS,FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE",0,0," int"
85,WORD,NONE,PARENT_NOT_SET,13,8,11,1,1,1,0,"IN_CLASS,VAR_DEF,VAR_1ST",0,0," m_z"
85,SEMICOLON,NONE,PARENT_NOT_SET,16,11,12,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ;"
85,NEWLINE,NONE,PARENT_NOT_SET,17,12,1,0,1,1,0,"",1,0,
86,BRACE_CLOSE,FUNC_DEF,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_CLASS,PUNCTUATOR",0,0," }"
86,NEWLINE,NONE,PARENT_NOT_SET,2,1,0,0,0,0,0,"IN_CLASS",1,0,
86,WORD,NONE,PARENT_NOT_SET,1,3,6,1,0,0,0,"STMT_START,EXPR_START",0,0," c31"
86,COMMA,NONE,PARENT_NOT_SET,4,6,7,0,0,0,0,"PUNCTUATOR",0,0," ,"
86,DEREF,NONE,PARENT_NOT_SET,6,8,9,1,0,0,0,"EXPR_START,LVALUE,PUNCTUATOR",0,0," *"
86,WORD,NONE,PARENT_NOT_SET,7,9,12,0,0,0,0,"EXPR_START,LVALUE",0,0," c32"
86,ASSIGN,NONE,PARENT_NOT_SET,11,13,14,1,0,0,0,"PUNCTUATOR",0,0," ="
86,WORD,NONE,PARENT_NOT_SET,13,15,22,1,0,0,0,"EXPR_START",0,0," nullptr"
86,COMMA,NONE,PARENT_NOT_SET,20,22,23,0,0,0,0,"PUNCTUATOR",0,0," ,"
86,DEREF,NONE,PARENT_NOT_SET,22,24,25,1,0,0,0,"EXPR_START,LVALUE,PUNCTUATOR",0,0," *"
86,WORD,NONE,PARENT_NOT_SET,23,25,28,0,0,0,0,"EXPR_START,LVALUE",0,0," c33"
86,TSQUARE,NONE,PARENT_NOT_SET,26,28,30,0,0,0,0,"LVALUE,PUNCTUATOR",0,0," []"
86,ASSIGN,NONE,PARENT_NOT_SET,29,31,32,1,0,0,0,"PUNCTUATOR",0,0," ="
86,BRACE_OPEN,BRACED_INIT_LIST,PARENT_NOT_SET,31,33,34,1,0,0,0,"EXPR_START,ONE_LINER,PUNCTUATOR",0,0," {"
86,WORD,NONE,PARENT_NOT_SET,33,35,42,1,1,1,0,"EXPR_START,ONE_LINER",0,0," nullptr"
86,COMMA,NONE,PARENT_NOT_SET,40,42,43,0,1,1,0,"ONE_LINER,PUNCTUATOR",0,0," ,"
86,WORD,NONE,PARENT_NOT_SET,42,44,51,1,1,1,0,"EXPR_START,ONE_LINER",0,0," nullptr"
86,BRACE_CLOSE,BRACED_INIT_LIST,PARENT_NOT_SET,50,52,53,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," }"
86,COMMA,NONE,PARENT_NOT_SET,51,53,54,0,0,0,0,"PUNCTUATOR",0,0," ,"
86,WORD,NONE,PARENT_NOT_SET,53,55,58,1,0,0,0,"EXPR_START,LVALUE",0,0," c34"
86,BRACE_OPEN,BRACED_INIT_LIST,PARENT_NOT_SET,56,58,59,0,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
86,NUMBER,NONE,PARENT_NOT_SET,58,60,61,1,1,1,0,"STMT_START,EXPR_START,ONE_LINER",0,0," 0"
86,COMMA,NONE,PARENT_NOT_SET,59,61,62,0,1,1,0,"ONE_LINER,PUNCTUATOR",0,0," ,"
86,NUMBER,NONE,PARENT_NOT_SET,61,63,64,1,1,1,0,"EXPR_START,ONE_LINER",0,0," 1"
86,COMMA,NONE,PARENT_NOT_SET,62,64,65,0,1,1,0,"ONE_LINER,PUNCTUATOR",0,0," ,"
86,NUMBER,NONE,PARENT_NOT_SET,64,66,67,1,1,1,0,"EXPR_START,ONE_LINER",0,0," 2"
86,BRACE_CLOSE,BRACED_INIT_LIST,PARENT_NOT_SET,65,67,68,0,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," }"
86,COMMA,NONE,PARENT_NOT_SET,66,68,69,0,0,0,0,"PUNCTUATOR",0,0," ,"
86,DEREF,NONE,PARENT_NOT_SET,68,70,71,1,0,0,0,"EXPR_START,PUNCTUATOR",0,0," *"
86,QUALIFIER,NONE,PARENT_NOT_SET,69,72,77,1,0,0,0,"FORCE_SPACE,EXPR_START",0,0," const"
86,FUNC_CALL,NONE,PARENT_NOT_SET,75,78,81,1,0,0,0,"",0,0," c35"
86,FPAREN_OPEN,FUNC_CALL,PARENT_NOT_SET,78,81,82,0,0,0,0,"PUNCTUATOR",0,0," ("
86,WORD,NONE,PARENT_NOT_SET,79,82,89,0,0,1,0,"IN_FCN_CALL,EXPR_START",0,0," nullptr"
86,FPAREN_CLOSE,FUNC_CALL,PARENT_NOT_SET,86,89,90,0,0,0,0,"IN_FCN_CALL,PUNCTUATOR",0,0," )"
86,COMMA,NONE,PARENT_NOT_SET,87,90,91,0,0,0,0,"PUNCTUATOR",0,0," ,"
86,FUNC_CALL,NONE,PARENT_NOT_SET,89,92,95,1,0,0,0,"EXPR_START",0,0," c16"
86,FPAREN_OPEN,FUNC_CALL,PARENT_NOT_SET,92,95,96,0,0,0,0,"PUNCTUATOR",0,0," ("
86,NUMBER,NONE,PARENT_NOT_SET,93,96,97,0,0,1,0,"IN_FCN_CALL,EXPR_START",0,0," 0"
86,COMMA,NONE,PARENT_NOT_SET,94,97,98,0,0,1,0,"IN_FCN_CALL,PUNCTUATOR",0,0," ,"
86,NUMBER,NONE,PARENT_NOT_SET,96,99,100,1,0,1,0,"IN_FCN_CALL,EXPR_START",0,0," 1"
86,COMMA,NONE,PARENT_NOT_SET,97,100,101,0,0,1,0,"IN_FCN_CALL,PUNCTUATOR",0,0," ,"
86,NUMBER,NONE,PARENT_NOT_SET,99,102,103,1,0,1,0,"IN_FCN_CALL,EXPR_START",0,0," 2"
86,FPAREN_CLOSE,FUNC_CALL,PARENT_NOT_SET,100,103,104,0,0,0,0,"IN_FCN_CALL,PUNCTUATOR",0,0," )"
86,SEMICOLON,NONE,PARENT_NOT_SET,101,104,105,0,0,0,0,"PUNCTUATOR",0,0," ;"
86,NEWLINE,NONE,PARENT_NOT_SET,102,105,1,0,0,0,0,"",2,0,
88,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,52,0,0,0,0,"",0,0," // class/struct [macros/attributes ...] type x, ..."
88,NEWLINE,NONE,PARENT_NOT_SET,52,52,1,0,0,0,0,"",1,0,
89,CLASS,NONE,PARENT_NOT_SET,1,1,6,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," class"
89,ATTRIBUTE,NONE,PARENT_NOT_SET,7,7,20,1,0,0,0,"",0,0," __attribute__"
89,FPAREN_OPEN,ATTRIBUTE,PARENT_NOT_SET,20,20,21,0,0,0,0,"PUNCTUATOR",0,0," ("
89,PAREN_OPEN,NONE,PARENT_NOT_SET,21,21,22,0,0,1,0,"EXPR_START,PUNCTUATOR",0,0," ("
89,WORD,NONE,PARENT_NOT_SET,22,22,36,0,0,2,0,"EXPR_START",0,0," __deprecated__"
89,PAREN_CLOSE,NONE,PARENT_NOT_SET,36,36,37,0,0,1,0,"PUNCTUATOR",0,0," )"
89,FPAREN_CLOSE,ATTRIBUTE,PARENT_NOT_SET,37,37,38,0,0,0,0,"PUNCTUATOR",0,0," )"
89,TYPE,FUNC_DEF,PARENT_NOT_SET,39,39,49,1,0,0,0,"FORCE_SPACE",0,0," API_EXPORT"
89,FUNC_DEF,CLASS,PARENT_NOT_SET,50,50,57,1,0,0,0,"VAR_DEF,VAR_1ST",0,0," ALIGNAS"
89,FPAREN_OPEN,FUNC_DEF,PARENT_NOT_SET,57,57,58,0,0,0,0,"PUNCTUATOR",0,0," ("
89,NUMBER,NONE,PARENT_NOT_SET,58,58,59,0,0,1,0,"IN_FCN_DEF,EXPR_START",0,0," 4"
89,FPAREN_CLOSE,FUNC_DEF,PARENT_NOT_SET,59,59,60,0,0,0,0,"IN_FCN_DEF,PUNCTUATOR",0,0," )"
89,TYPE,FUNC_DEF,PARENT_NOT_SET,61,61,63,1,0,0,0,"FORCE_SPACE,OLD_FCN_PARAMS",0,0," c3"
89,WORD,FUNC_DEF,PARENT_NOT_SET,64,64,67,1,0,0,0,"VAR_DEF,OLD_FCN_PARAMS",0,0," c41"
89,COMMA,FUNC_DEF,PARENT_NOT_SET,67,67,68,0,0,0,0,"OLD_FCN_PARAMS,PUNCTUATOR",0,0," ,"
89,PTR_TYPE,FUNC_DEF,PARENT_NOT_SET,69,69,70,1,0,0,0,"EXPR_START,OLD_FCN_PARAMS,LVALUE,PUNCTUATOR",0,0," *"
89,WORD,FUNC_DEF,PARENT_NOT_SET,70,70,73,0,0,0,0,"EXPR_START,VAR_DEF,OLD_FCN_PARAMS,LVALUE",0,0," c42"
89,ASSIGN,FUNC_DEF,PARENT_NOT_SET,74,74,75,1,0,0,0,"OLD_FCN_PARAMS,PUNCTUATOR",0,0," ="
89,WORD,FUNC_DEF,PARENT_NOT_SET,76,76,83,1,0,0,0,"EXPR_START,OLD_FCN_PARAMS",0,0," nullptr"
89,COMMA,FUNC_DEF,PARENT_NOT_SET,83,83,84,0,0,0,0,"OLD_FCN_PARAMS,PUNCTUATOR",0,0," ,"
89,DEREF,FUNC_DEF,PARENT_NOT_SET,85,85,86,1,0,0,0,"EXPR_START,OLD_FCN_PARAMS,LVALUE,PUNCTUATOR",0,0," *"
89,WORD,FUNC_DEF,PARENT_NOT_SET,86,86,89,0,0,0,0,"EXPR_START,OLD_FCN_PARAMS,LVALUE",0,0," c43"
89,TSQUARE,FUNC_DEF,PARENT_NOT_SET,89,89,91,0,0,0,0,"OLD_FCN_PARAMS,LVALUE,PUNCTUATOR",0,0," []"
89,ASSIGN,FUNC_DEF,PARENT_NOT_SET,92,92,93,1,0,0,0,"OLD_FCN_PARAMS,PUNCTUATOR",0,0," ="
89,BRACE_OPEN,FUNC_DEF,PARENT_NOT_SET,94,94,95,1,0,0,0,"IN_CLASS,EXPR_START,PUNCTUATOR",0,0," {"
89,NEWLINE,NONE,PARENT_NOT_SET,95,96,0,0,0,0,0,"IN_CLASS",1,0,
89,WORD,NONE,PARENT_NOT_SET,9,96,103,1,1,1,0,"IN_CLASS,EXPR_START",0,0," nullptr"
89,COMMA,NONE,PARENT_NOT_SET,16,103,104,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ,"
89,WORD,NONE,PARENT_NOT_SET,18,105,112,1,1,1,0,"IN_CLASS,EXPR_START",0,0," nullptr"
89,NEWLINE,NONE,PARENT_NOT_SET,25,113,0,0,1,1,0,"IN_CLASS",1,0,
89,BRACE_CLOSE,FUNC_DEF,PARENT_NOT_SET,1,113,114,1,0,0,0,"IN_CLASS,PUNCTUATOR",0,0," }"
89,COMMA,NONE,PARENT_NOT_SET,2,114,115,0,0,0,0,"STMT_START,EXPR_START,PUNCTUATOR",0,0," ,"
89,WORD,NONE,PARENT_NOT_SET,4,116,119,1,0,0,0,"EXPR_START,LVALUE",0,0," c44"
89,BRACE_OPEN,BRACED_INIT_LIST,PARENT_NOT_SET,7,119,120,0,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
89,NUMBER,NONE,PARENT_NOT_SET,9,121,122,1,1,1,0,"STMT_START,EXPR_START,ONE_LINER",0,0," 0"
89,COMMA,NONE,PARENT_NOT_SET,10,122,123,0,1,1,0,"ONE_LINER,PUNCTUATOR",0,0," ,"
89,NUMBER,NONE,PARENT_NOT_SET,12,124,125,1,1,1,0,"EXPR_START,ONE_LINER",0,0," 1"
89,COMMA,NONE,PARENT_NOT_SET,13,125,126,0,1,1,0,"ONE_LINER,PUNCTUATOR",0,0," ,"
89,NUMBER,NONE,PARENT_NOT_SET,15,127,128,1,1,1,0,"EXPR_START,ONE_LINER",0,0," 2"
89,BRACE_CLOSE,BRACED_INIT_LIST,PARENT_NOT_SET,16,128,129,0,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," }"
89,COMMA,NONE,PARENT_NOT_SET,17,129,130,0,0,0,0,"PUNCTUATOR",0,0," ,"
89,DEREF,NONE,PARENT_NOT_SET,19,131,132,1,0,0,0,"EXPR_START,PUNCTUATOR",0,0," *"
89,QUALIFIER,NONE,PARENT_NOT_SET,20,133,138,1,0,0,0,"FORCE_SPACE,EXPR_START",0,0," const"
89,FUNC_CALL,NONE,PARENT_NOT_SET,26,139,142,1,0,0,0,"",0,0," c45"
89,FPAREN_OPEN,FUNC_CALL,PARENT_NOT_SET,29,142,143,0,0,0,0,"PUNCTUATOR",0,0," ("
89,WORD,NONE,PARENT_NOT_SET,30,143,150,0,0,1,0,"IN_FCN_CALL,EXPR_START",0,0," nullptr"
89,FPAREN_CLOSE,FUNC_CALL,PARENT_NOT_SET,37,150,151,0,0,0,0,"IN_FCN_CALL,PUNCTUATOR",0,0," )"
89,COMMA,NONE,PARENT_NOT_SET,38,151,152,0,0,0,0,"PUNCTUATOR",0,0," ,"
89,FUNC_CALL,NONE,PARENT_NOT_SET,40,153,156,1,0,0,0,"EXPR_START",0,0," c46"
89,FPAREN_OPEN,FUNC_CALL,PARENT_NOT_SET,43,156,157,0,0,0,0,"PUNCTUATOR",0,0," ("
89,NUMBER,NONE,PARENT_NOT_SET,44,157,158,0,0,1,0,"IN_FCN_CALL,EXPR_START",0,0," 0"
89,COMMA,NONE,PARENT_NOT_SET,45,158,159,0,0,1,0,"IN_FCN_CALL,PUNCTUATOR",0,0," ,"
89,NUMBER,NONE,PARENT_NOT_SET,47,160,161,1,0,1,0,"IN_FCN_CALL,EXPR_START",0,0," 1"
89,COMMA,NONE,PARENT_NOT_SET,48,161,162,0,0,1,0,"IN_FCN_CALL,PUNCTUATOR",0,0," ,"
89,NUMBER,NONE,PARENT_NOT_SET,50,163,164,1,0,1,0,"IN_FCN_CALL,EXPR_START",0,0," 2"
89,FPAREN_CLOSE,FUNC_CALL,PARENT_NOT_SET,51,164,165,0,0,0,0,"IN_FCN_CALL,PUNCTUATOR",0,0," )"
89,SEMICOLON,NONE,PARENT_NOT_SET,52,165,166,0,0,0,0,"PUNCTUATOR",0,0," ;"
89,NEWLINE,NONE,PARENT_NOT_SET,53,166,1,0,0,0,0,"",2,0,
91,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,68,0,0,0,0,"",0,0," // class/struct [macros/attributes ...] type : bases ... { } x, ..."
91,NEWLINE,NONE,PARENT_NOT_SET,68,68,1,0,0,0,0,"",1,0,
92,CLASS,NONE,PARENT_NOT_SET,1,1,6,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," class"
92,TYPE,CLASS,PARENT_NOT_SET,7,7,14,1,0,0,0,"",0,0," ALIGNAS"
92,PAREN_OPEN,CLASS,PARENT_NOT_SET,15,14,15,0,0,0,0,"PUNCTUATOR",0,0," ("
92,NUMBER,NONE,PARENT_NOT_SET,16,15,16,0,0,1,0,"EXPR_START",0,0," 4"
92,PAREN_CLOSE,NONE,PARENT_NOT_SET,17,16,17,0,0,0,0,"PUNCTUATOR",0,0," )"
92,TYPE,CLASS,PARENT_NOT_SET,19,18,28,1,0,0,0,"FORCE_SPACE",0,0," API_EXPORT"
92,ATTRIBUTE,NONE,PARENT_NOT_SET,30,29,42,1,0,0,0,"",0,0," __attribute__"
92,FPAREN_OPEN,ATTRIBUTE,PARENT_NOT_SET,43,42,43,0,0,0,0,"PUNCTUATOR",0,0," ("
92,PAREN_OPEN,NONE,PARENT_NOT_SET,44,43,44,0,0,1,0,"EXPR_START,PUNCTUATOR",0,0," ("
92,WORD,NONE,PARENT_NOT_SET,45,44,58,0,0,2,0,"EXPR_START,LVALUE",0,0," __deprecated__"
92,PAREN_CLOSE,NONE,PARENT_NOT_SET,59,58,59,0,0,1,0,"LVALUE,PUNCTUATOR",0,0," )"
92,FPAREN_CLOSE,ATTRIBUTE,PARENT_NOT_SET,60,59,60,0,0,0,0,"LVALUE,PUNCTUATOR",0,0," )"
92,NEWLINE,NONE,PARENT_NOT_SET,61,60,1,0,0,0,0,"",1,0,
93,CLASS_COLON,NONE,PARENT_NOT_SET,9,1,2,0,0,0,0,"IN_CLASS_BASE,LVALUE,PUNCTUATOR",0,0," :"
93,QUALIFIER,NONE,PARENT_NOT_SET,11,3,9,1,0,0,0,"IN_CLASS_BASE,FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE,LVALUE",0,0," public"
93,TYPE,NONE,PARENT_NOT_SET,18,10,25,1,0,0,0,"IN_CLASS_BASE,VAR_TYPE,LVALUE",0,0," outer_namespace"
93,DC_MEMBER,NONE,PARENT_NOT_SET,33,25,27,0,0,0,0,"IN_CLASS_BASE,VAR_TYPE,LVALUE,PUNCTUATOR",0,0," ::"
93,TYPE,NONE,PARENT_NOT_SET,35,27,42,0,0,0,0,"IN_CLASS_BASE,VAR_TYPE,LVALUE",0,0," inner_namespace"
93,DC_MEMBER,NONE,PARENT_NOT_SET,50,42,44,0,0,0,0,"IN_CLASS_BASE,VAR_TYPE,LVALUE,PUNCTUATOR",0,0," ::"
93,WORD,NONE,PARENT_NOT_SET,52,44,49,0,0,0,0,"IN_CLASS_BASE,VAR_DEF,VAR_1ST,LVALUE",0,0," Base1"
93,NEWLINE,NONE,PARENT_NOT_SET,57,49,1,0,0,0,0,"",1,0,
94,BRACE_OPEN,CLASS,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_CLASS,PUNCTUATOR",0,0," {"
94,NEWLINE,NONE,PARENT_NOT_SET,2,2,1,0,1,1,0,"",1,0,
95,ACCESS,NONE,PARENT_NOT_SET,1,1,7,0,1,1,0,"IN_CLASS,STMT_START,EXPR_START",0,0," public"
95,ACCESS_COLON,NONE,PARENT_NOT_SET,7,7,8,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," :"
95,NEWLINE,NONE,PARENT_NOT_SET,8,8,4,0,1,1,0,"",1,0,
96,TYPE,NONE,PARENT_NOT_SET,1,4,7,0,1,1,0,"IN_CLASS,FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE",0,0," int"
96,WORD,NONE,PARENT_NOT_SET,5,8,11,1,1,1,0,"IN_CLASS,VAR_DEF,VAR_1ST",0,0," m_x"
96,SEMICOLON,CLASS,PARENT_NOT_SET,8,11,12,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ;"
96,NEWLINE,NONE,PARENT_NOT_SET,9,12,4,0,1,1,0,"",1,0,
97,TYPE,NONE,PARENT_NOT_SET,1,4,7,0,1,1,0,"IN_CLASS,FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE",0,0," int"
97,WORD,NONE,PARENT_NOT_SET,5,8,11,1,1,1,0,"IN_CLASS,VAR_DEF,VAR_1ST",0,0," m_y"
97,SEMICOLON,NONE,PARENT_NOT_SET,8,11,12,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ;"
97,NEWLINE,NONE,PARENT_NOT_SET,9,12,4,0,1,1,0,"",1,0,
98,TYPE,NONE,PARENT_NOT_SET,1,4,7,0,1,1,0,"IN_CLASS,FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE",0,0," int"
98,WORD,NONE,PARENT_NOT_SET,5,8,11,1,1,1,0,"IN_CLASS,VAR_DEF,VAR_1ST",0,0," m_z"
98,SEMICOLON,NONE,PARENT_NOT_SET,8,11,12,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ;"
98,NEWLINE,NONE,PARENT_NOT_SET,9,12,1,0,1,1,0,"",1,0,
99,BRACE_CLOSE,CLASS,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_CLASS,PUNCTUATOR",0,0," }"
99,WORD,NONE,PARENT_NOT_SET,3,3,6,1,0,0,0,"STMT_START,EXPR_START",0,0," c51"
99,COMMA,NONE,PARENT_NOT_SET,6,6,7,0,0,0,0,"PUNCTUATOR",0,0," ,"
99,DEREF,NONE,PARENT_NOT_SET,8,8,9,1,0,0,0,"EXPR_START,LVALUE,PUNCTUATOR",0,0," *"
99,WORD,NONE,PARENT_NOT_SET,9,9,12,0,0,0,0,"EXPR_START,LVALUE",0,0," c52"
99,ASSIGN,NONE,PARENT_NOT_SET,13,13,14,1,0,0,0,"PUNCTUATOR",0,0," ="
99,WORD,NONE,PARENT_NOT_SET,15,15,22,1,0,0,0,"EXPR_START",0,0," nullptr"
99,COMMA,NONE,PARENT_NOT_SET,22,22,23,0,0,0,0,"PUNCTUATOR",0,0," ,"
99,DEREF,NONE,PARENT_NOT_SET,24,24,25,1,0,0,0,"EXPR_START,LVALUE,PUNCTUATOR",0,0," *"
99,WORD,NONE,PARENT_NOT_SET,25,25,28,0,0,0,0,"EXPR_START,LVALUE",0,0," c53"
99,TSQUARE,NONE,PARENT_NOT_SET,28,28,30,0,0,0,0,"LVALUE,PUNCTUATOR",0,0," []"
99,ASSIGN,NONE,PARENT_NOT_SET,31,31,32,1,0,0,0,"PUNCTUATOR",0,0," ="
99,BRACE_OPEN,BRACED_INIT_LIST,PARENT_NOT_SET,33,33,34,1,0,0,0,"EXPR_START,ONE_LINER,PUNCTUATOR",0,0," {"
99,WORD,NONE,PARENT_NOT_SET,35,35,42,1,1,1,0,"EXPR_START,ONE_LINER",0,0," nullptr"
99,COMMA,NONE,PARENT_NOT_SET,42,42,43,0,1,1,0,"ONE_LINER,PUNCTUATOR",0,0," ,"
99,WORD,NONE,PARENT_NOT_SET,44,44,51,1,1,1,0,"EXPR_START,ONE_LINER",0,0," nullptr"
99,BRACE_CLOSE,BRACED_INIT_LIST,PARENT_NOT_SET,52,52,53,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," }"
99,SEMICOLON,NONE,PARENT_NOT_SET,53,53,54,0,0,0,0,"PUNCTUATOR",0,0," ;"
99,NEWLINE,NONE,PARENT_NOT_SET,54,54,1,0,0,0,0,"",3,0,
102,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,44,0,0,0,0,"",0,0," // enum type : integral_type { ... } x, ..."
102,NEWLINE,NONE,PARENT_NOT_SET,44,44,1,0,0,0,0,"",1,0,
103,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START,LVALUE",0,0," enum"
103,TYPE,ENUM,PARENT_NOT_SET,6,6,8,1,0,0,0,"LVALUE",0,0," e1"
103,BIT_COLON,ENUM,PARENT_NOT_SET,9,9,10,1,0,0,0,"LVALUE,PUNCTUATOR",0,0," :"
103,TYPE,NONE,PARENT_NOT_SET,11,11,15,1,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE,LVALUE",0,0," long"
103,TYPE,NONE,PARENT_NOT_SET,16,16,20,1,0,0,0,"LVALUE",0,0," long"
103,BRACE_OPEN,ENUM,PARENT_NOT_SET,21,21,22,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
103,WORD,NONE,PARENT_NOT_SET,23,23,25,1,1,1,0,"IN_ENUM,STMT_START,EXPR_START,ONE_LINER",0,0," a1"
103,COMMA,NONE,PARENT_NOT_SET,25,25,26,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
103,WORD,NONE,PARENT_NOT_SET,27,27,29,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," b1"
103,COMMA,NONE,PARENT_NOT_SET,29,29,30,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
103,WORD,NONE,PARENT_NOT_SET,31,31,33,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," d1"
103,BRACE_CLOSE,ENUM,PARENT_NOT_SET,34,34,35,1,0,0,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," }"
103,WORD,NONE,PARENT_NOT_SET,36,36,39,1,0,0,0,"STMT_START,EXPR_START,VAR_DEF,VAR_1ST,VAR_INLINE",0,0," e11"
103,COMMA,NONE,PARENT_NOT_SET,39,39,40,0,0,0,0,"PUNCTUATOR",0,0," ,"
103,WORD,NONE,PARENT_NOT_SET,41,41,44,1,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE",0,0," e12"
103,COMMA,NONE,PARENT_NOT_SET,44,44,45,0,0,0,0,"PUNCTUATOR",0,0," ,"
103,WORD,NONE,PARENT_NOT_SET,46,46,49,1,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE",0,0," e13"
103,SEMICOLON,ENUM,PARENT_NOT_SET,49,49,50,0,0,0,0,"PUNCTUATOR",0,0," ;"
103,NEWLINE,NONE,PARENT_NOT_SET,50,50,1,0,0,0,0,"",2,0,
105,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,37,0,0,0,0,"",0,0," // enum type : integral_type { ... }"
105,NEWLINE,NONE,PARENT_NOT_SET,37,37,1,0,0,0,0,"",1,0,
106,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START,LVALUE",0,0," enum"
106,TYPE,ENUM,PARENT_NOT_SET,6,6,8,1,0,0,0,"LVALUE",0,0," e2"
106,BIT_COLON,ENUM,PARENT_NOT_SET,9,9,10,1,0,0,0,"LVALUE,PUNCTUATOR",0,0," :"
106,TYPE,NONE,PARENT_NOT_SET,11,11,19,1,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE,LVALUE",0,0," unsigned"
106,TYPE,NONE,PARENT_NOT_SET,20,20,23,1,0,0,0,"LVALUE",0,0," int"
106,BRACE_OPEN,ENUM,PARENT_NOT_SET,24,24,25,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
106,WORD,NONE,PARENT_NOT_SET,26,26,28,1,1,1,0,"IN_ENUM,STMT_START,EXPR_START,ONE_LINER",0,0," a2"
106,COMMA,NONE,PARENT_NOT_SET,28,28,29,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
106,WORD,NONE,PARENT_NOT_SET,30,30,32,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," b2"
106,COMMA,NONE,PARENT_NOT_SET,32,32,33,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
106,WORD,NONE,PARENT_NOT_SET,34,34,36,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," d2"
106,BRACE_CLOSE,ENUM,PARENT_NOT_SET,37,37,38,1,0,0,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," }"
106,SEMICOLON,ENUM,PARENT_NOT_SET,38,38,39,0,0,0,0,"PUNCTUATOR",0,0," ;"
106,NEWLINE,NONE,PARENT_NOT_SET,39,39,1,0,0,0,0,"",2,0,
108,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,29,0,0,0,0,"",0,0," // enum type : integral_type"
108,NEWLINE,NONE,PARENT_NOT_SET,29,29,1,0,0,0,0,"",1,0,
109,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START,INCOMPLETE",0,0," enum"
109,TYPE,ENUM,PARENT_NOT_SET,6,6,8,1,0,0,0,"INCOMPLETE",0,0," e3"
109,BIT_COLON,ENUM,PARENT_NOT_SET,9,9,10,1,0,0,0,"PUNCTUATOR",0,0," :"
109,TYPE,NONE,PARENT_NOT_SET,11,11,16,1,0,0,0,"STMT_START,EXPR_START",0,0," short"
109,SEMICOLON,ENUM,PARENT_NOT_SET,16,16,17,0,0,0,0,"PUNCTUATOR",0,0," ;"
109,NEWLINE,NONE,PARENT_NOT_SET,17,17,1,0,0,0,0,"",2,0,
111,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,20,0,0,0,0,"",0,0," // enum type x, ..."
111,NEWLINE,NONE,PARENT_NOT_SET,20,20,1,0,0,0,0,"",1,0,
112,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," enum"
112,TYPE,ENUM,PARENT_NOT_SET,6,6,8,1,0,0,0,"FORCE_SPACE",0,0," e3"
112,WORD,ENUM,PARENT_NOT_SET,9,9,12,1,0,0,0,"VAR_DEF,VAR_1ST",0,0," e31"
112,COMMA,NONE,PARENT_NOT_SET,12,12,13,0,0,0,0,"PUNCTUATOR",0,0," ,"
112,WORD,NONE,PARENT_NOT_SET,14,14,17,1,0,0,0,"EXPR_START,VAR_DEF",0,0," e32"
112,SEMICOLON,ENUM,PARENT_NOT_SET,17,17,18,0,0,0,0,"PUNCTUATOR",0,0," ;"
112,NEWLINE,NONE,PARENT_NOT_SET,18,18,1,0,0,0,0,"",2,0,
114,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,50,0,0,0,0,"",0,0," // enum class type : integral_type { ... } x, ..."
114,NEWLINE,NONE,PARENT_NOT_SET,50,50,1,0,0,0,0,"",1,0,
115,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START,LVALUE",0,0," enum"
115,ENUM_CLASS,NONE,PARENT_NOT_SET,6,6,11,1,0,0,0,"FORCE_SPACE,LVALUE",0,0," class"
115,TYPE,ENUM,PARENT_NOT_SET,12,12,14,1,0,0,0,"LVALUE",0,0," e4"
115,BIT_COLON,ENUM,PARENT_NOT_SET,15,15,16,1,0,0,0,"LVALUE,PUNCTUATOR",0,0," :"
115,TYPE,NONE,PARENT_NOT_SET,17,17,21,1,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE,LVALUE",0,0," long"
115,TYPE,NONE,PARENT_NOT_SET,22,22,26,1,0,0,0,"LVALUE",0,0," long"
115,BRACE_OPEN,ENUM,PARENT_NOT_SET,27,27,28,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
115,WORD,NONE,PARENT_NOT_SET,29,29,31,1,1,1,0,"IN_ENUM,STMT_START,EXPR_START,ONE_LINER",0,0," a4"
115,COMMA,NONE,PARENT_NOT_SET,31,31,32,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
115,WORD,NONE,PARENT_NOT_SET,33,33,35,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," b4"
115,COMMA,NONE,PARENT_NOT_SET,35,35,36,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
115,WORD,NONE,PARENT_NOT_SET,37,37,39,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," d4"
115,BRACE_CLOSE,ENUM,PARENT_NOT_SET,40,40,41,1,0,0,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," }"
115,WORD,NONE,PARENT_NOT_SET,42,42,45,1,0,0,0,"STMT_START,EXPR_START,VAR_DEF,VAR_1ST,VAR_INLINE",0,0," e41"
115,COMMA,NONE,PARENT_NOT_SET,45,45,46,0,0,0,0,"PUNCTUATOR",0,0," ,"
115,WORD,NONE,PARENT_NOT_SET,47,47,50,1,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE",0,0," e42"
115,COMMA,NONE,PARENT_NOT_SET,50,50,51,0,0,0,0,"PUNCTUATOR",0,0," ,"
115,WORD,NONE,PARENT_NOT_SET,52,52,55,1,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE",0,0," e43"
115,COMMA,NONE,PARENT_NOT_SET,55,55,56,0,0,0,0,"PUNCTUATOR",0,0," ,"
115,WORD,NONE,PARENT_NOT_SET,57,57,60,1,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE",0,0," e44"
115,SEMICOLON,ENUM,PARENT_NOT_SET,60,60,61,0,0,0,0,"PUNCTUATOR",0,0," ;"
115,NEWLINE,NONE,PARENT_NOT_SET,61,61,1,0,0,0,0,"",2,0,
117,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,43,0,0,0,0,"",0,0," // enum class type : integral_type { ... }"
117,NEWLINE,NONE,PARENT_NOT_SET,43,43,1,0,0,0,0,"",1,0,
118,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START,LVALUE",0,0," enum"
118,ENUM_CLASS,NONE,PARENT_NOT_SET,6,6,11,1,0,0,0,"FORCE_SPACE,LVALUE",0,0," class"
118,TYPE,ENUM,PARENT_NOT_SET,12,12,14,1,0,0,0,"LVALUE",0,0," e5"
118,BIT_COLON,ENUM,PARENT_NOT_SET,15,15,16,1,0,0,0,"LVALUE,PUNCTUATOR",0,0," :"
118,TYPE,NONE,PARENT_NOT_SET,17,17,25,1,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE,LVALUE",0,0," unsigned"
118,TYPE,NONE,PARENT_NOT_SET,26,26,29,1,0,0,0,"LVALUE",0,0," int"
118,BRACE_OPEN,ENUM,PARENT_NOT_SET,30,30,31,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
118,WORD,NONE,PARENT_NOT_SET,32,32,34,1,1,1,0,"IN_ENUM,STMT_START,EXPR_START,ONE_LINER",0,0," a5"
118,COMMA,NONE,PARENT_NOT_SET,34,34,35,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
118,WORD,NONE,PARENT_NOT_SET,36,36,38,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," b5"
118,COMMA,NONE,PARENT_NOT_SET,38,38,39,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
118,WORD,NONE,PARENT_NOT_SET,40,40,42,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," d5"
118,BRACE_CLOSE,ENUM,PARENT_NOT_SET,43,43,44,1,0,0,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," }"
118,SEMICOLON,ENUM,PARENT_NOT_SET,44,44,45,0,0,0,0,"PUNCTUATOR",0,0," ;"
118,NEWLINE,NONE,PARENT_NOT_SET,45,45,1,0,0,0,0,"",2,0,
120,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,35,0,0,0,0,"",0,0," // enum class type : integral_type"
120,NEWLINE,NONE,PARENT_NOT_SET,35,35,1,0,0,0,0,"",1,0,
121,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START,INCOMPLETE",0,0," enum"
121,ENUM_CLASS,NONE,PARENT_NOT_SET,6,6,11,1,0,0,0,"FORCE_SPACE,INCOMPLETE",0,0," class"
121,TYPE,ENUM,PARENT_NOT_SET,12,12,14,1,0,0,0,"INCOMPLETE",0,0," e6"
121,BIT_COLON,ENUM,PARENT_NOT_SET,15,15,16,1,0,0,0,"PUNCTUATOR",0,0," :"
121,TYPE,NONE,PARENT_NOT_SET,17,17,22,1,0,0,0,"STMT_START,EXPR_START",0,0," short"
121,SEMICOLON,ENUM,PARENT_NOT_SET,22,22,23,0,0,0,0,"PUNCTUATOR",0,0," ;"
121,NEWLINE,NONE,PARENT_NOT_SET,23,23,1,0,0,0,0,"",2,0,
123,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,19,0,0,0,0,"",0,0," // enum class type"
123,NEWLINE,NONE,PARENT_NOT_SET,19,19,1,0,0,0,0,"",1,0,
124,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START,INCOMPLETE",0,0," enum"
124,ENUM_CLASS,NONE,PARENT_NOT_SET,6,6,11,1,0,0,0,"FORCE_SPACE,INCOMPLETE",0,0," class"
124,TYPE,ENUM,PARENT_NOT_SET,12,12,14,1,0,0,0,"INCOMPLETE",0,0," e7"
124,SEMICOLON,ENUM,PARENT_NOT_SET,14,14,15,0,0,0,0,"PUNCTUATOR",0,0," ;"
124,NEWLINE,NONE,PARENT_NOT_SET,15,15,1,0,0,0,0,"",2,0,
126,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,39,0,0,0,0,"",0,0," // enum : integral_type { ... } x, ..."
126,NEWLINE,NONE,PARENT_NOT_SET,39,39,1,0,0,0,0,"",1,0,
127,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"STMT_START,EXPR_START,LVALUE",0,0," enum"
127,BIT_COLON,ENUM,PARENT_NOT_SET,6,6,7,1,0,0,0,"LVALUE,PUNCTUATOR",0,0," :"
127,TYPE,NONE,PARENT_NOT_SET,8,8,12,1,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE,LVALUE",0,0," long"
127,TYPE,NONE,PARENT_NOT_SET,13,13,17,1,0,0,0,"LVALUE",0,0," long"
127,BRACE_OPEN,ENUM,PARENT_NOT_SET,18,18,19,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
127,WORD,NONE,PARENT_NOT_SET,20,20,22,1,1,1,0,"IN_ENUM,STMT_START,EXPR_START,ONE_LINER",0,0," a8"
127,COMMA,NONE,PARENT_NOT_SET,22,22,23,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
127,WORD,NONE,PARENT_NOT_SET,24,24,26,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," b8"
127,COMMA,NONE,PARENT_NOT_SET,26,26,27,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
127,WORD,NONE,PARENT_NOT_SET,28,28,30,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," c8"
127,BRACE_CLOSE,ENUM,PARENT_NOT_SET,31,31,32,1,0,0,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," }"
127,WORD,NONE,PARENT_NOT_SET,33,33,36,1,0,0,0,"STMT_START,EXPR_START,VAR_DEF,VAR_1ST,VAR_INLINE",0,0," e81"
127,COMMA,NONE,PARENT_NOT_SET,36,36,37,0,0,0,0,"PUNCTUATOR",0,0," ,"
127,WORD,NONE,PARENT_NOT_SET,38,38,41,1,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE",0,0," e82"
127,SEMICOLON,ENUM,PARENT_NOT_SET,41,41,42,0,0,0,0,"PUNCTUATOR",0,0," ;"
127,NEWLINE,NONE,PARENT_NOT_SET,42,42,1,0,0,0,0,"",2,0,
129,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,23,0,0,0,0,"",0,0," // enum { ... } x, ..."
129,NEWLINE,NONE,PARENT_NOT_SET,23,23,1,0,0,0,0,"",1,0,
130,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"STMT_START,EXPR_START",0,0," enum"
130,BRACE_OPEN,ENUM,PARENT_NOT_SET,6,6,7,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
130,WORD,NONE,PARENT_NOT_SET,8,8,10,1,1,1,0,"IN_ENUM,STMT_START,EXPR_START,ONE_LINER",0,0," a9"
130,COMMA,NONE,PARENT_NOT_SET,10,10,11,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
130,WORD,NONE,PARENT_NOT_SET,12,12,14,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," b9"
130,COMMA,NONE,PARENT_NOT_SET,14,14,15,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
130,WORD,NONE,PARENT_NOT_SET,16,16,18,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," c9"
130,BRACE_CLOSE,ENUM,PARENT_NOT_SET,19,19,20,1,0,0,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," }"
130,WORD,NONE,PARENT_NOT_SET,21,21,24,1,0,0,0,"STMT_START,EXPR_START,VAR_DEF,VAR_1ST,VAR_INLINE",0,0," e91"
130,COMMA,NONE,PARENT_NOT_SET,24,24,25,0,0,0,0,"PUNCTUATOR",0,0," ,"
130,WORD,NONE,PARENT_NOT_SET,26,26,29,1,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE",0,0," e92"
130,SEMICOLON,ENUM,PARENT_NOT_SET,29,29,30,0,0,0,0,"PUNCTUATOR",0,0," ;"
130,NEWLINE,NONE,PARENT_NOT_SET,30,30,1,0,0,0,0,"",2,0,
132,UNION,NONE,PARENT_NOT_SET,1,1,6,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START,LVALUE",0,0," union"
132,TYPE,UNION,PARENT_NOT_SET,7,7,17,1,0,0,0,"FORCE_SPACE,LVALUE",0,0," API_EXPORT"
132,WORD,UNION,PARENT_NOT_SET,18,18,20,1,0,0,0,"VAR_DEF,VAR_1ST,LVALUE",0,0," u1"
132,BRACE_OPEN,BRACED_INIT_LIST,PARENT_NOT_SET,21,21,22,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
132,TYPE,NONE,PARENT_NOT_SET,23,23,26,1,1,1,0,"FORCE_SPACE,STMT_START,EXPR_START,ONE_LINER",0,0," int"
132,WORD,NONE,PARENT_NOT_SET,27,27,28,1,1,1,0,"ONE_LINER",0,0," x"
132,SEMICOLON,UNION,PARENT_NOT_SET,28,28,29,0,1,1,0,"ONE_LINER,PUNCTUATOR",0,0," ;"
132,TYPE,NONE,PARENT_NOT_SET,30,30,34,1,1,1,0,"FORCE_SPACE,STMT_START,EXPR_START,ONE_LINER",0,0," long"
132,WORD,NONE,PARENT_NOT_SET,35,35,36,1,1,1,0,"ONE_LINER",0,0," y"
132,SEMICOLON,NONE,PARENT_NOT_SET,36,36,37,0,1,1,0,"ONE_LINER,PUNCTUATOR",0,0," ;"
132,BRACE_CLOSE,BRACED_INIT_LIST,PARENT_NOT_SET,38,38,39,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," }"
132,WORD,NONE,PARENT_NOT_SET,40,40,43,1,0,0,0,"",0,0," u11"
132,COMMA,NONE,PARENT_NOT_SET,43,43,44,0,0,0,0,"PUNCTUATOR",0,0," ,"
132,DEREF,NONE,PARENT_NOT_SET,45,45,46,1,0,0,0,"EXPR_START,LVALUE,PUNCTUATOR",0,0," *"
132,WORD,NONE,PARENT_NOT_SET,46,46,49,0,0,0,0,"EXPR_START,LVALUE",0,0," u12"
132,ASSIGN,NONE,PARENT_NOT_SET,50,50,51,1,0,0,0,"PUNCTUATOR",0,0," ="
132,WORD,NONE,PARENT_NOT_SET,52,52,59,1,0,0,0,"EXPR_START",0,0," nullptr"
132,COMMA,NONE,PARENT_NOT_SET,59,59,60,0,0,0,0,"PUNCTUATOR",0,0," ,"
132,DEREF,NONE,PARENT_NOT_SET,61,61,62,1,0,0,0,"EXPR_START,LVALUE,PUNCTUATOR",0,0," *"
132,WORD,NONE,PARENT_NOT_SET,62,62,65,0,0,0,0,"EXPR_START,LVALUE",0,0," u13"
132,BRACE_OPEN,BRACED_INIT_LIST,PARENT_NOT_SET,65,65,66,0,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
132,NUMBER,NONE,PARENT_NOT_SET,66,66,67,0,1,1,0,"STMT_START,EXPR_START,ONE_LINER",0,0," 0"
132,BRACE_CLOSE,BRACED_INIT_LIST,PARENT_NOT_SET,67,67,68,0,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," }"
132,SEMICOLON,NONE,PARENT_NOT_SET,68,68,69,0,0,0,0,"PUNCTUATOR",0,0," ;"
132,NEWLINE,NONE,PARENT_NOT_SET,69,69,1,0,0,0,0,"",2,0,
134,UNION,NONE,PARENT_NOT_SET,1,1,6,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," union"
134,TYPE,UNION,PARENT_NOT_SET,7,7,17,1,0,0,0,"FORCE_SPACE",0,0," API_EXPORT"
134,TYPE,UNION,PARENT_NOT_SET,18,18,20,1,0,0,0,"FORCE_SPACE",0,0," u1"
134,WORD,NONE,PARENT_NOT_SET,21,21,24,1,0,0,0,"VAR_DEF,VAR_1ST",0,0," u21"
134,SEMICOLON,UNION,PARENT_NOT_SET,24,24,25,0,0,0,0,"PUNCTUATOR",0,0," ;"
134,NEWLINE,NONE,PARENT_NOT_SET,25,25,1,0,0,0,0,"",1,0,
Can't render this file because it has a wrong number of fields in line 3.

@ -1,2 +0,0 @@
indent_off_after_return = true
indent_off_after_return_new = false

@ -1,2 +0,0 @@
# Add or remove space between an open paren and comma: '(,' vs '( ,'. Default=Force.
sp_paren_comma = remove

@ -1,26 +0,0 @@
#include <type_traits>
template <
typename ... Args,
typename E = typename std::enable_if<(sizeof...(Args) >= 1), bool>::type
>
void fun1(Args&& ... args)
{
}
template <
typename ... Args,
typename E = typename std::enable_if<(sizeof...(Args) > 1), bool>::type
>
void fun2(Args&& ... args)
{
}
template <
typename ... Args,
typename E = typename std::enable_if<(sizeof...(Args) < 3), bool>::type
>
void fun3(Args&& ... args)
{
}

@ -1,9 +0,0 @@
void func() {
}
// **ABC**
void func() { }
// *INDENT-ON*
void func() {
}

@ -1,6 +0,0 @@
namespace Constants
{
double PI = 3.14;
}
int factor = 41;
double result = Constants::PI * factor;

@ -1,6 +0,0 @@
void Foo1(BarType & x, void BarFunc());
void Bar()
{
void BarFunc2(BarType & x);
}

@ -1,69 +0,0 @@
/* EditorApplication */
#include <string>
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
class HierarchyState;
@interface EditorApplication : NSObject
{
IBOutlet id m_MainWindow;
IBOutlet id m_PaneController;
id m_RenderTimer;
IBOutlet id m_CutItem;
IBOutlet id m_CopyItem;
IBOutlet id m_PasteItem;
IBOutlet id m_DuplicateItem;
IBOutlet id m_DeleteItem;
IBOutlet id m_FrameSelectedItem;
IBOutlet id m_FindItem;
IBOutlet id m_SelectAllItem;
}
- (IBAction)SaveAssets:(id)sender;
- (IBAction)CloseScene:(id)sender;
- (IBAction)NewProject:(id)sender;
- (IBAction)OpenProject:(id)sender;
- (IBAction)SaveAsSceneToDisk:(id)sender;
- (IBAction)EnterSerialNumber:(id)sender;
- (IBAction)ReturnLicense:(id)sender;
- (IBAction)CompileScene:(id)sender;
- (IBAction)CompileSceneAutomatic:(id)sender;
- (IBAction)saveDocument:(id)sender;
- (IBAction)LoadSceneFromDisk:(id)sender;
- (void)RemoveDisplayTimer;
- (void)RegisterUpdateTimer:(int)frequency;
- (void)refreshModifiedFile:(NSAppleEventDescriptor*)event withReplyEvent:(NSAppleEventDescriptor*)replyEvent;
- (void)closeFile:(NSAppleEventDescriptor*)event withReplyEvent:(NSAppleEventDescriptor*)replyEvent;
- (IBAction)ShowAboutDialog:(id)sender;
- (IBAction)ShowPreferences:(id)sender;
- (IBAction)ShowPackageManager:(id)sender;
- (IBAction) delete:(id)sender;
- (IBAction) copy:(id)action;
- (IBAction)paste:(id)action;
- (IBAction)duplicate:(id)action;
- (IBAction)cut:(id)action;
- (IBAction)selectAll:(id)action;
- (IBAction)find:(id)action;
- (IBAction)frameSelected:(id)action;
- (IBAction)frameSelectedWithLock:(id)action;
// Assetstore protocol handler and registration
- (void)registerAssetStoreURLProtocol;
- (void)getUrl:(NSAppleEventDescriptor*)event withReplyEvent:(NSAppleEventDescriptor*)replyEvent;
@end
#endif

@ -1,6 +0,0 @@
namespace Constants
{
double PI = 3.14;
}
int factor = 41;
double result = Constants::PI * factor;

@ -1,38 +0,0 @@
int foo1()
{
return std::pair<int, int>{
1, 2
}.first;
}
int foo2()
{
return
int{3} & 2;
}
int foo3()
{
constexpr static int x = 3;
return
decltype(x){x} & 2;
}
int foo4()
{
return
new Type();
}
int foo5()
{
return
veryLongMethodCall(
arg1,
longMethodCall(
methodCall(
arg2, arg3
), arg4
)
);
}

@ -1,7 +0,0 @@
void func() { }
// **ABC**
void func() { }
// *INDENT-ON*
void func() { }

@ -0,0 +1,32 @@
---
name: uncrustify_test
on: [push]
jobs:
check-uncrustify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: cmake-part-and-tests
env:
BADGE: linux
run: mkdir build;
cd build;
cmake -DCMAKE_BUILD_TYPE=Release ..;
make;
../scripts/run_ctest.py
debug-ninja-uncrustify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: seanmiddleditch/gha-setup-ninja@master
- name: cmake-part-and-tests
env:
BADGE: linux
run: mkdir build;
cd build;
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug ..;
ninja;
../scripts/run_ctest.py

@ -1,6 +1,9 @@
# "Default" build tree
/build/
# PyCharm help directory
venv/
# Compiled Python code
*.pyc
@ -56,3 +59,6 @@ xcuserdata
# CLion
.idea/
cmake-build-*/
# Vim
*.swp

@ -3,16 +3,6 @@ sudo: false
matrix:
include:
# keep a test with old ubuntu version, xenial 16
# 1
- os: linux
dist: Xenial
env: BADGE=linux BUILD_TYPE=debug
addons:
apt:
update: true
packages:
- ninja-build
# bionic 18
# 2

@ -16,15 +16,20 @@ Anirban Pramanick
Antti Tapaninen
Arne Forlie
Arseniy Shestakov
asobhy
atauzki
Aurélien Gâteau
Benio
Ben Iofel
Ben Mayo
Beren Minor
Biswa96
Biswapriyo Nath
B. Kevin Hardman
Bogdan Popescu
Brandon Slack
Brendan Long
CharlieYJH
Chris Lalancette
Clemens Rabe
Code Able
@ -34,6 +39,7 @@ Daniel Chumak
Dan Rose
Dave Lee
David Catmull
David E. O'Brien
David Lechner
David Schaefgen
Dirk Thomas
@ -42,6 +48,7 @@ Dmitry Marakasov
Dmitry Povolotsky
Dmytro Povolotskyi
Dženan Zukić
Eism
Emerson Knapp
Emmanuel Christophe
Ethan Gao
@ -51,6 +58,7 @@ Ger Hobbelt
Hackerpilot
Hannes Schmidt
Huang-Ming Huang
Husk3r
Ilya Lyubimov
Ingo Brückl
Ivan Nazarenko
@ -58,6 +66,7 @@ Ivan Romanov
Jakub Schmidtke
Jan Weiß
Jason
JavDevGames
Jeremy H
Jeremy T Hilliker
Jim Meyering
@ -89,22 +98,27 @@ Matthew McDole
Matthew Woehlke
Maxim Mikityanskiy
Max Smolens
MeXx
Michaël Peeters
Michele Calgaro
Mihai Popescu
Mike
Mike Gelfand
Mirko König
MrTheMake
Nate
neok-m4700
Nico Decker
Oleg Liatte
Oleg Smolsky
Owen Rudge
Pat Notz
Patrick Rohr
Paul Cercueil
Paul Smith
Pavel Geiger
Pawel Benetkiewicz
Paweł Benetkiewicz
PerfectCarl
Peter Bruin
Peter Hartley
@ -118,21 +132,27 @@ RaveTheTadpole
Roland Schulz
Ryan Maxwell
Samish Chandra Kolli
Samish Kolli
Scott Bilas
Sebastian Andersson
S. Gilles
Shazron Abdullah
Siddharth Kannan
Spark-NF
Stefan Koch
Stefan Nunninger
Stephen Gilles
Steven Lee
Suhaib Ishaque
t-bltg
Tim Hütz
Timotheus Pokorra
Todd Richmond
Twigz
U-RDEC\ParkerJS
Vadim Zeitlin
Viktor Kireev
Vincent Rouillé
Vyacheslav Shegai
Waldir Pimenta
Yannick Bühler

@ -17,7 +17,8 @@ include(CheckCXXSymbolExists)
include(CheckTypeSize)
include(CTest)
find_package(PythonInterp REQUIRED)
find_package(Python3 REQUIRED)
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
#
# Check compiler flags
@ -130,7 +131,7 @@ endif()
# Generate uncrustify_version.h
#
set(UNCRUSTIFY_VERSION "0.72.0_f")
set(UNCRUSTIFY_VERSION "0.73.0_f")
option(NoGitVersionString "Do not use make_version.py and git to build a version string" OFF)
if(NoGitVersionString)
@ -259,12 +260,12 @@ set(uncrustify_sources
src/backup.cpp
src/brace_cleanup.cpp
src/braces.cpp
src/calculate_closing_brace_position.cpp
src/chunk_list.cpp
src/ChunkStack.cpp
src/combine.cpp
src/combine_fix_mark.cpp
src/combine_labels.cpp
# src/combine_mark.cpp
src/combine_tools.cpp
src/combine_skip.cpp
src/compat_posix.cpp
@ -272,11 +273,12 @@ set(uncrustify_sources
src/cs_top_is_question.cpp
src/detect.cpp
src/enum_cleanup.cpp
src/EnumStructUnionParser.cpp
src/EnumStructUnionParser.h
src/flag_braced_init_list.cpp
src/flag_decltype.cpp
src/flag_parens.cpp
src/frame_list.cpp
# src/handle_oc.cpp
src/indent.cpp
src/keywords.cpp
src/lang_pawn.cpp
@ -290,6 +292,7 @@ set(uncrustify_sources
src/options_for_QT.cpp
src/output.cpp
src/parens.cpp
src/parent_for_pp.cpp
src/ParseFrame.cpp
src/pcf_flags.cpp
src/punctuators.cpp
@ -313,6 +316,7 @@ set(uncrustify_sources
)
set(uncrustify_headers
src/add_space_table.h
src/align_add.h
src/align_asm_colon.h
src/align_assign.h
@ -341,13 +345,13 @@ set(uncrustify_headers
src/base_types.h
src/brace_cleanup.h
src/braces.h
src/calculate_closing_brace_position.h
src/char_table.h
src/chunk_list.h
src/ChunkStack.h
src/combine.h
src/combine_fix_mark.h
src/combine_labels.h
# src/combine_mark.h
src/combine_skip.h
src/combine_tools.h
src/compat.h
@ -360,7 +364,6 @@ set(uncrustify_headers
src/flag_decltype.h
src/flag_parens.h
src/frame_list.h
# src/handle_oc.h
src/indent.h
src/keywords.h
src/lang_pawn.h
@ -377,6 +380,7 @@ set(uncrustify_headers
src/options.h
src/output.h
src/parens.h
src/parent_for_pp.h
src/ParseFrame.h
src/pcf_flags.h
src/prototypes.h
@ -499,7 +503,7 @@ include(CPack)
#
# Install
#
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
if(MSVC)
install(TARGETS uncrustify DESTINATION ".")
install(FILES ${uncrustify_docs}
DESTINATION "."

@ -81,6 +81,14 @@ There are lots of ways to contribute to Uncrustify:
(a rephrasing of the branch name if set correctly).
- The PR description should document the _why_ the change needed to be done
and not _how_, which should be obvious by doing the code review.
- After commiting a new PR, one may have a look to the results, running under other OS:
https://travis-ci.com/
Sign in
SIGN IN WITH GITHUB
you get a view of <your github account> / uncrustify
https://coveralls.io/github/uncrustify/uncrustify
[master]: https://github.com/uncrustify/uncrustify/tree/master
[commits]: https://chris.beams.io/posts/git-commit/

@ -1,3 +1,28 @@
Change highlights in uncrustify-0.73.0 (May 2021)
-------------------------------------------------------------------------------
b514f25120b12db7b1ca57cdb93dd929a5bf43c4
Added : indent_before_class_colon Nov 16 2020
39c969b69663f6e6cee9673e23d349a308edc44a
Added : sp_cmt_cpp_region Dec 9 2020
9ca37d0c32729570de2e51c97338bc567e124ae3
Added : cmt_sp_before_doxygen_javadoc_tags Dec 24 2020
Added : cmt_align_doxygen_javadoc_tags Dec 24 2020
84e2c750d19b47bbe2547141b092855ec1f64424
Added : cmt_reflow_fold_regex_file Dec 24 2020
3a8e33a12839ca3bac2e1e0b49eb279362a2ab89
Added : processing_cmt_as_regex Dec 31 2020
c622135751824705979d37681fe16d9a60e3d77a
Added : cmt_reflow_indent_to_paragraph_start Jan 9 2021
9c0799aa096b68550507980a32a529099caf97c5
Added : sp_cpp_lambda_argument_list Jan 19 2021
02054b1085166903e8c1384308ac7922cb57bd59
Added : nl_do_leave_one_liners Jan 29 2021
6a4d27914fca0c64273fad979355e16021626f8a
Added : debug_truncate Feb 7 2021
a711e96ef7be6afc9f014c4c7e1e5ea5347aad0d
Added : indent_comma_brace Mar 9 2021
Change highlights in uncrustify-0.72.0 (November 2020)
-------------------------------------------------------------------------------
new command option:

@ -11,7 +11,7 @@
A source code beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and VALA
## Features
* Highly configurable - 742 configurable options as of version 0.72.0
* Highly configurable - 753 configurable options as of version 0.73.0
- <details><summary>add/remove spaces</summary>
- `sp_before_sparen`: _Add or remove space before '(' of 'if', 'for', 'switch', 'while', etc._
@ -171,7 +171,7 @@ The configuration file `testConfigFileName` has to be located inside `tests/conf
the input file `testInputFileName` inside `tests/input/<testSetName>/`,
and expected results file inside the `tests/expected/<testSetName>/`
directory.
Expected results have the following naming convention: `testNr-testConfigFileName`.
Expected results have the following naming convention: `testNr-testInputFileName`.
Optionally a `!` can follow the `testNr` to enable a custom rerun
configuration.
@ -322,7 +322,7 @@ $ uncrustify -h
Uncrustify usually reads configuration files that are passed via the `-c`
flag. If the flag is not provided Uncrustify will try to find a
configuration file via the `UNCRUSTIFY_CONFIG` environment variable or a
file with the name `uncrustify` or `.uncrustify` in your home folder.
file with the name `.uncrustify.cfg` or `uncrustify.cfg` in your home folder.
To get a list of:
- all available options use:
@ -372,3 +372,6 @@ as uncrustify exits.
You can open the command prompt (which is an interactive terminal
window that allows you to run commands without it closing as soon as
they exit) and run uncrustify.exe there.
## Using uncrustify with vim
Have a look [here]https://github.com/cofyc/vim-uncrustify

@ -25,7 +25,7 @@ before_build:
- cd c:\projects\uncrustify
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DUNCRUSTIFY_SEPARATE_TESTS=ON -G "%GENERATOR%" ..
- cmake -DUNCRUSTIFY_SEPARATE_TESTS=ON -G "%GENERATOR%" ..
build_script:
- cmake --build . --config %CONFIGURATION%
test_script:

@ -0,0 +1,246 @@
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2003 Christopher L Cheney <ccheney@debian.org>
# Copyright © 2019 TDE Team
# Description: A class for TDE packages; sets TDE environment variables, etc
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# 02111-1307 USA.
ifndef _cdbs_bootstrap
_cdbs_scripts_path ?= /usr/lib/cdbs
_cdbs_rules_path ?= /usr/share/cdbs/1/rules
_cdbs_class_path ?= /usr/share/cdbs/1/class
endif
ifndef _cdbs_class_debian-qt-kde
_cdbs_class_debian-qt-kde := 1
# for dh_icons
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), debhelper (>= 5.0.7ubuntu4)
# Note: This _must_ be included before autotools.mk, or it won't work.
common-configure-arch common-configure-indep:: debian/stamp-cvs-make
debian/stamp-cvs-make:
ifndef _cdbs_class_cmake
cp -Rp /usr/share/aclocal/libtool.m4 admin/libtool.m4.in
ifneq "$(wildcard /usr/share/libtool/config/ltmain.sh)" ""
cp -Rp /usr/share/libtool/config/ltmain.sh admin/ltmain.sh
endif
ifneq "$(wildcard /usr/share/libtool/build-aux/ltmain.sh)" ""
cp -Rp /usr/share/libtool/build-aux/ltmain.sh admin/ltmain.sh
endif
$(MAKE) -C $(DEB_SRCDIR) -f admin/Makefile.common dist;
endif
touch debian/stamp-cvs-make
include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
ifdef _cdbs_tarball_dir
DEB_BUILDDIR = $(_cdbs_tarball_dir)/obj-$(DEB_BUILD_GNU_TYPE)
else
DEB_BUILDDIR = obj-$(DEB_BUILD_GNU_TYPE)
endif
ifndef _cdbs_class_cmake
include $(_cdbs_class_path)/autotools.mk$(_cdbs_makefile_suffix)
endif
ifdef _cdbs_class_cmake
ifneq "$(wildcard /usr/bin/ninja)" ""
MAKE = ninja -v
DEB_MAKE_ENVVARS += DESTDIR=$(DEB_DESTDIR)
DEB_MAKE_INSTALL_TARGET = install
DEB_CMAKE_NORMAL_ARGS += -GNinja
endif
endif
ifndef _cdbs_rules_patchsys_quilt
DEB_PATCHDIRS := debian/patches/common debian/patches
endif
export kde_cgidir = \$${libdir}/cgi-bin
export kde_confdir = \$${sysconfdir}/trinity
export kde_htmldir = \$${datadir}/doc/tde/HTML
DEB_KDE_ENABLE_FINAL := yes
DEB_INSTALL_DOCS_ALL :=
DEB_DH_MAKESHLIBS_ARGS_ALL := -V
DEB_SHLIBDEPS_INCLUDE = $(foreach p,$(PACKAGES_WITH_LIBS),debian/$(p)/usr/lib)
DEB_AC_AUX_DIR = $(DEB_SRCDIR)/admin
DEB_CONFIGURE_INCLUDEDIR = "\$${prefix}/include"
DEB_COMPRESS_EXCLUDE = .dcl .docbook -license .tag .sty .el
# The default gzip compressor has been changed in dpkg >= 1.17.0.
deb_default_compress = $(shell LANG=C dpkg-deb --version | head -n1 | \
sed -e "s|.*version ||" -e "s| .*||" | \
xargs -r dpkg --compare-versions 1.17.0 lt \
&& echo xz || echo gzip)
ifeq ($(deb_default_compress),gzip)
DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \
&& echo xz || echo bzip2)
endif
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
cdbs_treat_me_gently_arches := arm m68k alpha ppc64 armel armeb
ifeq (,$(filter $(DEB_HOST_ARCH_CPU),$(cdbs_treat_me_gently_arches)))
cdbs_kde_enable_final = $(if $(DEB_KDE_ENABLE_FINAL),--enable-final,)
else
cdbs_kde_enable_final =
endif
endif
ifneq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
cdbs_kde_enable_final =
cdbs_kde_enable_debug = --enable-debug=yes
else
cdbs_kde_enable_debug = --disable-debug
endif
ifneq (,$(filter debug,$(DEB_BUILD_OPTIONS)))
cdbs_kde_enable_debug = --enable-debug=full
endif
DEB_BUILD_PARALLEL ?= true
cdbs_configure_flags += \
--with-qt-dir=/usr/share/qt3 \
--disable-rpath \
--with-xinerama \
$(cdbs_kde_enable_final) \
$(cdbs_kde_enable_debug)
# This is a convenience target for calling manually.
# It's not part of the build process.
buildprep: clean apply-patches
ifndef _cdbs_class_cmake
$(MAKE) -f admin/Makefile.common dist
endif
debian/rules clean
.tdepkginfo:
echo "# TDE package information" >.tdepkginfo
dpkg-parsechangelog | sed -n "s|^Source: |Name: |p" >>.tdepkginfo
dpkg-parsechangelog | sed -n "s|^Version: |Version: |p" >>.tdepkginfo
date +"DateTime: %m/%d/%Y %H:%M" -u -d "$$(dpkg-parsechangelog | sed -n 's|^Date: ||p')" >>.tdepkginfo
post-patches:: .tdepkginfo
common-build-arch:: debian/stamp-man-pages
debian/stamp-man-pages:
if ! test -d debian/man/out; then mkdir -p debian/man/out; fi
for f in $$(find debian/man -name '*.sgml'); do \
docbook-to-man $$f > debian/man/out/`basename $$f .sgml`.1; \
done
for f in $$(find debian/man -name '*.man'); do \
soelim -I debian/man $$f \
> debian/man/out/`basename $$f .man`.`head -n1 $$f | awk '{print $$NF}'`; \
done
touch debian/stamp-man-pages
common-binary-indep::
( set -e; \
tmpf=`mktemp debian/versions.XXXXXX`; \
perl debian/cdbs/versions.pl >$$tmpf; \
for p in $(DEB_INDEP_PACKAGES); do \
cat $$tmpf >>debian/$$p.substvars; \
done; \
rm -f $$tmpf )
common-binary-arch::
( set -e; \
tmpf=`mktemp debian/versions.XXXXXX`; \
perl debian/cdbs/versions.pl >$$tmpf; \
for p in $(DEB_ARCH_PACKAGES); do \
cat $$tmpf >>debian/$$p.substvars; \
done; \
rm -f $$tmpf )
# update multi-arch path in install files
ls -d debian/* | \
grep -E "(install|links)$$" | \
while read a; do \
[ -d $$a ] || [ -f $$a.arch ] || \
! grep -q "\$$(DEB_HOST_MULTIARCH)" $$a || \
sed -i.arch "s|\$$(DEB_HOST_MULTIARCH)|$(DEB_HOST_MULTIARCH)|g" $$a; \
done
clean::
rm -rf debian/man/out
-rmdir debian/man
rm -f debian/stamp-man-pages
rm -rf debian/shlibs-check
# revert multi-arch path in install files
ls -d debian/* | \
grep -E "(install|links)$$" | \
while read a; do \
[ ! -f $$a.arch ] || \
mv $$a.arch $$a; \
done
$(patsubst %,binary-install/%,$(DEB_PACKAGES)) :: binary-install/%:
if test -x /usr/bin/dh_icons; then dh_icons -p$(cdbs_curpkg) $(DEB_DH_ICONCACHE_ARGS); fi
if test -x /usr/bin/dh_desktop; then dh_desktop -p$(cdbs_curpkg) $(DEB_DH_DESKTOP_ARGS); fi
if test -e debian/$(cdbs_curpkg).lintian; then \
install -p -D -m644 debian/$(cdbs_curpkg).lintian \
debian/$(cdbs_curpkg)/usr/share/lintian/overrides/$(cdbs_curpkg); \
fi
if test -e debian/$(cdbs_curpkg).presubj; then \
install -p -D -m644 debian/$(cdbs_curpkg).presubj \
debian/$(cdbs_curpkg)/usr/share/bug/$(cdbs_curpkg)/presubj; \
fi
binary-install/$(DEB_SOURCE_PACKAGE)-doc-html::
set -e; \
for doc in `cd $(DEB_DESTDIR)/opt/trinity/share/doc/tde/HTML/en; find . -name index.docbook`; do \
pkg=$${doc%/index.docbook}; pkg=$${pkg#./}; \
echo Building $$pkg HTML docs...; \
mkdir -p $(CURDIR)/debian/$(DEB_SOURCE_PACKAGE)-doc-html/opt/trinity/share/doc/tde/HTML/en/$$pkg; \
cd $(CURDIR)/debian/$(DEB_SOURCE_PACKAGE)-doc-html/opt/trinity/share/doc/tde/HTML/en/$$pkg; \
/opt/trinity/bin/meinproc $(DEB_DESTDIR)/opt/trinity/share/doc/tde/HTML/en/$$pkg/index.docbook; \
done
for pkg in $(DOC_HTML_PRUNE) ; do \
rm -rf debian/$(DEB_SOURCE_PACKAGE)-doc-html/opt/trinity/share/doc/tde/HTML/en/$$pkg; \
done
common-build-indep:: debian/stamp-kde-apidox
debian/stamp-kde-apidox:
$(if $(DEB_KDE_APIDOX),+$(DEB_MAKE_INVOKE) apidox)
touch $@
common-install-indep:: common-install-kde-apidox
common-install-kde-apidox::
$(if $(DEB_KDE_APIDOX),+DESTDIR=$(DEB_DESTDIR) $(DEB_MAKE_INVOKE) install-apidox)
cleanbuilddir::
-$(if $(call cdbs_streq,$(DEB_BUILDDIR),$(DEB_SRCDIR)),,rm -rf $(DEB_BUILDDIR))
clean::
ifndef _cdbs_class_cmake
if test -n "$(DEB_KDE_CVS_MAKE)" && test -d $(DEB_SRCDIR); then \
cd $(DEB_SRCDIR); \
find . -name Makefile.in -print | \
xargs --no-run-if-empty rm -f; \
rm -f Makefile.am acinclude.m4 aclocal.m4 config.h.in \
configure configure.files configure.in stamp-h.in \
subdirs; \
fi
endif
rm -f .tdepkginfo
rm -f debian/stamp-kde-apidox
rm -f debian/stamp-cvs-make
endif

@ -0,0 +1,19 @@
#!/usr/bin/env perl
use strict;
use warnings;
my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
($version2_next = $version2) =~ s/(?<=\.)(\d+)$/($1+1)/e;
print "TDE-Version3=$version3\n";
print "TDE-Version2=$version2\n";
print "TDE-Next-Version3=$version3_next\n";
print "TDE-Next-Version2=$version2_next\n";

@ -1,3 +1,9 @@
uncrustify-trinity (0.73.0-0debian11.0.0+0) unstable; urgency=medium
* TDE version of upstream 0.73.0
-- Michele Calgaro <michele.calgaro@yahoo.it> Wed, 19 May 2021 15:58:50 +0900
uncrustify-trinity (0.72.0-0debian11.0.0+8) unstable; urgency=medium
* Switch to build using ninja-build

@ -2,11 +2,9 @@ Source: uncrustify-trinity
Section: deps-r14/devel
Priority: optional
Maintainer: Alexander GQ Gerasiov <gq@debian.org>
Build-Depends: debhelper (>= 9~), cmake (>= 3.0~), ninja-build, python3 (>= 3.3~), gcc (>= 4:4.9~)
Build-Depends: cdbs, debhelper (>= 9~), quilt, cmake (>= 3.0~), ninja-build, python3 (>= 3.3~), gcc (>= 4:4.9~)
Standards-Version: 4.5.0
Homepage: https://github.com/uncrustify/uncrustify
Vcs-Git: https://salsa.debian.org/debian/uncrustify.git
Vcs-Browser: https://salsa.debian.org/debian/uncrustify
Package: uncrustify-trinity
Architecture: any

@ -9,7 +9,7 @@ Customize and repackage as a TDE package.
if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
message(FATAL_ERROR "
@@ -231,7 +231,7 @@
@@ -232,7 +232,7 @@
#
# Uncrustify
#
@ -18,16 +18,16 @@ Customize and repackage as a TDE package.
src/align_add.cpp
src/align_asm_colon.cpp
src/align_assign.cpp
@@ -312,7 +312,7 @@
@@ -315,7 +315,7 @@
${PROJECT_BINARY_DIR}/src/option_enum.cpp
)
-set(uncrustify_headers
+set(uncrustify-trinity_headers
src/add_space_table.h
src/align_add.h
src/align_asm_colon.h
src/align_assign.h
@@ -404,7 +404,7 @@
@@ -408,7 +408,7 @@
${PROJECT_BINARY_DIR}/uncrustify_version.h
)
@ -36,7 +36,7 @@ Customize and repackage as a TDE package.
"${PROJECT_SOURCE_DIR}/AUTHORS"
"${PROJECT_SOURCE_DIR}/BUGS"
"${PROJECT_SOURCE_DIR}/ChangeLog"
@@ -413,31 +413,31 @@
@@ -417,31 +417,31 @@
"${PROJECT_SOURCE_DIR}/README.md"
)
@ -75,7 +75,7 @@ Customize and repackage as a TDE package.
#
# Generate uncrustify.xml (katepart highlighting file)
@@ -459,7 +459,7 @@
@@ -463,7 +463,7 @@
#
OPTION(ENABLE_CODECOVERAGE "Enable code coverage testing support")
if(ENABLE_CODECOVERAGE)
@ -84,7 +84,7 @@ Customize and repackage as a TDE package.
include(${CMAKE_SOURCE_DIR}/cmake/CodeCoverage.cmake)
endif(ENABLE_CODECOVERAGE)
@@ -467,10 +467,10 @@
@@ -471,10 +471,10 @@
# Build command to run uncrustify on its own sources
#
add_custom_target(format-sources)
@ -97,7 +97,7 @@ Customize and repackage as a TDE package.
-c forUncrustifySources.cfg
-lCPP --no-backup ${source}
COMMENT "Formatting ${source}"
@@ -482,7 +482,7 @@
@@ -486,7 +486,7 @@
#
# Package
#
@ -106,10 +106,10 @@ Customize and repackage as a TDE package.
set(CPACK_PACKAGE_VERSION "${UNCRUSTIFY_VERSION}")
set(CPACK_PACKAGE_VENDOR "Ben Gardner")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Code beautifier")
@@ -500,8 +500,8 @@
@@ -504,8 +504,8 @@
# Install
#
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
if(MSVC)
- install(TARGETS uncrustify DESTINATION ".")
- install(FILES ${uncrustify_docs}
+ install(TARGETS uncrustify-trinity DESTINATION ".")
@ -117,7 +117,7 @@ Customize and repackage as a TDE package.
DESTINATION "."
)
install(FILES "${PROJECT_SOURCE_DIR}/documentation/htdocs/index.html"
@@ -513,17 +513,17 @@
@@ -517,17 +517,17 @@
)
else()
include(GNUInstallDirs)
@ -167,19 +167,19 @@ Customize and repackage as a TDE package.
-d --git ${GIT_EXECUTABLE}
--result-dir ${CMAKE_CURRENT_BINARY_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@@ -71,7 +71,7 @@
NAME cli_options
@@ -72,7 +72,7 @@
COMMAND ${PYTHON_EXECUTABLE}
test_cli_options.py
--config $<CONFIG>
- --build ${uncrustify_BINARY_DIR}
+ --build ${uncrustify-trinity_BINARY_DIR}
--diff
${_configs}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cli
@@ -80,10 +80,10 @@
add_custom_target(update-cli-options
@@ -82,10 +82,10 @@
COMMAND ${PYTHON_EXECUTABLE}
test_cli_options.py
--config $<CONFIG>
- --build ${uncrustify_BINARY_DIR}
+ --build ${uncrustify-trinity_BINARY_DIR}
--apply
@ -201,7 +201,7 @@ Customize and repackage as a TDE package.
If reading from stdin, you should specify the language using -l
--- a/tests/cli/test_cli_options.py
+++ b/tests/cli/test_cli_options.py
@@ -482,16 +482,16 @@
@@ -486,16 +486,16 @@
bin_found = False
uncr_bin = ''
bd_dir = parsed_args.build

@ -8,7 +8,7 @@ Index: b/CMakeLists.txt
project(uncrustify-trinity)
@@ -51,8 +51,12 @@
@@ -52,8 +52,12 @@
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif()
@ -23,7 +23,7 @@ Index: b/CMakeLists.txt
if(ENABLE_SANITIZER)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1 -fno-omit-frame-pointer -fsanitize=${ENABLE_SANITIZER}")
@@ -139,8 +143,13 @@
@@ -140,8 +144,13 @@
else()
# Add target to generate version header;
# do this every build to ensure git SHA is up to date

@ -1,8 +1,8 @@
Fixed usage message to match uncrustify-trinity.
--- a/src/uncrustify.cpp
+++ b/src/uncrustify.cpp
@@ -309,14 +309,14 @@
" --decode : Decode remaining args (chunk flags) and exit.\n"
@@ -295,14 +295,14 @@
" Cannot be used with the -o option'\n"
"\n"
"Usage Examples\n"
- "cat foo.d | uncrustify -q -c my.cfg -l d\n"
@ -27,7 +27,7 @@ Fixed usage message to match uncrustify-trinity.
--- a/tests/cli/output/help.txt
+++ b/tests/cli/output/help.txt
@@ -60,14 +60,14 @@
--decode : Decode remaining args (chunk flags) and exit.
Cannot be used with the -o option'
Usage Examples
-cat foo.d | uncrustify -q -c my.cfg -l d

@ -2,6 +2,3 @@
002_trinity_customization.diff
003_allow_older_distributions.diff
004_fixed_usage.diff
005_upstream_45681e88.diff
006_upstream_64d93e3fb.diff
007_issue_3040.diff

@ -0,0 +1,15 @@
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/cmake.mk
include debian/cdbs/debian-tde.mk
DEB_CMAKE_EXTRA_FLAGS := \
-DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_VERBOSE_MAKEFILE="ON" \
-DCMAKE_SKIP_RPATH="OFF" \
-DBUILD_TESTING="ON" \
-DUNCRUSTIFY_SEPARATE_TESTS="ON"
DEB_MAKE_CHECK_TARGET = test

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

@ -0,0 +1,52 @@
2020-11-09
Tracking is used to put some marks within a copy of the source and
in the log file. uncrustify generate a HTML file with the marks.
Using a browser, one can see where, which options are working.
The command option is:
uncrustify --tracking Track.html -c config-FILE -f source-FILE -L A 2>A.txt
Tracking puts a red "M" in the source to show where the options are working.
A tracking number is used and writen in the Track.html file and the output file A.txt
to make possible to link the changes together.
An example:
tracking.cpp
{
a = b + 111-55;
}
The config file:
indent_with_tabs = 0
sp_arith = force
sp_assign = force
The tracking file is:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Uncrustify: where do the Spaces options work</title>
</head>
<body lang="en-US">
<p>
</p>
<pre>
{
a<a title="1,8,sp_assign"><font color="red">M</font></a>=<a title="2,9,16,sp_assign"><font color="red">M</font><
/a>b<a title="3,10,17,22,sp_arith"><font color="red">M</font></a>+<a title="4,11,18,23,27,sp_arith"><font color="red">M<
/font></a>111<a title="5,12,19,24,28,31,sp_arith"><font color="red">M</font></a>-<a title="6,13,20,25,29,32,34,sp_arith"
><font color="red">M</font></a>55<a title="7,14,21,26,30,33,35,36,sp_before_semi"><font color="red">M</font></a>;
}
</pre>
</body>
</html>
Use it with a browser and you can see the red "M"s.
Let put the cursor on the "M"s, and you see the tracking number and the option used.
(look at the picture track.jpg)

@ -0,0 +1,22 @@
2021-01-23
Guy Maurel
The do_space function within the file space.cpp controls the space between every two tokens.
There are three categories of actions.
The first one is the most important.
Options control what is to do with the interval between the two token:
* "Ignore" means do not change it.
* "Add" in the context of spaces means make sure there is at least 1.
* "Add" elsewhere means make sure one is present.
* "Remove" mean remove the space/brace/newline/etc.
* "Force" in the context of spaces means ensure that there is exactly 1.
* "Force" in other contexts means the same as "add".
For example the option "sp_before_assign":
Add or remove space before assignment operator '=', '+=', etc.
in such a statement:
a =5;
The second categorie is used for all positions where no option is coded.
The third categorie is a debug for the developer, who still have something to do.

@ -54,7 +54,7 @@ Create a highly configurable, easily modifiable source code beautifier.</p>
<li>Add or remove parens on return statements</li>
<li>Add or remove braces on single-statement if/do/while/for statements</li>
<li>Supports embedded SQL 'EXEC SQL' stuff</li>
<li>Highly configurable - 742 configurable options as of version 0.72.0</li>
<li>Highly configurable - 753 configurable options as of version 0.73.0</li>
</ul>
<p>

@ -176,18 +176,26 @@ void * bar()
<a title="sp_paren_qualifier"><strong><font color="red"></font></strong></a>
void ncName() override;
<a title="sp_paren_qualifier"><strong><font color="red"></font></strong></a>
template < int ... X > int bar2()
{
auto s = sizeof ... ( X );
<a title="sp_sizeof_ellipsis"><strong><font color="red"></font></strong></a><a title="sp_sizeof_ellipsis_paren"><strong><font color="red"></font></strong></a>
chomp( X ) ...;
<a title="sp_paren_ellipsis"><strong><font color="red"></font></strong></a>
return X + ...;
}
template < int ... X > int bar2()
<a title="sp_type_ellipsis"><strong><font color="red"></font></strong></a>
{
auto s = sizeof ... ( X );
<a title="sp_sizeof_ellipsis"><strong><font color="red"></font></strong></a><a title="sp_sizeof_ellipsis_paren"><strong><font color="red"></font></strong></a>
chomp( X ) ...;
<a title="sp_paren_ellipsis"><strong><font color="red"></font></strong></a>
return X + ...;
}
do amime3(); while (false);
<a title="sp_while_paren_open"><strong><font color="red"></font></strong></a>
auto b0 = unknown_kw { 2 };
<a title="sp_word_brace_init_lst"><strong><font color="red"></font></strong></a>
if (data) go = new ClassA();
<a title="sp_skip_vbrace_tokens"><strong><font color="red"></font></strong></a>
else go = new ClassB();
<a title="sp_skip_vbrace_tokens"><strong><font color="red"></font></strong></a>
auto f0(int a, int b) -> int;
<a title="sp_trailing_return"><strong><font color="red"> █ █</font></strong></a>
</pre>
</td>
</tr>
@ -374,11 +382,13 @@ void Initialize( BYTE nDelay = 100 );
<a title="sp_assign_default"><strong><font color="red"> █ █</font></strong></a>
void f1()
{
auto a = [ = ] (int *a, Something & b)
<a title="sp_cpp_lambda_assign"><strong><font color="red"> █ █</a><a title="sp_square_fparen"></font></strong></a>
auto a = [<a title="sp_inside_square"><font color="red"></font></a>=<a title="sp_inside_square"><font color="red"></font></a>]<a title="sp_cpp_lambda_square_paren"><font color="red"></font></a>(<a title="sp_cpp_lambda_argument_list"><font color="red"></font></a>int *a, Something & b<a title="sp_cpp_lambda_argument_list"><font color="red"></font></a>);
parallel_for(0, 100, [<a title="sp_inside_square"><font color="red"></font></a>&<a title="sp_inside_square"><font color="red"></font></a>]<a title="sp_cpp_lambda_square_paren"><font color="red"></font></a>(<a title="sp_cpp_lambda_argument_list"><font color="red"></font></a>const int i<a title="sp_cpp_lambda_argument_list"><font color="red"></font></a>)<a title="sp_cpp_lambda_paren_brace"><font color="red"></font></a>{
const std::vector<int> values = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 };
list[idx] (param);
<a title="sp_square_fparen"><strong><font color="red"></font></strong></a>
<a title="sp_square_fparen"><font color="red"></font></a>
double foo()
{

@ -0,0 +1,18 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Uncrustify: where do the Spaces options work</title>
</head>
<body lang="en-US">
<p>
</p>
<pre>
{
a<a title="1,8,sp_assign"><font color="red">M</font></a>=<a title="2,9,16,sp_assign"><font color="red">M</font><
/a>b<a title="3,10,17,22,sp_arith"><font color="red">M</font></a>+<a title="4,11,18,23,27,sp_arith"><font color="red">M<
/font></a>111<a title="5,12,19,24,28,31,sp_arith"><font color="red">M</font></a>-<a title="6,13,20,25,29,32,34,sp_arith"
><font color="red">M</font></a>55<a title="7,14,21,26,30,33,35,36,sp_before_semi"><font color="red">M</font></a>;
}
</pre>
</body>
</html>

@ -1,5 +1,3 @@
# Uncrustify 0.62
#
# General options
#
@ -36,9 +34,6 @@ enable_processing_cmt = "" # string
# Enable parsing of digraphs. Default=false
enable_digraphs = false # false/true
# Control what to do with the UTF-8 BOM (recommend 'remove')
utf8_bom = ignore # ignore/add/remove/force
# If the file contains bytes with values between 128 and 255, but is not UTF-8, then output as UTF-8
utf8_byte = false # false/true
@ -290,42 +285,12 @@ sp_arith = force # ignore/add/remove/force
# Add or remove space around assignment operator '=', '+=', etc
sp_assign = force # ignore/add/remove/force
# Add or remove space around '=' in C++11 lambda capture specifications. Overrides sp_assign
sp_cpp_lambda_assign = ignore # ignore/add/remove/force
# Add or remove space after the capture specification in C++11 lambda.
sp_cpp_lambda_paren = ignore # ignore/add/remove/force
# Add or remove space around assignment operator '=' in a prototype
sp_assign_default = ignore # ignore/add/remove/force
# Add or remove space before assignment operator '=', '+=', etc. Overrides sp_assign.
sp_before_assign = ignore # ignore/add/remove/force
# Add or remove space after assignment operator '=', '+=', etc. Overrides sp_assign.
sp_after_assign = ignore # ignore/add/remove/force
# Add or remove space in 'NS_ENUM ('
sp_enum_paren = ignore # ignore/add/remove/force
# Add or remove space around assignment '=' in enum
sp_enum_assign = ignore # ignore/add/remove/force
# Add or remove space before assignment '=' in enum. Overrides sp_enum_assign.
sp_enum_before_assign = ignore # ignore/add/remove/force
# Add or remove space after assignment '=' in enum. Overrides sp_enum_assign.
sp_enum_after_assign = ignore # ignore/add/remove/force
# Add or remove space around preprocessor '##' concatenation operator. Default=Add
sp_pp_concat = add # ignore/add/remove/force
# Add or remove space after preprocessor '#' stringify operator. Also affects the '#@' charizing operator.
sp_pp_stringify = add # ignore/add/remove/force
# Add or remove space before preprocessor '#' stringify operator as in '#define x(y) L#y'.
sp_before_pp_stringify = ignore # ignore/add/remove/force
# Add or remove space around boolean operators '&&' and '||'
sp_bool = force # ignore/add/remove/force
@ -338,66 +303,27 @@ sp_inside_paren = remove # ignore/add/remove/force
# Add or remove space between nested parens: '((' vs ') )'
sp_paren_paren = remove # ignore/add/remove/force
# Add or remove space between back-to-back parens: ')(' vs ') ('
sp_cparen_oparen = ignore # ignore/add/remove/force
# Whether to balance spaces inside nested parens
sp_balance_nested_parens = false # false/true
# Add or remove space between ')' and '{'
sp_paren_brace = ignore # ignore/add/remove/force
# Add or remove space before pointer star '*'
sp_before_ptr_star = force # ignore/add/remove/force
# Add or remove space before pointer star '*' that isn't followed by a variable name
# If set to 'ignore', sp_before_ptr_star is used instead.
sp_before_unnamed_ptr_star = ignore # ignore/add/remove/force
# Add or remove space between pointer stars '*'
sp_between_ptr_star = remove # ignore/add/remove/force
# Add or remove space after pointer star '*', if followed by a word.
sp_after_ptr_star = remove # ignore/add/remove/force
# Add or remove space after pointer star '*', if followed by a qualifier.
sp_after_ptr_star_qualifier = ignore # ignore/add/remove/force
# Add or remove space after a pointer star '*', if followed by a func proto/def.
sp_after_ptr_star_func = ignore # ignore/add/remove/force
# Add or remove space after a pointer star '*', if followed by an open paren (function types).
sp_ptr_star_paren = ignore # ignore/add/remove/force
# Add or remove space before a pointer star '*', if followed by a func proto/def.
sp_before_ptr_star_func = ignore # ignore/add/remove/force
# Add or remove space before a reference sign '&'
sp_before_byref = remove # ignore/add/remove/force
# Add or remove space before a reference sign '&' that isn't followed by a variable name
# If set to 'ignore', sp_before_byref is used instead.
sp_before_unnamed_byref = ignore # ignore/add/remove/force
# Add or remove space after reference sign '&', if followed by a word.
sp_after_byref = force # ignore/add/remove/force
# Add or remove space after a reference sign '&', if followed by a func proto/def.
sp_after_byref_func = ignore # ignore/add/remove/force
# Add or remove space before a reference sign '&', if followed by a func proto/def.
sp_before_byref_func = ignore # ignore/add/remove/force
# Add or remove space between type and word. Default=Force
sp_after_type = force # ignore/add/remove/force
# Add or remove space before the paren in the D constructs 'template Foo(' and 'class Foo('.
sp_before_template_paren = ignore # ignore/add/remove/force
# Add or remove space in 'template <' vs 'template<'.
# If set to ignore, sp_before_angle is used.
sp_template_angle = ignore # ignore/add/remove/force
# Add or remove space before '<>'
sp_before_angle = remove # ignore/add/remove/force
@ -407,12 +333,6 @@ sp_inside_angle = remove # ignore/add/remove/force
# Add or remove space after '<>'
sp_after_angle = force # ignore/add/remove/force
# Add or remove space between '<>' and '(' as found in 'new List<byte>();'
sp_angle_paren = ignore # ignore/add/remove/force
# Add or remove space between '<>' and a word as in 'List<byte> m;' or 'template <typename T> static ...'
sp_angle_word = ignore # ignore/add/remove/force
# Add or remove space between '>' and '>' in '>>' (template stuff C++/C# only). Default=Add
sp_angle_shift = add # ignore/add/remove/force
@ -426,33 +346,15 @@ sp_before_sparen = force # ignore/add/remove/force
# Add or remove space inside if-condition '(' and ')'
sp_inside_sparen = remove # ignore/add/remove/force
# Add or remove space before if-condition ')'. Overrides sp_inside_sparen.
sp_inside_sparen_close = ignore # ignore/add/remove/force
# Add or remove space after if-condition '('. Overrides sp_inside_sparen.
sp_inside_sparen_open = ignore # ignore/add/remove/force
# Add or remove space after ')' of 'if', 'for', 'switch', and 'while', etc.
sp_after_sparen = force # ignore/add/remove/force
# Add or remove space between ')' and '{' of 'if', 'for', 'switch', and 'while', etc.
sp_sparen_brace = add # ignore/add/remove/force
# Add or remove space between 'invariant' and '(' in the D language.
sp_invariant_paren = ignore # ignore/add/remove/force
# Add or remove space after the ')' in 'invariant (C) c' in the D language.
sp_after_invariant_paren = ignore # ignore/add/remove/force
# Add or remove space before empty statement ';' on 'if', 'for' and 'while'
sp_special_semi = ignore # ignore/add/remove/force
# Add or remove space before ';'. Default=Remove
sp_before_semi = remove # ignore/add/remove/force
# Add or remove space before ';' in non-empty 'for' statements
sp_before_semi_for = ignore # ignore/add/remove/force
# Add or remove space before a semicolon of an empty part of a for statement.
sp_before_semi_for_empty = force # ignore/add/remove/force
@ -462,15 +364,6 @@ sp_after_semi = add # ignore/add/remove/force
# Add or remove space after ';' in non-empty 'for' statements. Default=Force
sp_after_semi_for = force # ignore/add/remove/force
# Add or remove space after the final semicolon of an empty part of a for statement: for ( ; ; <here> ).
sp_after_semi_for_empty = ignore # ignore/add/remove/force
# Add or remove space before '[' (except '[]')
sp_before_square = ignore # ignore/add/remove/force
# Add or remove space before '[]'
sp_before_squares = ignore # ignore/add/remove/force
# Add or remove space inside a non-empty '[' and ']'
sp_inside_square = remove # ignore/add/remove/force
@ -480,57 +373,18 @@ sp_after_comma = force # ignore/add/remove/force
# Add or remove space before ','
sp_before_comma = remove # ignore/add/remove/force
# Add or remove space between ',' and ']' in multidimensional array type 'int[,,]'
sp_after_mdatype_commas = ignore # ignore/add/remove/force
# Add or remove space between '[' and ',' in multidimensional array type 'int[,,]'
sp_before_mdatype_commas = ignore # ignore/add/remove/force
# Add or remove space between ',' in multidimensional array type 'int[,,]'
sp_between_mdatype_commas = ignore # ignore/add/remove/force
# Add or remove space between an open paren and comma: '(,' vs '( ,'
sp_paren_comma = force # ignore/add/remove/force
# Add or remove space before the variadic '...' when preceded by a non-punctuator
sp_before_ellipsis = ignore # ignore/add/remove/force
# Add or remove space after class ':'
sp_after_class_colon = ignore # ignore/add/remove/force
# Add or remove space before class ':'
sp_before_class_colon = ignore # ignore/add/remove/force
# Add or remove space after class constructor ':'
sp_after_constr_colon = ignore # ignore/add/remove/force
# Add or remove space before class constructor ':'
sp_before_constr_colon = ignore # ignore/add/remove/force
# Add or remove space before case ':'. Default=Remove
sp_before_case_colon = remove # ignore/add/remove/force
# Add or remove space between 'operator' and operator sign
sp_after_operator = ignore # ignore/add/remove/force
# Add or remove space between the operator symbol and the open paren, as in 'operator ++('
sp_after_operator_sym = ignore # ignore/add/remove/force
# Add or remove space after C/D cast, i.e. 'cast(int)a' vs 'cast(int) a' or '(int)a' vs '(int) a'
sp_after_cast = remove # ignore/add/remove/force
# Add or remove spaces inside cast parens
sp_inside_paren_cast = ignore # ignore/add/remove/force
# Add or remove space between the type and open paren in a C++ cast, i.e. 'int(exp)' vs 'int (exp)'
sp_cpp_cast_paren = ignore # ignore/add/remove/force
# Add or remove space between 'sizeof' and '('
sp_sizeof_paren = remove # ignore/add/remove/force
# Add or remove space after the tag keyword (Pawn)
sp_after_tag = ignore # ignore/add/remove/force
# Add or remove space inside enum '{' and '}'
sp_inside_braces_enum = force # ignore/add/remove/force
@ -540,9 +394,6 @@ sp_inside_braces_struct = force # ignore/add/remove/force
# Add or remove space inside '{' and '}'
sp_inside_braces = force # ignore/add/remove/force
# Add or remove space inside '{}'
sp_inside_braces_empty = ignore # ignore/add/remove/force
# Add or remove space between return type and function name
# A minimum of 1 is forced except for pointer return types.
sp_type_func = force # ignore/add/remove/force
@ -553,103 +404,27 @@ sp_func_proto_paren = remove # ignore/add/remove/force
# Add or remove space between function name and '(' on function definition
sp_func_def_paren = remove # ignore/add/remove/force
# Add or remove space inside empty function '()'
sp_inside_fparens = ignore # ignore/add/remove/force
# Add or remove space inside function '(' and ')'
sp_inside_fparen = remove # ignore/add/remove/force
# Add or remove space inside the first parens in the function type: 'void (*x)(...)'
sp_inside_tparen = ignore # ignore/add/remove/force
# Add or remove between the parens in the function type: 'void (*x)(...)'
sp_after_tparen_close = ignore # ignore/add/remove/force
# Add or remove space between ']' and '(' when part of a function call.
sp_square_fparen = ignore # ignore/add/remove/force
# Add or remove space between ')' and '{' of function
sp_fparen_brace = add # ignore/add/remove/force
# Java: Add or remove space between ')' and '{{' of double brace initializer.
sp_fparen_dbrace = ignore # ignore/add/remove/force
# Add or remove space between function name and '(' on function calls
sp_func_call_paren = remove # ignore/add/remove/force
# Add or remove space between function name and '()' on function calls without parameters.
# If set to 'ignore' (the default), sp_func_call_paren is used.
sp_func_call_paren_empty = ignore # ignore/add/remove/force
# Add or remove space between the user function name and '(' on function calls
# You need to set a keyword to be a user function, like this: 'set func_call_user _' in the config file.
sp_func_call_user_paren = ignore # ignore/add/remove/force
# Add or remove space between a constructor/destructor and the open paren
sp_func_class_paren = remove # ignore/add/remove/force
# Add or remove space between 'return' and '('
sp_return_paren = remove # ignore/add/remove/force
# Add or remove space between '__attribute__' and '('
sp_attribute_paren = ignore # ignore/add/remove/force
# Add or remove space between 'defined' and '(' in '#if defined (FOO)'
sp_defined_paren = ignore # ignore/add/remove/force
# Add or remove space between 'throw' and '(' in 'throw (something)'
sp_throw_paren = ignore # ignore/add/remove/force
# Add or remove space between 'throw' and anything other than '(' as in '@throw [...];'
sp_after_throw = ignore # ignore/add/remove/force
# Add or remove space between 'catch' and '(' in 'catch (something) { }'
# If set to ignore, sp_before_sparen is used.
sp_catch_paren = ignore # ignore/add/remove/force
# Add or remove space between 'version' and '(' in 'version (something) { }' (D language)
# If set to ignore, sp_before_sparen is used.
sp_version_paren = ignore # ignore/add/remove/force
# Add or remove space between 'scope' and '(' in 'scope (something) { }' (D language)
# If set to ignore, sp_before_sparen is used.
sp_scope_paren = ignore # ignore/add/remove/force
# Add or remove space between macro and value
sp_macro = ignore # ignore/add/remove/force
# Add or remove space between macro function ')' and value
sp_macro_func = ignore # ignore/add/remove/force
# Add or remove space between 'else' and '{' if on the same line
sp_else_brace = ignore # ignore/add/remove/force
# Add or remove space between '}' and 'else' if on the same line
sp_brace_else = ignore # ignore/add/remove/force
# Add or remove space between '}' and the name of a typedef on the same line
sp_brace_typedef = force # ignore/add/remove/force
# Add or remove space between 'catch' and '{' if on the same line
sp_catch_brace = ignore # ignore/add/remove/force
# Add or remove space between '}' and 'catch' if on the same line
sp_brace_catch = ignore # ignore/add/remove/force
# Add or remove space between 'finally' and '{' if on the same line
sp_finally_brace = ignore # ignore/add/remove/force
# Add or remove space between '}' and 'finally' if on the same line
sp_brace_finally = ignore # ignore/add/remove/force
# Add or remove space between 'try' and '{' if on the same line
sp_try_brace = ignore # ignore/add/remove/force
# Add or remove space between get/set and '{' if on the same line
sp_getset_brace = ignore # ignore/add/remove/force
# Add or remove space between a variable and '{' for C++ uniform initialization
sp_word_brace = add # ignore/add/remove/force
# Add or remove space between type and open brace of an unnamed temporary
# direct-list-initialization.
sp_type_brace_init_lst = add # ignore/add/remove/force
# Add or remove space between a variable and '{' for a namespace
sp_word_brace_ns = add # ignore/add/remove/force
@ -660,9 +435,6 @@ sp_before_dc = remove # ignore/add/remove/force
# Add or remove space after the '::' operator
sp_after_dc = remove # ignore/add/remove/force
# Add or remove around the D named array initializer ':' operator
sp_d_array_colon = ignore # ignore/add/remove/force
# Add or remove space after the '!' (not) operator. Default=Remove
sp_not = remove # ignore/add/remove/force
@ -689,133 +461,18 @@ sp_incdec = remove # ignore/add/remove/force
# Add or remove space before a backslash-newline at the end of a line. Default=Add
sp_before_nl_cont = add # ignore/add/remove/force
# Add or remove space after the scope '+' or '-', as in '-(void) foo;' or '+(int) bar;'
sp_after_oc_scope = ignore # ignore/add/remove/force
# Add or remove space after the colon in message specs
# '-(int) f:(int) x;' vs '-(int) f: (int) x;'
sp_after_oc_colon = ignore # ignore/add/remove/force
# Add or remove space before the colon in message specs
# '-(int) f: (int) x;' vs '-(int) f : (int) x;'
sp_before_oc_colon = ignore # ignore/add/remove/force
# Add or remove space after the colon in immutable dictionary expression
# 'NSDictionary *test = @{@"foo" :@"bar"};'
sp_after_oc_dict_colon = ignore # ignore/add/remove/force
# Add or remove space before the colon in immutable dictionary expression
# 'NSDictionary *test = @{@"foo" :@"bar"};'
sp_before_oc_dict_colon = ignore # ignore/add/remove/force
# Add or remove space after the colon in message specs
# '[object setValue:1];' vs '[object setValue: 1];'
sp_after_send_oc_colon = ignore # ignore/add/remove/force
# Add or remove space before the colon in message specs
# '[object setValue:1];' vs '[object setValue :1];'
sp_before_send_oc_colon = ignore # ignore/add/remove/force
# Add or remove space after the (type) in message specs
# '-(int)f: (int) x;' vs '-(int)f: (int)x;'
sp_after_oc_type = ignore # ignore/add/remove/force
# Add or remove space after the first (type) in message specs
# '-(int) f:(int)x;' vs '-(int)f:(int)x;'
sp_after_oc_return_type = ignore # ignore/add/remove/force
# Add or remove space between '@selector' and '('
# '@selector(msgName)' vs '@selector (msgName)'
# Also applies to @protocol() constructs
sp_after_oc_at_sel = ignore # ignore/add/remove/force
# Add or remove space between '@selector(x)' and the following word
# '@selector(foo) a:' vs '@selector(foo)a:'
sp_after_oc_at_sel_parens = ignore # ignore/add/remove/force
# Add or remove space inside '@selector' parens
# '@selector(foo)' vs '@selector( foo )'
# Also applies to @protocol() constructs
sp_inside_oc_at_sel_parens = ignore # ignore/add/remove/force
# Add or remove space before a block pointer caret
# '^int (int arg){...}' vs. ' ^int (int arg){...}'
sp_before_oc_block_caret = ignore # ignore/add/remove/force
# Add or remove space after a block pointer caret
# '^int (int arg){...}' vs. '^ int (int arg){...}'
sp_after_oc_block_caret = ignore # ignore/add/remove/force
# Add or remove space between the receiver and selector in a message.
# '[receiver selector ...]'
sp_after_oc_msg_receiver = ignore # ignore/add/remove/force
# Add or remove space after @property.
sp_after_oc_property = ignore # ignore/add/remove/force
# Add or remove space around the ':' in 'b ? t : f'
sp_cond_colon = ignore # ignore/add/remove/force
# Add or remove space before the ':' in 'b ? t : f'. Overrides sp_cond_colon.
sp_cond_colon_before = ignore # ignore/add/remove/force
# Add or remove space after the ':' in 'b ? t : f'. Overrides sp_cond_colon.
sp_cond_colon_after = ignore # ignore/add/remove/force
# Add or remove space around the '?' in 'b ? t : f'
sp_cond_question = ignore # ignore/add/remove/force
# Add or remove space before the '?' in 'b ? t : f'. Overrides sp_cond_question.
sp_cond_question_before = ignore # ignore/add/remove/force
# Add or remove space after the '?' in 'b ? t : f'. Overrides sp_cond_question.
sp_cond_question_after = ignore # ignore/add/remove/force
# In the abbreviated ternary form (a ?: b), add/remove space between ? and :.'. Overrides all other sp_cond_* options.
sp_cond_ternary_short = ignore # ignore/add/remove/force
# Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make sense here.
sp_case_label = remove # ignore/add/remove/force
# Control the space around the D '..' operator.
sp_range = ignore # ignore/add/remove/force
# Control the spacing after ':' in 'for (TYPE VAR : EXPR)'
sp_after_for_colon = ignore # ignore/add/remove/force
# Control the spacing before ':' in 'for (TYPE VAR : EXPR)'
sp_before_for_colon = ignore # ignore/add/remove/force
# Control the spacing in 'extern (C)' (D)
sp_extern_paren = ignore # ignore/add/remove/force
# Control the space after the opening of a C++ comment '// A' vs '//A'
sp_cmt_cpp_start = ignore # ignore/add/remove/force
# TRUE: If space is added with sp_cmt_cpp_start, do it after doxygen sequences like '///', '///<', '//!' and '//!<'.
sp_cmt_cpp_doxygen = false # false/true
# TRUE: If space is added with sp_cmt_cpp_start, do it after Qt translator or meta-data comments like '//:', '//=', and '//~'.
sp_cmt_cpp_qttr = false # false/true
# Controls the spaces between #else or #endif and a trailing comment
sp_endif_cmt = ignore # ignore/add/remove/force
# Controls the spaces after 'new', 'delete', and 'delete[]'
sp_after_new = ignore # ignore/add/remove/force
# Controls the spaces between new and '(' in 'new()'
sp_between_new_paren = ignore # ignore/add/remove/force
# Controls the spaces before a trailing or embedded comment
sp_before_tr_emb_cmt = ignore # ignore/add/remove/force
# Number of spaces before a trailing or embedded comment
sp_num_before_tr_emb_cmt = 0 # number
# Control space between a Java annotation and the open paren.
sp_annotation_paren = ignore # ignore/add/remove/force
#
# Code alignment (not left column spaces/tabs)
#
@ -1042,12 +699,6 @@ nl_end_of_file_min = 1 # number
# Add or remove newline between '=' and '{'
nl_assign_brace = add # ignore/add/remove/force
# Add or remove newline between '=' and '[' (D only)
nl_assign_square = ignore # ignore/add/remove/force
# Add or remove newline after '= [' (D only). Will also affect the newline before the ']'
nl_after_square_assign = ignore # ignore/add/remove/force
# The number of blank lines after a block of variable definitions at the top of a function body
# 0 = No change (default)
nl_func_var_def_blk = 1 # number
@ -1095,62 +746,18 @@ nl_if_brace = add # ignore/add/remove/force
# Add or remove newline between '}' and 'else'
nl_brace_else = add # ignore/add/remove/force
# Add or remove newline between 'else if' and '{'
# If set to ignore, nl_if_brace is used instead
nl_elseif_brace = ignore # ignore/add/remove/force
# Add or remove newline between 'else' and '{'
nl_else_brace = add # ignore/add/remove/force
# Add or remove newline between 'else' and 'if'
nl_else_if = ignore # ignore/add/remove/force
# Add or remove newline between '}' and 'finally'
nl_brace_finally = ignore # ignore/add/remove/force
# Add or remove newline between 'finally' and '{'
nl_finally_brace = ignore # ignore/add/remove/force
# Add or remove newline between 'try' and '{'
nl_try_brace = ignore # ignore/add/remove/force
# Add or remove newline between get/set and '{'
nl_getset_brace = force # ignore/add/remove/force
# Add or remove newline between 'for' and '{'
nl_for_brace = add # ignore/add/remove/force
# Add or remove newline between 'catch' and '{'
nl_catch_brace = ignore # ignore/add/remove/force
# Add or remove newline between '}' and 'catch'
nl_brace_catch = ignore # ignore/add/remove/force
# Add or remove newline between '}' and ']'
nl_brace_square = ignore # ignore/add/remove/force
# Add or remove newline between '}' and ')' in a function invocation
nl_brace_fparen = ignore # ignore/add/remove/force
# Add or remove newline between 'while' and '{'
nl_while_brace = add # ignore/add/remove/force
# Add or remove newline between 'scope (x)' and '{' (D)
nl_scope_brace = ignore # ignore/add/remove/force
# Add or remove newline between 'unittest' and '{' (D)
nl_unittest_brace = ignore # ignore/add/remove/force
# Add or remove newline between 'version (x)' and '{' (D)
nl_version_brace = ignore # ignore/add/remove/force
# Add or remove newline between 'using' and '{'
nl_using_brace = ignore # ignore/add/remove/force
# Add or remove newline between two open or close braces.
# Due to general newline/brace handling, REMOVE may not work.
nl_brace_brace = ignore # ignore/add/remove/force
# Add or remove newline between 'do' and '{'
nl_do_brace = add # ignore/add/remove/force
@ -1160,9 +767,6 @@ nl_brace_while = remove # ignore/add/remove/force
# Add or remove newline between 'switch' and '{'
nl_switch_brace = add # ignore/add/remove/force
# Add or remove newline between 'synchronized' and '{'
nl_synchronized_brace = ignore # ignore/add/remove/force
# Add a newline between ')' and '{' if the ')' is on a different line than the if/for/etc.
# Overrides nl_for_brace, nl_if_brace, nl_switch_brace, nl_while_switch, and nl_catch_brace.
nl_multi_line_cond = false # false/true
@ -1173,86 +777,12 @@ nl_multi_line_define = true # false/true
# Whether to put a newline before 'case' statement
nl_before_case = true # false/true
# Add or remove newline between ')' and 'throw'
nl_before_throw = ignore # ignore/add/remove/force
# Whether to put a newline after 'case' statement
nl_after_case = true # false/true
# Add or remove a newline between a case ':' and '{'. Overrides nl_after_case.
nl_case_colon_brace = ignore # ignore/add/remove/force
# Newline between namespace and {
nl_namespace_brace = ignore # ignore/add/remove/force
# Add or remove newline between 'template<>' and whatever follows.
nl_template_class = ignore # ignore/add/remove/force
# Add or remove newline between 'class' and '{'
nl_class_brace = ignore # ignore/add/remove/force
# Add or remove newline after each ',' in the class base list
nl_class_init_args = ignore # ignore/add/remove/force
# Add or remove newline after each ',' in the constructor member initialization
nl_constr_init_args = ignore # ignore/add/remove/force
# Add or remove newline between return type and function name in a function definition
nl_func_type_name = ignore # ignore/add/remove/force
# Add or remove newline between return type and function name inside a class {}
# Uses nl_func_type_name or nl_func_proto_type_name if set to ignore.
nl_func_type_name_class = ignore # ignore/add/remove/force
# Add or remove newline between function scope and name in a definition
# Controls the newline after '::' in 'void A::f() { }'
nl_func_scope_name = ignore # ignore/add/remove/force
# Add or remove newline between return type and function name in a prototype
nl_func_proto_type_name = ignore # ignore/add/remove/force
# Add or remove newline between a function name and the opening '('
nl_func_paren = remove # ignore/add/remove/force
# Add or remove newline between a function name and the opening '(' in the definition
nl_func_def_paren = ignore # ignore/add/remove/force
# Add or remove newline after '(' in a function declaration
nl_func_decl_start = ignore # ignore/add/remove/force
# Add or remove newline after '(' in a function definition
nl_func_def_start = ignore # ignore/add/remove/force
# Overrides nl_func_decl_start when there is only one parameter.
nl_func_decl_start_single = ignore # ignore/add/remove/force
# Overrides nl_func_def_start when there is only one parameter.
nl_func_def_start_single = ignore # ignore/add/remove/force
# Add or remove newline after each ',' in a function declaration
nl_func_decl_args = ignore # ignore/add/remove/force
# Add or remove newline after each ',' in a function definition
nl_func_def_args = ignore # ignore/add/remove/force
# Add or remove newline before the ')' in a function declaration
nl_func_decl_end = ignore # ignore/add/remove/force
# Add or remove newline before the ')' in a function definition
nl_func_def_end = ignore # ignore/add/remove/force
# Overrides nl_func_decl_end when there is only one parameter.
nl_func_decl_end_single = ignore # ignore/add/remove/force
# Overrides nl_func_def_end when there is only one parameter.
nl_func_def_end_single = ignore # ignore/add/remove/force
# Add or remove newline between '()' in a function declaration.
nl_func_decl_empty = ignore # ignore/add/remove/force
# Add or remove newline between '()' in a function definition.
nl_func_def_empty = ignore # ignore/add/remove/force
# Whether to put each OC message parameter on a separate line
# See nl_oc_msg_leave_one_liner
nl_oc_msg_args = false # false/true
@ -1260,18 +790,9 @@ nl_oc_msg_args = false # false/true
# Add or remove newline between function signature and '{'
nl_fdef_brace = add # ignore/add/remove/force
# Add or remove newline between C++11 lambda signature and '{'
nl_cpp_ldef_brace = ignore # ignore/add/remove/force
# Add or remove a newline between the return keyword and return expression.
nl_return_expr = ignore # ignore/add/remove/force
# Whether to put a newline after semicolons, except in 'for' statements
nl_after_semicolon = true # false/true
# Java: Control the newline between the ')' and '{{' of the double brace initializer.
nl_paren_dbrace_open = ignore # ignore/add/remove/force
# Whether to put a newline after brace open.
# This also adds a newline before the matching brace close.
nl_after_brace_open = true # false/true
@ -1296,52 +817,12 @@ nl_after_brace_close = true # false/true
# Would add a newline before return in: 'if (foo) a++; return;'
nl_after_vbrace_close = false # false/true
# Control the newline between the close brace and 'b' in: 'struct { int a; } b;'
# Affects enums, unions, and structures. If set to ignore, uses nl_after_brace_close
nl_brace_struct_var = ignore # ignore/add/remove/force
# Whether to alter newlines in '#define' macros
nl_define_macro = false # false/true
# Whether to not put blanks after '#ifxx', '#elxx', or before '#endif'. Does not affect the whole-file #ifdef.
nl_squeeze_ifdef = true # false/true
# Add or remove blank line before 'if'
nl_before_if = ignore # ignore/add/remove/force
# Add or remove blank line after 'if' statement
nl_after_if = ignore # ignore/add/remove/force
# Add or remove blank line before 'for'
nl_before_for = ignore # ignore/add/remove/force
# Add or remove blank line after 'for' statement
nl_after_for = ignore # ignore/add/remove/force
# Add or remove blank line before 'while'
nl_before_while = ignore # ignore/add/remove/force
# Add or remove blank line after 'while' statement
nl_after_while = ignore # ignore/add/remove/force
# Add or remove blank line before 'switch'
nl_before_switch = ignore # ignore/add/remove/force
# Add or remove blank line after 'switch' statement
nl_after_switch = ignore # ignore/add/remove/force
# Add or remove blank line before 'synchronized'
nl_before_synchronized = ignore # ignore/add/remove/force
# Add or remove blank line after 'synchronized' statement
nl_after_synchronized = ignore # ignore/add/remove/force
# Add or remove blank line before 'do'
nl_before_do = ignore # ignore/add/remove/force
# Add or remove blank line after 'do/while' statement
nl_after_do = ignore # ignore/add/remove/force
# Whether to double-space commented-entries in struct/enum
nl_ds_struct_enum_cmt = false # false/true
@ -1349,14 +830,6 @@ nl_ds_struct_enum_cmt = false # false/true
# (lower priority than 'eat_blanks_before_close_brace')
nl_ds_struct_enum_close_brace = false # false/true
# Add or remove a newline around a class colon.
# Related to pos_class_colon, nl_class_init_args, and pos_class_comma.
nl_class_colon = ignore # ignore/add/remove/force
# Add or remove a newline around a class constructor colon.
# Related to pos_constr_colon, nl_constr_init_args, and pos_constr_comma.
nl_constr_colon = ignore # ignore/add/remove/force
# Change simple unbraced if statements into a one-liner
# 'if(b)\n i++;' => 'if(b) i++;'
nl_create_if_one_liner = false # false/true
@ -1373,37 +846,9 @@ nl_create_while_one_liner = false # false/true
# Positioning options
#
# The position of arithmetic operators in wrapped expressions
pos_arith = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
# The position of assignment in wrapped expressions.
# Do not affect '=' followed by '{'
pos_assign = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
# The position of boolean operators in wrapped expressions
pos_bool = trail # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
# The position of comparison operators in wrapped expressions
pos_compare = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
# The position of conditional (b ? t : f) operators in wrapped expressions
pos_conditional = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
# The position of the comma in wrapped expressions
pos_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
# The position of the comma in the class base list
pos_class_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
# The position of the comma in the constructor initialization list
pos_constr_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
# The position of colons between class and base class list
pos_class_colon = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
# The position of colons between constructor and member initialization
pos_constr_colon = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
#
# Line Splitting options
#
@ -1494,9 +939,6 @@ nl_around_cs_property = 0 # number
# 0 = No change.
nl_between_get_set = 0 # number
# Add or remove newline between C# property and the '{'
nl_property_brace = ignore # ignore/add/remove/force
# Whether to remove blank lines after '{'
eat_blanks_after_open_brace = true # false/true
@ -1515,13 +957,6 @@ nl_before_return = false # false/true
# Whether to put a blank line after 'return' statements, unless followed by a close brace.
nl_after_return = true # false/true
# Whether to put a newline after a Java annotation statement.
# Only affects annotations that are after a newline.
nl_after_annotation = ignore # ignore/add/remove/force
# Controls the newline between two annotations.
nl_between_annotation = ignore # ignore/add/remove/force
#
# Code modifying options (non-whitespace)
#
@ -1532,9 +967,6 @@ mod_full_brace_do = add # ignore/add/remove/force
# Add or remove braces on single-line 'for' statement
mod_full_brace_for = add # ignore/add/remove/force
# Add or remove braces on single-line function definitions. (Pawn)
mod_full_brace_function = ignore # ignore/add/remove/force
# Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'.
mod_full_brace_if = add # ignore/add/remove/force
@ -1548,12 +980,6 @@ mod_full_brace_nl = 0 # number
# Add or remove braces on single-line 'while' statement
mod_full_brace_while = add # ignore/add/remove/force
# Add or remove braces on single-line 'using ()' statement
mod_full_brace_using = ignore # ignore/add/remove/force
# Add or remove unnecessary paren on 'return' statement
mod_paren_on_return = ignore # ignore/add/remove/force
# Whether to change optional semicolons to real semicolons
mod_pawn_semicolon = false # false/true
@ -1698,9 +1124,6 @@ pp_indent_at_level = false # false/true
# Default=1.
pp_indent_count = 1 # number
# Add or remove space after # based on pp_level of #if blocks
pp_space = ignore # ignore/add/remove/force
# Sets the number of spaces added with pp_space
pp_space_count = 0 # number

@ -167,6 +167,7 @@ sp_case_label = remove
sp_range = ignore
sp_cmt_cpp_start = ignore
sp_endif_cmt = ignore
force_tab_after_define = true
align_keep_tabs = false
align_with_tabs = true
align_on_tabstop = true
@ -304,7 +305,7 @@ pos_conditional = ignore
pos_comma = ignore
pos_class_comma = ignore
pos_class_colon = ignore
code_width = 0
code_width = 80
ls_for_split_full = false
ls_func_split_full = false
nl_max = 4

@ -1,5 +1,3 @@
# Uncrustify 0.62
#
# Sun C/C++/Java
# https://www.cis.upenn.edu/~lee/06cse480/data/cstyle.ms.pdf
@ -38,9 +36,6 @@ enable_processing_cmt = "" # string
# Enable parsing of digraphs. Default=false
enable_digraphs = false # false/true
# Control what to do with the UTF-8 BOM (recommend 'remove')
utf8_bom = ignore # ignore/add/remove/force
# If the file contains bytes with values between 128 and 255, but is not UTF-8, then output as UTF-8
utf8_byte = false # false/true
@ -299,9 +294,6 @@ sp_assign = force # ignore/add/remove/force
# Add or remove space around '=' in C++11 lambda capture specifications. Overrides sp_assign
sp_cpp_lambda_assign = force # ignore/add/remove/force
# Add or remove space after the capture specification in C++11 lambda.
sp_cpp_lambda_paren = force # ignore/add/remove/force
# Add or remove space around assignment operator '=' in a prototype
sp_assign_default = force # ignore/add/remove/force
@ -654,8 +646,9 @@ sp_try_brace = force # ignore/add/remove/force
# Add or remove space between get/set and '{' if on the same line
sp_getset_brace = force # ignore/add/remove/force
# Add or remove space between a variable and '{' for C++ uniform initialization
sp_word_brace = force # ignore/add/remove/force
# Add or remove space between type and open brace of an unnamed temporary
# direct-list-initialization.
sp_type_brace_init_lst = add # ignore/add/remove/force
# Add or remove space between a variable and '{' for a namespace
sp_word_brace_ns = force # ignore/add/remove/force
@ -1535,9 +1528,6 @@ nl_after_return = false # false/true
# Only affects annotations that are after a newline.
nl_after_annotation = force # ignore/add/remove/force
# Controls the newline between two annotations.
nl_between_annotation = ignore # ignore/add/remove/force
#
# Code modifying options (non-whitespace)
#
@ -1548,9 +1538,6 @@ mod_full_brace_do = force # ignore/add/remove/force
# Add or remove braces on single-line 'for' statement
mod_full_brace_for = remove # ignore/add/remove/force
# Add or remove braces on single-line function definitions. (Pawn)
mod_full_brace_function = ignore # ignore/add/remove/force
# Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'.
mod_full_brace_if = remove # ignore/add/remove/force
@ -1612,10 +1599,6 @@ mod_sort_include = false # false/true
# If TRUE, it will move a 'break' that appears after a fully braced 'case' before the close brace.
mod_move_case_break = false # false/true
# Will add or remove the braces around a fully braced case statement.
# Will only remove the braces if there are no variable declarations in the block.
mod_case_brace = ignore # ignore/add/remove/force
# If TRUE, it will remove a void 'return;' that appears as the last statement in a function.
mod_remove_empty_return = true # false/true
@ -1703,9 +1686,6 @@ cmt_insert_before_preproc = false # false/true
# Preprocessor options
#
# Control indent of preprocessors inside #if blocks at brace level 0 (file-level)
pp_indent = ignore # ignore/add/remove/force
# Whether to indent #if/#else/#endif at the brace level (true) or from column 1 (false)
pp_indent_at_level = false # false/true

@ -1,6 +1,6 @@
{
"name": "uncrustify",
"version": "0.72.0",
"version": "0.73.0",
"description": "A highly configurable, easily modifiable source code beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and VALA",
"main": "uncrustify",
"scripts": {

@ -4,7 +4,7 @@
.. Update the date in the next line when editing this document!
*This document was last updated on 2020-11-05, for Uncrustify 0.72.0.*
*This document was last updated on 2021-05-12, for Uncrustify 0.73.0.*
This document uses "0.1.2" throughout as an example version number.
Whenever you see this, you should substitute the version number

@ -5,9 +5,8 @@
* @author Ben Gardner
* @license GPL v2+
*/
#include "ChunkStack.h"
#include <cstdio>
#include <cstdlib>
void ChunkStack::Set(const ChunkStack &cs)

@ -9,7 +9,6 @@
#define CHUNKSTACK_H_INCLUDED
#include "uncrustify_types.h"
#include <deque>
class ChunkStack
{

@ -0,0 +1,496 @@
/**
* @file combine_fix_mark_enum_struct_union.h
*
* @author
* @license GPL v2+
* extract from combine_fix_mark.h
*/
#ifndef ENUM_STRUCT_UNION_PARSER_H_INCLUDED
#define ENUM_STRUCT_UNION_PARSER_H_INCLUDED
#include "pcf_flags.h"
#include "token_enum.h"
#include <map>
/**
* Class EnumStructUnionParser : This class facilitates the parsing and interpretation
* of ALL instances of the class, enum, union, and
* struct keywords, including user-defined types with
* a body {} and any trailing inline variable declarations
* that may follow the definition (as permitted by
* the coding language in question). The class also
* interprets variable declarations preceded by one
* of those keywords, as well as any C/C++ forward
* declarations
*/
class EnumStructUnionParser
{
public:
/**
* Constructor
*/
EnumStructUnionParser();
/**
* Destructor
*/
~EnumStructUnionParser();
private:
/**
* Analyzes all identifiers (marked as CT_WORD) between the starting and
* ending chunks and changes CT_WORD to one of CT_TYPE, CT_MACRO_FUNC_CALL,
* etc. and sets flags (PCF_VAR_1ST, PCF_VAR_1ST_DEF, PCF_VAR_INLINE, etc.)
* for variable identifiers accordingly. Flags C++ forward declarations as
* PCF_INCOMPLETE
*/
void analyze_identifiers();
/**
* Returns true if a pair of braces were both detected AND determined to be
* part of a class/enum/struct/union body
*/
bool body_detected() const;
/**
* Returns true if comma-separated values were detected during parsing
*/
bool comma_separated_values_detected() const;
/**
* Returns true if an enumerated integral type was detected during parsing
*/
bool enum_base_detected() const;
/**
* Returns the end chunk of a class/enum/struct/union body, if detected
* during parsing
*/
struct chunk_t *get_body_end() const;
/**
* Returns the starting chunk of a class/enum/struct/union body, if detected
* during parsing
*/
struct chunk_t *get_body_start() const;
/**
* Returns the starting chunk associated with an enumerated type's base
* specifier statement, if detected during parsing
*/
struct chunk_t *get_enum_base_start() const;
/**
* Returns the first comma encountered at the level of the starting chunk,
* if detected during parsing
*/
struct chunk_t *get_first_top_level_comma() const;
/**
* Returns the ending chunk associated with an class/struct inheritance
* list, if detected during parsing
*/
struct chunk_t *get_inheritance_end() const;
/**
* Returns the starting chunk associated with an class/struct inheritance
* list, if detected during parsing
*/
struct chunk_t *get_inheritance_start() const;
/**
* Returns a numerically-indexed map of all question operators encountered
* during parsing
*/
std::map<std::size_t, struct chunk_t *> get_question_operators() const;
/**
* Returns the end chunk associated with a template parameter list, if
* detected during parsing
*/
struct chunk_t *get_template_end() const;
/**
* Return the starting chunk associated with a template parameter list, if
* detected during parsing
*/
struct chunk_t *get_template_start() const;
/**
* Returns a numerically-indexed map of all top-level commas encountered
* during parsing
*/
std::map<std::size_t, struct chunk_t *> get_top_level_commas() const;
/**
* Return the starting chunk associated with a where clause, if
* detected during parsing
*/
struct chunk_t *get_where_end() const;
/**
* Return the starting chunk associated with a where clause, if
* detected during parsing
*/
struct chunk_t *get_where_start() const;
/**
* Returns true if an inheritance list associated with a class or struct was
* discovered during parsing
*/
bool inheritance_detected() const;
public:
/**
* Performs object initialization prior to parsing
*/
void initialize(struct chunk_t *pc);
private:
/**
* Returns true if the chunk under test represents a potential end chunk past
* which further parsing is not likely warranted
*/
bool is_potential_end_chunk(struct chunk_t *pc) const;
/**
* Returns true if the chunk under test is deemed to be located within a
* conditional/ternary statement
*/
bool is_within_conditional(struct chunk_t *pc) const;
/**
* Returns true if the chunk under test is deemed to be located within an
* inheritance list
*/
bool is_within_inheritance_list(struct chunk_t *pc) const;
/**
* Returns true if the chunk under test is deemed to be located within a
* where clause
*/
bool is_within_where_clause(struct chunk_t *pc) const;
/**
* Marks all base classes that appear as part of an inheritance list
*/
void mark_base_classes(struct chunk_t *pc);
/**
* Marks pairs of braces associated with the body of a class/enum/struct/union,
* and additionally calls a separate routine to mark any base classes for that
* may precede the opening brace
*/
void mark_braces(struct chunk_t *start);
/**
* Marks the beginning chunk of an inheritance list
*/
void mark_class_colon(struct chunk_t *colon);
/**
* Mark a colon as a conditional
*/
void mark_conditional_colon(struct chunk_t *colon);
/**
* Mark any struct/class constructor declarations/definitions
*/
void mark_constructors();
/**
* Marks the beginning chunk of an enumerated integral type specification
*/
void mark_enum_integral_type(struct chunk_t *colon);
/**
* Scan chunks outside the definition body and mark lvalues accordingly
*/
void mark_extracorporeal_lvalues();
/**
* Mark nested name specifiers preceding qualified identifiers
*/
void mark_nested_name_specifiers(struct chunk_t *pc);
/**
* Marks pointer operators preceding a variable identifier
*/
void mark_pointer_types(struct chunk_t *pc);
/**
* Marks the beginning and ending chunks associated with a template
* (templates may appear after the identifier type name as part of a class
* specialization)
*/
void mark_template(struct chunk_t *start) const;
/**
* Marks the arguments within a template argument list bounded by the
* starting and ending chunks
*/
void mark_template_args(struct chunk_t *start, struct chunk_t *end) const;
/**
* Marks the type identifier associated with the class/enum/struct/union,
* if not anonymously defined
*/
void mark_type(struct chunk_t *pc);
/**
* Marks all variable identifiers associated with the class/enum/struct/union
*/
void mark_variable(struct chunk_t *variable, pcf_flags_t flags);
/**
* Marks all chunks belonging to a c# where clause
*/
void mark_where_clause(struct chunk_t *where);
/**
* Marks the beginning of a where clause
*/
void mark_where_colon(struct chunk_t *colon);
public:
/**
* Parses the class/enum/struct/union and all associated chunks
*/
void parse(struct chunk_t *pc);
private:
/**
* Parses closing and opening angle brackets
*/
struct chunk_t *parse_angles(struct chunk_t *angle_open);
/**
* Parses closing and opening braces
*/
struct chunk_t *parse_braces(struct chunk_t *brace_open);
/**
* Parses a single colon, which may precede an inheritance list or
* enumerated integral type specification
*/
void parse_colon(struct chunk_t *colon);
/**
* Parses a double colon, which may indicate a scope resolution chain
*/
struct chunk_t *parse_double_colon(struct chunk_t *double_colon);
/**
* Returns the parsing error status
*/
bool parse_error_detected() const;
/**
* Sets the parsing error status
*/
void parse_error_detected(bool status);
/**
* Records all question operators encountered during parsing
*/
void record_question_operator(struct chunk_t *question);
/**
* Records a comma chunk given one the following conditions are satisfied:
* 1) it is encountered at the level of the starting chunk
* 2) it is not part of a right-hand side assignment
* 3) it is not part of an inheritance list
* 4) it is not part of a conditional/ternary expression
*/
void record_top_level_comma(struct chunk_t *comma);
/**
* Adjusts the end chunk returned by the try_find_end_chunk() function
* for any potential trailing inline variable declarations that may follow
* the body of a class/enum/struct/union definition
*/
struct chunk_t *refine_end_chunk(struct chunk_t *pc);
/**
* Sets the chunk associated with the end of a class/enum/struct/union
* body
*/
void set_body_end(struct chunk_t *body_end);
/**
* Sets the chunk associated with the start of a class/enum/struct/union
* body
*/
void set_body_start(struct chunk_t *body_start);
/**
* Sets the chunk associated with the start of an enumerated integral
* base type specification
*/
void set_enum_base_start(struct chunk_t *enum_base_start);
/**
* Sets the chunk associated with the start of an inheritance list
*/
void set_inheritance_start(struct chunk_t *inheritance_start);
/**
* Sets the chunk associated with the end of a template
*/
void set_template_end(struct chunk_t *template_end);
/**
* Sets the chunk associated with the start of a template
*/
void set_template_start(struct chunk_t *template_start);
/**
* Return the ending chunk associated with a where clause, if
* detected during parsing
*/
void set_where_end(struct chunk_t *where_end);
/**
* Return the starting chunk associated with a where clause, if
* detected during parsing
*/
void set_where_start(struct chunk_t *where_start);
/**
* Returns true if a template was detected during parsing
*/
bool template_detected() const;
/**
* Attempts to find the last chunk associated with the class/enum/struct/union
*/
struct chunk_t *try_find_end_chunk(struct chunk_t *pc);
/**
* Attempts to identify any function-like macro calls which may precede the
* actual type identifier
*/
void try_post_identify_macro_calls();
/**
* Attempts to find the identifier type name (if not anonymously-defined) post
* variable identifier interpretation
*/
void try_post_identify_type();
/**
* Attempts to find the identifier type name prior to variable identifier
* interpretation
*/
bool try_pre_identify_type();
/**
* Returns true if a corresponding type was identified for the class/enum/struct/union
*/
bool type_identified() const;
/**
* Returns true if a where clause was detected during parsing
*/
bool where_clause_detected() const;
/**
* Map of token-type, chunk pairs
*/
std::map<c_token_t, std::map<std::size_t, struct chunk_t *> > m_chunk_map;
/**
* Indicates the last chunk associated with the class/enum/struct/union keyword
*/
struct chunk_t *m_end;
/**
* Indicates whether or not a parse error has occurred
*/
bool m_parse_error;
/**
* Stores a pointer to the class/enum/struct/union keyword chunk with which the
* parse() routine was invoked
*/
struct chunk_t *m_start;
/**
* Stores a pointer to the type identifier associated with the class/enum/struct/union,
* if not anonymously defined
*/
struct chunk_t *m_type;
};
#endif

@ -136,7 +136,8 @@ public:
//! swap two elements of a list
void Swap(T *obj1, T *obj2)
{
if (obj1 != NULL && obj2 != NULL)
if ( obj1 != NULL
&& obj2 != NULL)
{
if (obj1->prev == obj2)
{
@ -171,7 +172,8 @@ public:
*/
void AddAfter(T *obj, T *ref)
{
if (obj != NULL && ref != NULL)
if ( obj != NULL
&& ref != NULL)
{
Pop(obj); // TODO: is this necessary?
obj->next = ref->next;
@ -198,7 +200,8 @@ public:
*/
void AddBefore(T *obj, T *ref)
{
if (obj != NULL && ref != NULL)
if ( obj != NULL
&& ref != NULL)
{
Pop(obj);
obj->next = ref;

@ -10,9 +10,8 @@
#include "ParseFrame.h"
#include "uncrustify.h"
#include "uncrustify_types.h"
#include <stdexcept>
#include <string>
#include <stdexcept> // to get std::logic_error
using std::string;
@ -112,7 +111,8 @@ const ContainerType &ParseFrame::prev(size_t idx) const
{
LOG_FUNC_ENTRY();
if (idx == 0 || idx >= pse.size())
if ( idx == 0
|| idx >= pse.size())
{
throw invalid_argument(string(__FILE__) + ":" + to_string(__LINE__)
+ " idx can't be zero or >= size()");

@ -10,11 +10,9 @@
#ifndef SRC_PARSEFRAME_H_
#define SRC_PARSEFRAME_H_
#include "token_enum.h"
#include "uncrustify_types.h"
#include <memory>
#include <vector>
//! Structure for counting nested level

@ -0,0 +1,302 @@
// *INDENT-OFF*
{ CT_ACCESS, CT_TYPE },
{ CT_ACCESS, CT_WORD },
{ CT_ALIGN, CT_PAREN_OPEN },
{ CT_AMP, CT_WORD },
{ CT_ANGLE_CLOSE, CT_BRACE_OPEN },
{ CT_ANNOTATION, CT_ANNOTATION },
{ CT_ANNOTATION, CT_TYPE },
{ CT_ASM_COLON, CT_ASM_COLON },
{ CT_ASM_COLON, CT_STRING },
{ CT_ASM, CT_FUNC_CALL },
{ CT_ASM, CT_PAREN_OPEN },
{ CT_ASM, CT_QUALIFIER },
{ CT_ASSERT, CT_PAREN_OPEN },
{ CT_ASSIGN_FUNC_PROTO, CT_DEFAULT },
{ CT_ASSIGN_FUNC_PROTO, CT_DELETE },
{ CT_ASSIGN_FUNC_PROTO, CT_NUMBER },
{ CT_ATTRIBUTE, CT_ATTRIBUTE },
{ CT_ATTRIBUTE, CT_BRACE_OPEN },
{ CT_ATTRIBUTE, CT_CASE },
{ CT_ATTRIBUTE, CT_QUALIFIER },
{ CT_ATTRIBUTE, CT_TYPE },
{ CT_ATTRIBUTE, CT_WORD },
{ CT_AUTORELEASEPOOL, CT_BRACE_OPEN },
{ CT_BIT_COLON, CT_NUMBER },
{ CT_BIT_COLON, CT_SIZEOF },
{ CT_BIT_COLON, CT_TYPE },
{ CT_BIT_COLON, CT_WORD },
{ CT_BODY, CT_BRACE_OPEN },
{ CT_BRACE_CLOSE, CT_BRACE_OPEN },
{ CT_BRACE_CLOSE, CT_CLASS },
{ CT_BRACE_CLOSE, CT_FUNC_CALL },
{ CT_BRACE_CLOSE, CT_GETSET },
{ CT_BRACE_CLOSE, CT_IF },
{ CT_BRACE_CLOSE, CT_OC_MSG_NAME },
{ CT_BRACE_CLOSE, CT_PAREN_OPEN },
{ CT_BRACE_CLOSE, CT_QUALIFIER },
{ CT_BRACE_CLOSE, CT_RETURN },
{ CT_BRACE_CLOSE, CT_TYPE },
{ CT_BRACE_CLOSE, CT_WORD },
{ CT_BREAK, CT_WORD },
{ CT_BYREF, CT_INV },
{ CT_CASE_COLON, CT_ATTRIBUTE },
{ CT_CASE_COLON, CT_BRACE_OPEN },
{ CT_CASE_COLON, CT_BREAK },
{ CT_CASE_COLON, CT_RETURN },
{ CT_CASE_COLON, CT_WORD },
{ CT_CASE, CT_NEG },
{ CT_CASE, CT_PAREN_OPEN },
{ CT_CASE, CT_STRING },
{ CT_CASE_ELLIPSIS, CT_NUMBER },
{ CT_CATCH, CT_FUNC_CALL },
{ CT_CLASS_COLON, CT_FUNC_CALL },
{ CT_CLASS_COLON, CT_QUALIFIER },
{ CT_CLASS_COLON, CT_TYPE },
{ CT_CLASS_COLON, CT_WORD },
{ CT_COLON, CT_COLON },
{ CT_COLON, CT_NUMBER },
{ CT_COLON, CT_QUALIFIER },
{ CT_COLON, CT_STRING },
{ CT_COLON, CT_TYPE },
{ CT_COLON, CT_WORD },
{ CT_COMMENT_EMBED, CT_FUNC_CLASS_PROTO },
{ CT_COMMENT_MULTI, CT_ELSE },
{ CT_CONCAT, CT_STRING },
{ CT_CONCAT, CT_WORD },
{ CT_COND_COLON, CT_FUNC_CALL },
{ CT_COND_COLON, CT_STRING },
{ CT_COND_COLON, CT_WORD },
{ CT_CONSTR_COLON, CT_FUNC_CALL },
{ CT_CONSTR_COLON, CT_FUNC_CLASS_DEF },
{ CT_CONSTR_COLON, CT_FUNC_CTOR_VAR },
{ CT_CONSTRUCT, CT_TYPE },
{ CT_CONTINUE, CT_WORD },
{ CT_CS_PROPERTY, CT_BRACE_OPEN },
{ CT_DEFAULT, CT_STRING },
{ CT_DEFAULT, CT_WORD },
{ CT_DELEGATE, CT_BRACE_OPEN },
{ CT_D_MODULE, CT_WORD },
{ CT_ELLIPSIS, CT_NUMBER },
{ CT_ELSE, CT_FOR },
{ CT_ELSE, CT_IF },
{ CT_ELSE, CT_PAREN_OPEN },
{ CT_ELSE, CT_WORD },
{ CT_ELSEIF, CT_CONSTEXPR },
{ CT_ENUM_CLASS, CT_ATTRIBUTE },
{ CT_ENUM_CLASS, CT_TYPE },
{ CT_ENUM, CT_ATTRIBUTE },
{ CT_ENUM, CT_BIT_COLON },
{ CT_ENUM, CT_BRACE_OPEN },
{ CT_ENUM, CT_ENUM_CLASS },
{ CT_ENUM, CT_FPAREN_OPEN },
{ CT_ENUM, CT_FUNCTION },
{ CT_ENUM, CT_TYPE },
{ CT_ENUM, CT_WORD },
{ CT_EXECUTION_CONTEXT, CT_EXECUTION_CONTEXT },
{ CT_EXECUTION_CONTEXT, CT_FPAREN_OPEN },
{ CT_EXTERN, CT_STRING },
{ CT_FPAREN_CLOSE, CT_ASSIGN_FUNC_PROTO },
{ CT_FPAREN_CLOSE, CT_ATTRIBUTE },
{ CT_FPAREN_CLOSE, CT_CLASS_COLON },
{ CT_FPAREN_CLOSE, CT_COND_COLON },
{ CT_FPAREN_CLOSE, CT_CONSTR_COLON },
{ CT_FPAREN_CLOSE, CT_DEFAULT },
{ CT_FPAREN_CLOSE, CT_FUNC_CALL },
{ CT_FPAREN_CLOSE, CT_NEG },
{ CT_FPAREN_CLOSE, CT_NOT },
{ CT_FPAREN_CLOSE, CT_OC_MSG_NAME },
{ CT_FPAREN_CLOSE, CT_QUESTION },
{ CT_FPAREN_CLOSE, CT_STRING },
{ CT_FPAREN_CLOSE, CT_THROW },
{ CT_FPAREN_CLOSE, CT_TYPE },
{ CT_FPAREN_CLOSE, CT_WHERE_SPEC },
{ CT_FPAREN_CLOSE, CT_WORD },
{ CT_FRIEND, CT_CLASS },
{ CT_FRIEND, CT_STRUCT },
{ CT_FRIEND, CT_TYPE },
{ CT_FUNCTION, CT_PAREN_OPEN },
{ CT_FUNC_VAR, CT_PPAREN_CLOSE },
{ CT_GOTO, CT_WORD },
{ CT_IF, CT_CONSTEXPR },
{ CT_IMPORT, CT_WORD },
{ CT_INCDEC_AFTER, CT_DEREF },
{ CT_IN, CT_TYPE },
{ CT_IN, CT_WORD },
{ CT_LABEL_COLON, CT_CS_PROPERTY },
{ CT_LABEL_COLON, CT_FUNC_CALL },
{ CT_LABEL_COLON, CT_NEW },
{ CT_LABEL_COLON, CT_PAREN_OPEN },
{ CT_LABEL_COLON, CT_RETURN },
{ CT_LABEL_COLON, CT_STRING },
{ CT_LABEL_COLON, CT_TYPE },
{ CT_LABEL_COLON, CT_WORD },
{ CT_LOCK, CT_PAREN_OPEN },
{ CT_NAMESPACE, CT_BRACE_OPEN },
{ CT_NAMESPACE, CT_TYPE },
{ CT_NAMESPACE, CT_WORD },
{ CT_NATIVE, CT_TAG },
{ CT_NUMBER, CT_CASE_ELLIPSIS },
{ CT_NUMBER, CT_CHAR },
{ CT_NUMBER, CT_COLON },
{ CT_NUMBER, CT_ELLIPSIS },
{ CT_NUMBER, CT_OC_MSG_NAME },
{ CT_NUMBER, CT_PAREN_OPEN },
{ CT_NUMBER, CT_WORD },
{ CT_NUMBER_FP, CT_NUMBER },
{ CT_NUMBER_FP, CT_OC_MSG_NAME },
{ CT_NUMBER_FP, CT_WORD },
{ CT_OC_CLASS, CT_CLASS_COLON },
{ CT_OC_CLASS, CT_PAREN_OPEN },
{ CT_OC_DYNAMIC, CT_WORD },
{ CT_OC_IMPL, CT_OC_CLASS },
{ CT_OC_INTF, CT_OC_CLASS },
{ CT_OC_MSG_DECL, CT_BRACE_OPEN },
{ CT_OC_PROTOCOL, CT_OC_CLASS },
{ CT_PACKAGE, CT_WORD },
{ CT_PAREN_CLOSE, CT_ASM_COLON },
{ CT_PAREN_CLOSE, CT_COLON },
{ CT_PAREN_CLOSE, CT_COND_COLON },
{ CT_PAREN_CLOSE, CT_CS_PROPERTY },
{ CT_PAREN_CLOSE, CT_DEREF },
{ CT_PAREN_CLOSE, CT_NOT },
{ CT_PAREN_CLOSE, CT_NUMBER },
{ CT_PAREN_CLOSE, CT_OC_MSG_NAME },
{ CT_PAREN_CLOSE, CT_POS },
{ CT_PAREN_CLOSE, CT_QUALIFIER },
{ CT_PAREN_CLOSE, CT_TYPE },
{ CT_PP_DEFINE, CT_MACRO },
{ CT_PP_DEFINE, CT_MACRO_FUNC },
{ CT_PP_DEFINE, CT_NUMBER },
{ CT_PP_DEFINE, CT_PP_IGNORE },
{ CT_PP_DEFINED, CT_TYPE },
{ CT_PP_DEFINED, CT_WORD },
{ CT_PP_ELSE, CT_FUNC_CALL },
{ CT_PP_ELSE, CT_NOT },
{ CT_PP_ELSE, CT_NUMBER },
{ CT_PP_ELSE, CT_PAREN_OPEN },
{ CT_PP_ELSE, CT_PP_DEFINED },
{ CT_PP_ELSE, CT_WORD },
{ CT_PP_EMIT, CT_MACRO },
{ CT_PP_ENDIF, CT_WORD },
{ CT_PP_ENDREGION, CT_PREPROC_BODY },
{ CT_PP_IF, CT_CNG_HASINC },
{ CT_PP_IF, CT_FUNC_CALL },
{ CT_PP_IF, CT_NOT },
{ CT_PP_IF, CT_NUMBER },
{ CT_PP_IF, CT_PAREN_OPEN },
{ CT_PP_IF, CT_PP_ASM },
{ CT_PP_IF, CT_PP_DEFINE },
{ CT_PP_IF, CT_PP_DEFINED },
{ CT_PP_IF, CT_TYPE },
{ CT_PP_IF, CT_WORD },
{ CT_PP_INCLUDE, CT_STRING },
{ CT_PP_INCLUDE, CT_WORD },
{ CT_PP_OTHER, CT_PREPROC_BODY },
{ CT_PP_PROPERTY, CT_WORD },
{ CT_PP_REGION, CT_PREPROC_BODY },
{ CT_PP_UNDEF, CT_TYPE },
{ CT_PP_UNDEF, CT_WORD },
{ CT_Q_EMIT, CT_FUNC_CALL },
{ CT_Q_FOREVER, CT_BRACE_OPEN },
{ CT_QUESTION, CT_FUNC_CALL },
{ CT_QUESTION, CT_PAREN_OPEN },
{ CT_QUESTION, CT_STRING },
{ CT_QUESTION, CT_WORD },
{ CT_SBOOL, CT_TYPE },
{ CT_SCOMPARE, CT_WORD },
{ CT_SPAREN_CLOSE, CT_ATTRIBUTE },
{ CT_SPAREN_CLOSE, CT_AUTORELEASEPOOL },
{ CT_SPAREN_CLOSE, CT_BRACE_OPEN },
{ CT_SPAREN_CLOSE, CT_FUNC_CALL },
{ CT_SPAREN_CLOSE, CT_WORD },
{ CT_SQL_ASSIGN, CT_FUNC_CALL },
{ CT_SQL_ASSIGN, CT_WORD },
{ CT_SQL_BEGIN, CT_SQL_WORD },
{ CT_SQL_END, CT_SQL_WORD },
{ CT_SQL_EXEC, CT_SQL_WORD },
{ CT_SQL_WORD, CT_COLON },
{ CT_SQL_WORD, CT_PAREN_OPEN },
{ CT_SQL_WORD, CT_SQL_WORD },
{ CT_SQUARE_CLOSE, CT_ATTRIBUTE },
{ CT_SQUARE_CLOSE, CT_BRACE_OPEN },
{ CT_SQUARE_CLOSE, CT_COLON },
{ CT_SQUARE_CLOSE, CT_EXECUTION_CONTEXT },
{ CT_SQUARE_CLOSE, CT_OC_MSG_NAME },
{ CT_SQUARE_CLOSE, CT_STRING },
{ CT_SQUARE_CLOSE, CT_WORD },
{ CT_STATE, CT_TYPE },
{ CT_STOCK, CT_QUALIFIER },
{ CT_STOCK, CT_TAG },
{ CT_STRING, CT_ATTRIBUTE },
{ CT_STRING, CT_BRACE_OPEN },
{ CT_STRING, CT_COLON },
{ CT_STRING, CT_CONCAT },
{ CT_STRING, CT_OC_MSG_NAME },
{ CT_STRING, CT_PAREN_OPEN },
{ CT_STRING, CT_STRING },
{ CT_STRING, CT_STRUCT },
{ CT_STRING, CT_TYPE },
{ CT_STRING, CT_WORD },
{ CT_STRUCT, CT_BRACE_OPEN },
{ CT_STRUCT, CT_CLASS_COLON },
{ CT_STRUCT, CT_MACRO_FUNC_CALL },
{ CT_STRUCT, CT_TYPE },
{ CT_STRUCT, CT_WORD },
{ CT_TEMPLATE, CT_CLASS },
{ CT_TEMPLATE, CT_TYPE },
{ CT_THIS, CT_OC_MSG_NAME },
{ CT_THIS, CT_TYPE },
{ CT_TSQUARE, CT_BRACE_OPEN },
{ CT_TSQUARE, CT_PAREN_OPEN },
{ CT_TSQUARE, CT_WORD },
{ CT_TYPEDEF, CT_ENUM },
{ CT_TYPEDEF, CT_FUNC_TYPE },
{ CT_TYPEDEF, CT_PAREN_OPEN },
{ CT_TYPEDEF, CT_QUALIFIER },
{ CT_TYPEDEF, CT_STRUCT },
{ CT_TYPEDEF, CT_TYPE },
{ CT_TYPEDEF, CT_TYPENAME },
{ CT_TYPEDEF, CT_UNION },
{ CT_TYPENAME, CT_ELLIPSIS },
{ CT_TYPENAME, CT_WORD },
{ CT_UNION, CT_BRACE_OPEN },
{ CT_UNION, CT_TYPE },
{ CT_UNION, CT_WORD },
{ CT_USING, CT_NAMESPACE },
{ CT_USING, CT_TYPE },
{ CT_USING, CT_WORD },
{ CT_USING_STMT, CT_PAREN_OPEN },
{ CT_VOLATILE, CT_BRACE_OPEN },
{ CT_WHERE_COLON, CT_CS_PROPERTY },
{ CT_WHERE_COLON, CT_NEW },
{ CT_WHERE_COLON, CT_TYPE },
{ CT_WHERE_COLON, CT_WORD },
{ CT_WHERE_SPEC, CT_WORD },
{ CT_WORD, CT_ATTRIBUTE },
{ CT_WORD, CT_BIT_COLON },
{ CT_WORD, CT_BRACE_OPEN },
{ CT_WORD, CT_CLASS_COLON },
{ CT_WORD, CT_COLON },
{ CT_WORD, CT_COMMENT_CPP },
{ CT_WORD, CT_CONCAT },
{ CT_WORD, CT_ELLIPSIS },
{ CT_WORD, CT_IN },
{ CT_WORD, CT_NEW },
{ CT_WORD, CT_NOT },
{ CT_WORD, CT_NUMBER },
{ CT_WORD, CT_NUMBER_FP },
{ CT_WORD, CT_OPERATOR },
{ CT_WORD, CT_QUALIFIER },
{ CT_WORD, CT_QUESTION },
{ CT_WORD, CT_SCOMPARE },
{ CT_WORD, CT_SQL_ASSIGN },
{ CT_WORD, CT_STRING },
{ CT_WORD, CT_STRUCT },
{ CT_WORD, CT_TYPE },
{ CT_WORD, CT_TYPE_CAST },
{ CT_WORD, CT_TYPEDEF },
{ CT_WORD, CT_WHERE_COLON },
{ CT_WORD, CT_WHERE_SPEC },
{ CT_WORD, CT_WORD },
// *INDENT-ON*

@ -27,11 +27,10 @@
#include "align_trailing_comments.h"
#include "align_typedefs.h"
#include "align_var_def_brace.h"
#include "language_tools.h"
#include "log_rules.h"
#include "quick_align_again.h"
#include "uncrustify.h"
constexpr static auto LCURRENT = LALIGN;
using namespace uncrustify;

@ -18,7 +18,8 @@ void align_add(ChunkStack &cs, chunk_t *pc, size_t &max_col)
size_t min_col;
chunk_t *prev = chunk_get_prev(pc);
if (prev == nullptr || chunk_is_newline(prev))
if ( prev == nullptr
|| chunk_is_newline(prev))
{
min_col = 1;
LOG_FMT(LALADD, "%s(%d): pc->orig_line=%zu, pc->col=%zu max_col=%zu min_col=%zu\n",

@ -33,7 +33,7 @@ void align_asm_colon(void)
}
cas.Reset();
pc = chunk_get_next_ncnl(pc, scope_e::PREPROC);
pc = chunk_get_next_ncnnl(pc, scope_e::PREPROC);
size_t level = pc ? pc->level : 0;
did_nl = true;

@ -6,6 +6,7 @@
* @author Ben Gardner
* @license GPL v2+
*/
#ifndef ALIGN_ASM_COLON_H_INCLUDED
#define ALIGN_ASM_COLON_H_INCLUDED

@ -7,12 +7,12 @@
* @license GPL v2+
*/
#include <deque>
#include "align_assign.h"
#include "align_stack.h"
#include "log_rules.h"
#include "uncrustify.h"
constexpr static auto LCURRENT = LALASS;
using namespace uncrustify;
@ -29,8 +29,10 @@ chunk_t *align_assign(chunk_t *first, size_t span, size_t thresh, size_t *p_nl_c
}
size_t my_level = first->level;
char copy[1000];
LOG_FMT(LALASS, "%s(%d): [my_level is %zu]: start checking with '%s', on orig_line %zu, span is %zu, thresh is %zu\n",
__func__, __LINE__, my_level, first->text(), first->orig_line, span, thresh);
__func__, __LINE__, my_level, first->elided_text(copy), first->orig_line, span, thresh);
// If we are aligning on a tabstop, we shouldn't right-align
AlignStack as; // regular assigns
@ -63,7 +65,7 @@ chunk_t *align_assign(chunk_t *first, size_t span, size_t thresh, size_t *p_nl_c
while (pc != nullptr)
{
LOG_FMT(LALASS, "%s(%d): orig_line is %zu, check pc->text() '%s', type is %s, parent_type is %s\n",
__func__, __LINE__, pc->orig_line, pc->text(), get_token_name(pc->type), get_token_name(get_chunk_parent_type(pc)));
__func__, __LINE__, pc->orig_line, pc->elided_text(copy), get_token_name(pc->type), get_token_name(get_chunk_parent_type(pc)));
// Don't check inside SPAREN, PAREN or SQUARE groups
if ( chunk_is_token(pc, CT_SPAREN_OPEN)
@ -96,7 +98,8 @@ chunk_t *align_assign(chunk_t *first, size_t span, size_t thresh, size_t *p_nl_c
}
// Recurse if a brace set is found
if (chunk_is_token(pc, CT_BRACE_OPEN) || chunk_is_token(pc, CT_VBRACE_OPEN))
if ( chunk_is_token(pc, CT_BRACE_OPEN)
|| chunk_is_token(pc, CT_VBRACE_OPEN))
{
size_t myspan;
size_t mythresh;
@ -117,7 +120,7 @@ chunk_t *align_assign(chunk_t *first, size_t span, size_t thresh, size_t *p_nl_c
log_rule_B("align_assign_thresh");
mythresh = options::align_assign_thresh();
}
pc = align_assign(chunk_get_next_ncnl(pc), myspan, mythresh, &sub_nl_count);
pc = align_assign(chunk_get_next_ncnnl(pc), myspan, mythresh, &sub_nl_count);
if (sub_nl_count > 0)
{
@ -141,7 +144,8 @@ chunk_t *align_assign(chunk_t *first, size_t span, size_t thresh, size_t *p_nl_c
}
// Done with this brace set?
if (chunk_is_token(pc, CT_BRACE_CLOSE) || chunk_is_token(pc, CT_VBRACE_CLOSE))
if ( chunk_is_token(pc, CT_BRACE_CLOSE)
|| chunk_is_token(pc, CT_VBRACE_CLOSE))
{
pc = chunk_get_next(pc);
break;
@ -172,8 +176,9 @@ chunk_t *align_assign(chunk_t *first, size_t span, size_t thresh, size_t *p_nl_c
&& !pc->flags.test(PCF_IN_FCN_DEF) // Issue #1717
&& !pc->flags.test(PCF_IN_FCN_CALL)) // Issue #1717
{
LOG_FMT(LALASS, "%s(%d): log_pcf_flags pc->flags:\n ", __func__, __LINE__);
log_pcf_flags(LALASS, pc->flags);
// produces much more log output. Use it only debugging purpose
//LOG_FMT(LALASS, "%s(%d): log_pcf_flags pc->flags:\n ", __func__, __LINE__);
//log_pcf_flags(LALASS, pc->flags);
var_def_cnt++;
}
else if (var_def_cnt > 1)
@ -193,8 +198,9 @@ chunk_t *align_assign(chunk_t *first, size_t span, size_t thresh, size_t *p_nl_c
}
LOG_FMT(LALASS, "%s(%d): align_assign_decl_func() is %d\n",
__func__, __LINE__, options::align_assign_decl_func());
LOG_FMT(LALASS, "%s(%d): log_pcf_flags pc->flags: ", __func__, __LINE__);
log_pcf_flags(LALASS, pc->flags);
// produces much more log output. Use it only debugging purpose
//LOG_FMT(LALASS, "%s(%d): log_pcf_flags pc->flags: ", __func__, __LINE__);
//log_pcf_flags(LALASS, pc->flags);
log_rule_B("align_assign_decl_func");

@ -11,11 +11,10 @@
#include "align_eigen_comma_init.h"
#include "align_stack.h"
#include "chunk_list.h"
#include "ChunkStack.h"
#include "indent.h"
#include "log_rules.h"
#include "uncrustify.h"
constexpr static auto LCURRENT = LALIGN;
using namespace uncrustify;
@ -35,11 +34,11 @@ void align_eigen_comma_init(void)
{
if (chunk_is_newline(pc))
{
LOG_FMT(LAVDB, "%s(%d): orig_line is %zu, <Newline>\n", __func__, __LINE__, pc->orig_line);
LOG_FMT(LALIGN, "%s(%d): orig_line is %zu, <Newline>\n", __func__, __LINE__, pc->orig_line);
}
else
{
LOG_FMT(LAVDB, "%s(%d): orig_line is %zu, orig_col is %zu, pc->text() '%s'\n",
LOG_FMT(LALIGN, "%s(%d): orig_line is %zu, orig_col is %zu, pc->text() '%s'\n",
__func__, __LINE__, pc->orig_line, pc->orig_col, pc->text());
}
@ -54,13 +53,15 @@ void align_eigen_comma_init(void)
{
as.NewLines(pc->nl_count);
}
else if (start != nullptr && pc->level < start->level)
else if ( start != nullptr
&& pc->level < start->level)
{
// A drop in level restarts the aligning
as.Flush();
start = nullptr;
}
else if (start != nullptr && pc->level > start->level)
else if ( start != nullptr
&& pc->level > start->level)
{
// Ignore any deeper levels when aligning
}
@ -89,7 +90,8 @@ void align_eigen_comma_init(void)
*/
chunk_t *prev = chunk_get_prev(pc);
if (prev != nullptr && chunk_is_newline(prev))
if ( prev != nullptr
&& chunk_is_newline(prev))
{
log_rule_B("indent_columns");
indent_to_column(pc, pc->column_indent + options::indent_columns());
@ -107,7 +109,7 @@ void align_eigen_comma_init(void)
auto *const prev = chunk_get_prev(pc);
if ( chunk_is_newline(prev)
&& chunk_is_token(chunk_get_prev_ncnl(pc), CT_COMMA))
&& chunk_is_token(chunk_get_prev_ncnnl(pc), CT_COMMA))
{
log_rule_B("align_eigen_comma_init");
as.Add(pc);

@ -8,11 +8,14 @@
*/
#include "align_func_params.h"
#include "align_stack.h"
#include "log_rules.h"
#include <algorithm> // to get max
constexpr static auto LCURRENT = LALIGN;
using namespace uncrustify;

@ -0,0 +1,218 @@
/**
* @file align_func_proto.cpp
*
* @author Guy Maurel
* split from align.cpp
* @author Ben Gardner
* @license GPL v2+
*/
#include "align_func_proto.h"
#include "align_stack.h"
#include "align_tools.h"
#include "log_rules.h"
#include <algorithm> // to get max
constexpr static auto LCURRENT = LALPROTO;
using namespace uncrustify;
void align_func_proto(size_t span)
{
LOG_FUNC_ENTRY();
size_t myspan = span;
size_t mythresh = 0;
log_rule_B("align_func_proto_gap");
size_t mygap = options::align_func_proto_gap();
log_rule_B("align_func_proto_thresh");
mythresh = options::align_func_proto_thresh();
// Issue #2771
// we align token-1 and token-2 if:
// token-1->level == token-2->level
// and
// token-1->brace_level == token-2->brace_level
// we don't check if token-1 and token-2 are in the same block
log_rule_B("align_var_def_star_style");
size_t mystar_style = options::align_var_def_star_style();
log_rule_B("align_var_def_amp_style");
size_t myamp_style = options::align_var_def_amp_style();
size_t num_of_column = 1;
size_t num_of_row = 1;
AlignStack *stack_init_value = nullptr;
// Issue #2984
vector<vector<AlignStack *> > many_as;
// Issue #2771
vector<vector<AlignStack *> > many_as_brace;
// init the vector ...
many_as.resize(num_of_column, vector<AlignStack *>(num_of_row, stack_init_value));
many_as_brace.resize(num_of_column, vector<AlignStack *>(num_of_row, stack_init_value));
log_rule_B("align_single_line_brace_gap");
size_t mybr_gap = options::align_single_line_brace_gap();
bool look_bro = false;
chunk_t *toadd;
for (chunk_t *pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next(pc))
{
char copy[1000];
LOG_FMT(LAS, "%s(%d): orig_line is %zu, orig_col is %zu, text() is '%s', type is %s, level is %zu, brace_level is %zu\n",
__func__, __LINE__, pc->orig_line, pc->orig_col, pc->elided_text(copy),
get_token_name(pc->type), pc->level, pc->brace_level);
// make the vector larger if necessary
if ( pc->level >= num_of_column // Issue #2960
|| pc->brace_level >= num_of_row)
{
num_of_column = pc->level + 1;
num_of_row = pc->brace_level + 1;
many_as.resize(num_of_column);
many_as_brace.resize(num_of_column);
for (size_t i = 0; i < num_of_column; ++i)
{
many_as[i].resize(num_of_row);
many_as_brace[i].resize(num_of_row);
}
}
if ( chunk_is_newline(pc)
&& !pc->flags.test(PCF_IN_FCN_CALL)) // Issue #2831
{
look_bro = false;
AlignStack *stack_at_l_bl = many_as.at(pc->level).at(pc->brace_level);
if (stack_at_l_bl == nullptr)
{
// get a Stack
stack_at_l_bl = new AlignStack();
// start it
stack_at_l_bl->Start(myspan, mythresh);
stack_at_l_bl->m_gap = mygap;
stack_at_l_bl->m_star_style = static_cast<AlignStack::StarStyle>(mystar_style);
stack_at_l_bl->m_amp_style = static_cast<AlignStack::StarStyle>(myamp_style);
// store
many_as.at(pc->level).at(pc->brace_level) = stack_at_l_bl;
}
stack_at_l_bl->Debug();
for (size_t idx = 0; idx < num_of_column; idx++)
{
for (size_t idx_brace = 0; idx_brace < num_of_row; idx_brace++)
{
stack_at_l_bl = many_as.at(idx).at(idx_brace);
if (stack_at_l_bl != nullptr)
{
stack_at_l_bl->NewLines(pc->nl_count);
}
}
}
AlignStack *stack_at_l_bl_brace = many_as_brace.at(pc->level).at(pc->brace_level);
if (stack_at_l_bl_brace == nullptr)
{
// get a Stack
stack_at_l_bl_brace = new AlignStack();
// start it
stack_at_l_bl_brace->Start(myspan, mythresh);
stack_at_l_bl_brace->m_gap = mybr_gap;
// store
many_as_brace.at(pc->level).at(pc->brace_level) = stack_at_l_bl_brace;
}
stack_at_l_bl_brace->Debug();
stack_at_l_bl_brace->NewLines(pc->nl_count);
}
else if ( chunk_is_token(pc, CT_FUNC_PROTO)
|| ( chunk_is_token(pc, CT_FUNC_DEF)
&& options::align_single_line_func()))
{
log_rule_B("align_single_line_func");
log_rule_B("align_on_operator");
if ( get_chunk_parent_type(pc) == CT_OPERATOR
&& options::align_on_operator())
{
toadd = chunk_get_prev_ncnnl(pc);
}
else
{
toadd = pc;
}
chunk_t *tmp = step_back_over_member(toadd);
LOG_FMT(LAS, "%s(%d): tmp->text() is '%s', orig_line is %zu, orig_col is %zu, level is %zu, brace_level is %zu\n",
__func__, __LINE__, tmp->text(), tmp->orig_line, tmp->orig_col,
tmp->level, tmp->brace_level);
// test the Stack
AlignStack *stack_at_l_bl = many_as.at(pc->level).at(pc->brace_level);
if (stack_at_l_bl == nullptr)
{
// get a Stack
stack_at_l_bl = new AlignStack();
// start it
stack_at_l_bl->Start(myspan, mythresh);
stack_at_l_bl->m_gap = mygap;
stack_at_l_bl->m_star_style = static_cast<AlignStack::StarStyle>(mystar_style);
stack_at_l_bl->m_amp_style = static_cast<AlignStack::StarStyle>(myamp_style);
// store
many_as.at(pc->level).at(pc->brace_level) = stack_at_l_bl;
}
stack_at_l_bl->Add(tmp);
log_rule_B("align_single_line_brace");
look_bro = (chunk_is_token(pc, CT_FUNC_DEF))
&& options::align_single_line_brace();
}
else if ( look_bro
&& chunk_is_token(pc, CT_BRACE_OPEN)
&& pc->flags.test(PCF_ONE_LINER))
{
AlignStack *stack_at_l_bl_brace = many_as_brace.at(pc->level).at(pc->brace_level);
stack_at_l_bl_brace->Add(pc);
look_bro = false;
}
}
LOG_FMT(LAS, "%s(%d): as\n", __func__, __LINE__);
// purge
for (size_t idx = 0; idx < num_of_column; idx++)
{
for (size_t idx_brace = 0; idx_brace < num_of_row; idx_brace++)
{
AlignStack *stack_at_l_bl = many_as.at(idx).at(idx_brace);
if (stack_at_l_bl != nullptr)
{
stack_at_l_bl->End();
delete stack_at_l_bl;
stack_at_l_bl = nullptr;
}
AlignStack *stack_at_l_bl_brace = many_as_brace.at(idx).at(idx_brace);
if (stack_at_l_bl_brace != nullptr)
{
stack_at_l_bl_brace->End();
delete stack_at_l_bl_brace;
stack_at_l_bl_brace = nullptr;
}
}
}
} // align_func_proto

@ -8,13 +8,14 @@
*/
#include "align_init_brace.h"
#include "align_log_al.h"
#include "align_tab_column.h"
#include "align_tools.h"
#include "chunk_list.h"
#include "indent.h"
#include "log_rules.h"
#include "uncrustify.h"
constexpr static auto LCURRENT = LALBR;
using namespace uncrustify;
@ -31,7 +32,7 @@ void align_init_brace(chunk_t *start)
LOG_FMT(LALBR, "%s(%d): start @ orig_line is %zu, orig_col is %zu\n",
__func__, __LINE__, start->orig_line, start->orig_col);
chunk_t *pc = chunk_get_next_ncnl(start);
chunk_t *pc = chunk_get_next_ncnnl(start);
chunk_t *pcSingle = scan_ib_line(pc, true);
if ( pcSingle == nullptr
@ -57,7 +58,8 @@ void align_init_brace(chunk_t *start)
{
pc = chunk_get_next(pc);
}
} while (pc != nullptr && pc->level > start->level);
} while ( pc != nullptr
&& pc->level > start->level);
// debug dump the current frame
align_log_al(LALBR, start->orig_line);
@ -77,7 +79,8 @@ void align_init_brace(chunk_t *start)
{
chunk_t *tmp;
if (idx == 0 && ((tmp = skip_c99_array(pc)) != nullptr))
if ( idx == 0
&& ((tmp = skip_c99_array(pc)) != nullptr))
{
pc = tmp;

@ -10,11 +10,10 @@
#include "align_left_shift.h"
#include "align_stack.h"
#include "chunk_list.h"
#include "ChunkStack.h"
#include "indent.h"
#include "log_rules.h"
#include "uncrustify.h"
constexpr static auto LCURRENT = LALIGN;
using namespace uncrustify;
@ -34,12 +33,13 @@ void align_left_shift(void)
{
if (chunk_is_newline(pc))
{
LOG_FMT(LAVDB, "%s(%d): orig_line is %zu, <Newline>\n", __func__, __LINE__, pc->orig_line);
LOG_FMT(LALIGN, "%s(%d): orig_line is %zu, <Newline>\n", __func__, __LINE__, pc->orig_line);
}
else
{
LOG_FMT(LAVDB, "%s(%d): orig_line is %zu, orig_col is %zu, pc->text() '%s'\n",
__func__, __LINE__, pc->orig_line, pc->orig_col, pc->text());
char copy[1000];
LOG_FMT(LALIGN, "%s(%d): orig_line is %zu, orig_col is %zu, pc->text() '%s'\n",
__func__, __LINE__, pc->orig_line, pc->orig_col, pc->elided_text(copy));
}
if ( start != nullptr
@ -53,13 +53,15 @@ void align_left_shift(void)
{
as.NewLines(pc->nl_count);
}
else if (start != nullptr && pc->level < start->level)
else if ( start != nullptr
&& pc->level < start->level)
{
// A drop in level restarts the aligning
as.Flush();
start = nullptr;
}
else if (start != nullptr && pc->level > start->level)
else if ( start != nullptr
&& pc->level > start->level)
{
// Ignore any deeper levels when aligning
}
@ -88,7 +90,8 @@ void align_left_shift(void)
*/
chunk_t *prev = chunk_get_prev(pc);
if (prev != nullptr && chunk_is_newline(prev))
if ( prev != nullptr
&& chunk_is_newline(prev))
{
log_rule_B("indent_columns");
indent_to_column(pc, pc->column_indent + options::indent_columns());
@ -116,7 +119,8 @@ void align_left_shift(void)
*/
chunk_t *prev = chunk_get_prev(pc);
if (prev != nullptr && chunk_is_newline(prev))
if ( prev != nullptr
&& chunk_is_newline(prev))
{
log_rule_B("indent_columns");
indent_to_column(pc, pc->column_indent + options::indent_columns());

@ -10,7 +10,6 @@
#include "align_nl_cont.h"
#include "align_add.h"
#include "ChunkStack.h"
#include "uncrustify.h"

@ -9,7 +9,6 @@
#include "align_oc_decl_colon.h"
#include "align_oc_msg_colons.h"
#include "align_stack.h"
#include "chunk_list.h"
@ -42,11 +41,12 @@ void align_oc_decl_colon(void)
cas.Reset();
size_t level = pc->level;
pc = chunk_get_next_ncnl(pc, scope_e::PREPROC);
pc = chunk_get_next_ncnnl(pc, scope_e::PREPROC);
did_line = false;
while (pc != nullptr && pc->level >= level)
while ( pc != nullptr
&& pc->level >= level)
{
// The declaration ends with an open brace or semicolon
if ( chunk_is_token(pc, CT_BRACE_OPEN)
@ -67,7 +67,7 @@ void align_oc_decl_colon(void)
cas.Add(pc);
chunk_t *tmp = chunk_get_prev(pc, scope_e::PREPROC);
chunk_t *tmp2 = chunk_get_prev_ncnl(tmp, scope_e::PREPROC);
chunk_t *tmp2 = chunk_get_prev_ncnnl(tmp, scope_e::PREPROC);
// Check for an un-labeled parameter
if ( ( chunk_is_token(tmp, CT_WORD)

@ -6,10 +6,11 @@
*/
#include "align_oc_msg_colons.h"
#include "align_stack.h"
#include "chunk_list.h"
#include "log_rules.h"
#include "uncrustify_types.h"
constexpr static auto LCURRENT = LOCMSG;
using namespace uncrustify;
@ -33,14 +34,15 @@ void align_oc_msg_colon(chunk_t *so)
cas.Start(span);
size_t level = so->level;
chunk_t *pc = chunk_get_next_ncnl(so, scope_e::PREPROC);
chunk_t *pc = chunk_get_next_ncnnl(so, scope_e::PREPROC);
bool did_line = false;
bool has_colon = false;
size_t lcnt = 0; // line count with no colon for span
bool first_line = true;
while (pc != nullptr && pc->level > level)
while ( pc != nullptr
&& pc->level > level)
{
if (pc->level > (level + 1))
{
@ -56,7 +58,9 @@ void align_oc_msg_colon(chunk_t *so)
log_rule_B("align_oc_msg_colon_xcode_like");
if (options::align_oc_msg_colon_xcode_like() && first_line && !has_colon)
if ( options::align_oc_msg_colon_xcode_like()
&& first_line
&& !has_colon)
{
span = 0;
}
@ -72,7 +76,8 @@ void align_oc_msg_colon(chunk_t *so)
chunk_t *tmp = chunk_get_prev(pc);
if ( tmp != nullptr
&& (chunk_is_token(tmp, CT_OC_MSG_FUNC) || chunk_is_token(tmp, CT_OC_MSG_NAME)))
&& ( chunk_is_token(tmp, CT_OC_MSG_FUNC)
|| chunk_is_token(tmp, CT_OC_MSG_NAME)))
{
nas.Add(tmp);
chunk_flags_set(tmp, PCF_DONT_INDENT);
@ -131,11 +136,13 @@ void align_oc_msg_colon(chunk_t *so)
if ( longest != nullptr
&& options::indent_oc_msg_prioritize_first_colon()
&& len_diff > 0
&& ((longest->column >= len_diff) && (longest->column - len_diff) > (longest->brace_level * indent_size)))
&& ( (longest->column >= len_diff)
&& (longest->column - len_diff) > (longest->brace_level * indent_size)))
{
longest->column -= len_diff;
}
else if (longest && len > 0)
else if ( longest != nullptr
&& len > 0)
{
chunk_t chunk;
@ -166,7 +173,8 @@ void align_oc_msg_colons(void)
for (chunk_t *pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next(pc))
{
if (chunk_is_token(pc, CT_SQUARE_OPEN) && get_chunk_parent_type(pc) == CT_OC_MSG)
if ( chunk_is_token(pc, CT_SQUARE_OPEN)
&& get_chunk_parent_type(pc) == CT_OC_MSG)
{
align_oc_msg_colon(pc);
}

@ -9,10 +9,11 @@
#include "align_preprocessor.h"
#include "align_assign.h"
#include "align_stack.h"
#include "log_rules.h"
constexpr static auto LCURRENT = LALPP;
using namespace uncrustify;

@ -10,9 +10,10 @@
#include "align_same_func_call_params.h"
#include "align_stack.h"
#include "chunk_list.h"
#include "log_rules.h"
constexpr static auto LCURRENT = LASFCP;
using namespace uncrustify;
@ -74,7 +75,8 @@ void align_same_func_call_params(void)
else
{
// if we drop below the brace level that started it, we are done
if (align_root && align_root->brace_level > pc->brace_level)
if ( align_root != nullptr
&& align_root->brace_level > pc->brace_level)
{
LOG_FMT(LASFCP, " ++ (drop) Ended with %zu fcns\n", align_len);

@ -11,17 +11,14 @@
#include "align_stack.h"
#include "align_tab_column.h"
#include "chunk_list.h"
#include "indent.h"
#include "prototypes.h"
#include "space.h"
#include "uncrustify.h"
#if defined WITH_STACKID
#include "unc_tools.h" // to get stackID and get_A_Number()
#endif
#include <limits>
constexpr static auto LCURRENT = LAS;
using namespace uncrustify;
@ -33,11 +30,12 @@ void AlignStack::Start(size_t span, int thresh)
#if defined WITH_STACKID
stackID = get_A_Number(); // for debugging purpose only
#endif
WITH_STACKID_DEBUG;
// produces much more log output. Use it only debugging purpose
//WITH_STACKID_DEBUG;
LOG_FMT(LAS, "AlignStack::Start(%d):m_aligned.Reset()\n", __LINE__);
//LOG_FMT(LAS, "AlignStack::Start(%d):m_aligned.Reset()\n", __LINE__);
m_aligned.Reset();
LOG_FMT(LAS, "AlignStack::Start(%d):m_skipped.Reset()\n", __LINE__);
//LOG_FMT(LAS, "AlignStack::Start(%d):m_skipped.Reset()\n", __LINE__);
m_skipped.Reset();
if (thresh > 0)
@ -64,7 +62,8 @@ void AlignStack::Start(size_t span, int thresh)
void AlignStack::ReAddSkipped()
{
WITH_STACKID_DEBUG;
// produces much more log output. Use it only debugging purpose
//WITH_STACKID_DEBUG;
if (m_skipped.Empty())
{
@ -72,7 +71,7 @@ void AlignStack::ReAddSkipped()
}
// Make a copy of the ChunkStack and clear m_skipped
m_scratch.Set(m_skipped);
LOG_FMT(LAS, "AlignStack::ReAddSkipped(%d):m_skipped.Reset()\n", __LINE__);
//LOG_FMT(LAS, "AlignStack::ReAddSkipped(%d):m_skipped.Reset()\n", __LINE__);
m_skipped.Reset();
// Need to add them in order so that m_nl_seqnum is correct
@ -89,7 +88,8 @@ void AlignStack::ReAddSkipped()
void AlignStack::Add(chunk_t *start, size_t seqnum)
{
WITH_STACKID_DEBUG;
// produces much more log output. Use it only debugging purpose
//WITH_STACKID_DEBUG;
LOG_FUNC_ENTRY();
LOG_FMT(LAS, "AlignStack::%s(%d): Candidate is '%s': orig_line is %zu, column is %zu, type is %s, level is %zu\n",
@ -165,7 +165,8 @@ void AlignStack::Add(chunk_t *start, size_t seqnum)
*/
log_rule_B("align_on_tabstop");
if (options::align_on_tabstop() && m_star_style == SS_DANGLE)
if ( options::align_on_tabstop()
&& m_star_style == SS_DANGLE)
{
m_star_style = SS_INCLUDE;
}
@ -175,7 +176,8 @@ void AlignStack::Add(chunk_t *start, size_t seqnum)
chunk_t *prev = start;
while ( (prev = chunk_get_prev(prev)) != nullptr
&& (chunk_is_ptr_operator(prev) || chunk_is_token(prev, CT_TPAREN_OPEN)))
&& ( chunk_is_ptr_operator(prev)
|| chunk_is_token(prev, CT_TPAREN_OPEN)))
{
// do nothing - we want prev when this exits
}
@ -198,7 +200,8 @@ void AlignStack::Add(chunk_t *start, size_t seqnum)
// back up to the first '*' or '^' preceding the token
chunk_t *tmp_prev = chunk_get_prev(ali);
while (chunk_is_star(tmp_prev) || chunk_is_msref(tmp_prev))
while ( chunk_is_star(tmp_prev)
|| chunk_is_msref(tmp_prev))
{
ali = tmp_prev;
tmp_prev = chunk_get_prev(ali);
@ -235,7 +238,8 @@ void AlignStack::Add(chunk_t *start, size_t seqnum)
LOG_FMT(LAS, "AlignStack::%s(%d): tmp_col is %zu\n",
__func__, __LINE__, tmp_col);
while (tmp != nullptr && tmp != start)
while ( tmp != nullptr
&& tmp != start)
{
chunk_t *next = chunk_get_next(tmp);
@ -284,10 +288,14 @@ void AlignStack::Add(chunk_t *start, size_t seqnum)
tmp = chunk_get_next(tmp);
}
if ( (chunk_is_star(tmp) && m_star_style == SS_DANGLE)
|| (chunk_is_addr(tmp) && m_amp_style == SS_DANGLE)
|| (chunk_is_nullable(tmp) && (m_star_style == SS_DANGLE))
|| (chunk_is_msref(tmp) && m_star_style == SS_DANGLE)) // TODO: add m_msref_style
if ( ( chunk_is_star(tmp)
&& m_star_style == SS_DANGLE)
|| ( chunk_is_addr(tmp)
&& m_amp_style == SS_DANGLE)
|| ( chunk_is_nullable(tmp)
&& (m_star_style == SS_DANGLE))
|| ( chunk_is_msref(tmp)
&& m_star_style == SS_DANGLE)) // TODO: add m_msref_style
{
col_adj = start->column - ali->column;
gap = start->column - (ref->column + ref->len());
@ -356,17 +364,19 @@ void AlignStack::Add(chunk_t *start, size_t seqnum)
seqnum, m_nl_seqnum, m_seqnum,
start->orig_line, start->column, m_max_col, m_thresh);
}
WITH_STACKID_DEBUG;
// produces much more log output. Use it only debugging purpose
//WITH_STACKID_DEBUG;
} // AlignStack::Add
void AlignStack::NewLines(size_t cnt)
{
WITH_STACKID_DEBUG;
// produces much more log output. Use it only debugging purpose
//WITH_STACKID_DEBUG;
if (m_aligned.Empty())
{
LOG_FMT(LAS, "AlignStack::Newlines(%d): nothing to do, is empty\n", __LINE__);
//LOG_FMT(LAS, "AlignStack::Newlines(%d): nothing to do, is empty\n", __LINE__);
return;
}
LOG_FMT(LAS, "AlignStack::Newlines(%d): cnt is %zu\n", __LINE__, cnt);
@ -384,7 +394,8 @@ void AlignStack::NewLines(size_t cnt)
void AlignStack::Flush()
{
WITH_STACKID_DEBUG;
// produces much more log output. Use it only debugging purpose
//WITH_STACKID_DEBUG;
LOG_FMT(LAS, "AlignStack::%s(%d): Len() is %zu\n",
__func__, __LINE__, Len());
@ -413,7 +424,8 @@ void AlignStack::Flush()
m_last_added = 0;
m_max_col = 0;
WITH_STACKID_DEBUG;
// produces much more log output. Use it only debugging purpose
//WITH_STACKID_DEBUG;
LOG_FMT(LAS, "AlignStack::%s(%d): Debug the stack, Len is %zu\n",
__func__, __LINE__, Len());
@ -539,7 +551,7 @@ void AlignStack::Flush()
if (ce != nullptr)
{
last_seqnum = ce->m_seqnum;
LOG_FMT(LAS, "AlignStack::Flush(%d):m_aligned.Reset()\n", __LINE__);
//LOG_FMT(LAS, "AlignStack::Flush(%d):m_aligned.Reset()\n", __LINE__);
m_aligned.Reset();
}
m_min_col = numeric_limits<size_t>::max(); // use unrealistic high numbers
@ -570,26 +582,26 @@ void AlignStack::Flush()
void AlignStack::Reset()
{
WITH_STACKID_DEBUG;
LOG_FMT(LAS, "AlignStack::Reset(%d):m_aligned.Reset()\n", __LINE__);
//WITH_STACKID_DEBUG;
//LOG_FMT(LAS, "AlignStack::Reset(%d):m_aligned.Reset()\n", __LINE__);
m_aligned.Reset();
LOG_FMT(LAS, "AlignStack::Reset(%d):m_skipped.Reset()\n", __LINE__);
//LOG_FMT(LAS, "AlignStack::Reset(%d):m_skipped.Reset()\n", __LINE__);
m_skipped.Reset();
}
void AlignStack::End()
{
WITH_STACKID_DEBUG;
//WITH_STACKID_DEBUG;
if (!m_aligned.Empty())
{
LOG_FMT(LAS, "AlignStack::End(%d):\n", __LINE__);
//LOG_FMT(LAS, "AlignStack::End(%d):\n", __LINE__);
Flush();
}
LOG_FMT(LAS, "AlignStack::End(%d):m_aligned.Reset()\n", __LINE__);
//LOG_FMT(LAS, "AlignStack::End(%d):m_aligned.Reset()\n", __LINE__);
m_aligned.Reset();
LOG_FMT(LAS, "AlignStack::End(%d):m_skipped.Reset()\n", __LINE__);
//LOG_FMT(LAS, "AlignStack::End(%d):m_skipped.Reset()\n", __LINE__);
m_skipped.Reset();
}
@ -602,7 +614,7 @@ size_t AlignStack::Len()
void AlignStack::Debug()
{
WITH_STACKID_DEBUG;
//WITH_STACKID_DEBUG;
size_t length = Len();

@ -154,7 +154,7 @@ protected:
} \
else \
{ \
LOG_FMT(LAS, "AlignStack::%s(%d): stackID is %2zu\n", __func__, __LINE__, stackID); \
LOG_FMT(LAS, "AlignStack::%s(%d): stackID is %zu\n", __func__, __LINE__, stackID); \
}
#else
#define WITH_STACKID_DEBUG ;

@ -20,11 +20,12 @@ void align_struct_initializers(void)
while (pc != nullptr)
{
chunk_t *prev = chunk_get_prev_ncnl(pc);
chunk_t *prev = chunk_get_prev_ncnnl(pc);
if ( chunk_is_token(prev, CT_ASSIGN)
&& ( chunk_is_token(pc, CT_BRACE_OPEN)
|| (language_is_set(LANG_D) && chunk_is_token(pc, CT_SQUARE_OPEN))))
|| ( language_is_set(LANG_D)
&& chunk_is_token(pc, CT_SQUARE_OPEN))))
{
align_init_brace(pc);
}

@ -9,10 +9,9 @@
#include "align_tab_column.h"
#include "chunk_list.h"
#include "log_rules.h"
#include "prototypes.h"
#include "uncrustify_types.h"
constexpr static auto LCURRENT = LALIGN;
using namespace uncrustify;

@ -11,7 +11,6 @@
#include "space.h"
#include "uncrustify.h"
#include "uncrustify_limits.h"
chunk_t *skip_c99_array(chunk_t *sq_open)
@ -62,7 +61,8 @@ chunk_t *scan_ib_line(chunk_t *start, bool first_pass)
chunk_t *next = chunk_get_next(pc);
if (next == nullptr || chunk_is_comment(next))
if ( next == nullptr
|| chunk_is_comment(next))
{
// do nothing
}
@ -163,11 +163,11 @@ chunk_t *step_back_over_member(chunk_t *pc)
chunk_t *tmp;
// Skip over any class stuff: bool CFoo::bar()
while ( ((tmp = chunk_get_prev_ncnl(pc)) != nullptr)
while ( ((tmp = chunk_get_prev_ncnnl(pc)) != nullptr)
&& chunk_is_token(tmp, CT_DC_MEMBER))
{
// TODO: verify that we are pointing at something sane?
pc = chunk_get_prev_ncnl(tmp);
pc = chunk_get_prev_ncnnl(tmp);
}
return(pc);
} // step_back_over_member

@ -13,7 +13,8 @@
#include "align_tab_column.h"
#include "indent.h"
#include "log_rules.h"
#include "uncrustify.h"
constexpr static auto LCURRENT = LALTC;
using namespace uncrustify;
@ -30,7 +31,8 @@ void align_stack(ChunkStack &cs, size_t col, bool align_single, log_sev_t sev)
}
if ( (cs.Len() > 1)
|| (align_single && (cs.Len() == 1)))
|| ( align_single
&& (cs.Len() == 1)))
{
LOG_FMT(sev, "%s(%d): max_col=%zu\n", __func__, __LINE__, col);
chunk_t *pc;
@ -76,9 +78,11 @@ chunk_t *align_trailing_comments(chunk_t *start)
while ( pc != nullptr
&& (nl_count < options::align_right_cmt_span()))
{
if (pc->flags.test(PCF_RIGHT_COMMENT) && pc->column > 1)
if ( pc->flags.test(PCF_RIGHT_COMMENT)
&& pc->column > 1)
{
if (same_level && pc->brace_level != lvl)
if ( same_level
&& pc->brace_level != lvl)
{
pc = chunk_get_prev(pc);
break;
@ -91,7 +95,8 @@ chunk_t *align_trailing_comments(chunk_t *start)
__func__, __LINE__, pc->orig_line, min_col, pc->column, pc->len(),
get_token_name(pc->type));
if (min_orig == 0 || min_orig > pc->column)
if ( min_orig == 0
|| min_orig > pc->column)
{
min_orig = pc->column;
}
@ -110,7 +115,8 @@ chunk_t *align_trailing_comments(chunk_t *start)
col = min_orig;
// fall back to the intended column
if (intended_col > 0 && col > intended_col)
if ( intended_col > 0
&& col > intended_col)
{
col = intended_col;
}
@ -129,7 +135,8 @@ chunk_t *align_trailing_comments(chunk_t *start)
LOG_FMT(LALADD, "%s(%d): -- min_orig=%zu intended_col=%zu min_allowed=%zu ==> col=%zu\n",
__func__, __LINE__, min_orig, intended_col, min_col, col);
if (cpd.frag_cols > 0 && cpd.frag_cols <= col)
if ( cpd.frag_cols > 0
&& cpd.frag_cols <= col)
{
col -= cpd.frag_cols;
}

@ -10,9 +10,10 @@
#include "align_typedefs.h"
#include "align_stack.h"
#include "chunk_list.h"
#include "log_rules.h"
constexpr static auto LCURRENT = LALTD;
using namespace uncrustify;

@ -12,7 +12,8 @@
#include "align_stack.h"
#include "align_tools.h"
#include "log_rules.h"
#include "uncrustify.h"
constexpr static auto LCURRENT = LAVDB;
using namespace uncrustify;
@ -31,7 +32,8 @@ chunk_t *align_var_def_brace(chunk_t *start, size_t span, size_t *p_nl_count)
size_t mygap = 0;
// Override the span, if this is a struct/union
if (get_chunk_parent_type(start) == CT_STRUCT || get_chunk_parent_type(start) == CT_UNION)
if ( get_chunk_parent_type(start) == CT_STRUCT
|| get_chunk_parent_type(start) == CT_UNION)
{
log_rule_B("align_var_struct_span");
myspan = options::align_var_struct_span();
@ -57,7 +59,7 @@ chunk_t *align_var_def_brace(chunk_t *start, size_t span, size_t *p_nl_count)
mygap = options::align_var_def_gap();
}
// can't be any variable definitions in a "= {" block
chunk_t *prev = chunk_get_prev_ncnl(start);
chunk_t *prev = chunk_get_prev_ncnnl(start);
if (chunk_is_token(prev, CT_ASSIGN))
{
@ -65,10 +67,12 @@ chunk_t *align_var_def_brace(chunk_t *start, size_t span, size_t *p_nl_count)
__func__, __LINE__, start->text(), get_token_name(start->type), start->orig_line);
chunk_t *pc = chunk_get_next_type(start, CT_BRACE_CLOSE, start->level);
return(chunk_get_next_ncnl(pc));
return(chunk_get_next_ncnnl(pc));
}
char copy[1000];
LOG_FMT(LAVDB, "%s(%d): start->text() '%s', type is %s, on orig_line %zu\n",
__func__, __LINE__, start->text(), get_token_name(start->type), start->orig_line);
__func__, __LINE__, start->elided_text(copy), get_token_name(start->type), start->orig_line);
log_rule_B("align_var_def_inline");
auto const align_mask =
@ -111,7 +115,8 @@ chunk_t *align_var_def_brace(chunk_t *start, size_t span, size_t *p_nl_count)
chunk_t *pc = chunk_get_next(start);
while ( pc != nullptr
&& (pc->level >= start->level || pc->level == 0))
&& ( pc->level >= start->level
|| pc->level == 0))
{
if (chunk_is_newline(pc))
{
@ -137,7 +142,8 @@ chunk_t *align_var_def_brace(chunk_t *start, size_t span, size_t *p_nl_count)
continue;
}
if (fp_active && !pc->flags.test(PCF_IN_CLASS_BASE))
if ( fp_active
&& !pc->flags.test(PCF_IN_CLASS_BASE))
{
// WARNING: Duplicate from the align_func_proto()
log_rule_B("align_single_line_func");
@ -156,7 +162,7 @@ chunk_t *align_var_def_brace(chunk_t *start, size_t span, size_t *p_nl_count)
if ( get_chunk_parent_type(pc) == CT_OPERATOR
&& options::align_on_operator())
{
toadd = chunk_get_prev_ncnl(pc);
toadd = chunk_get_prev_ncnnl(pc);
}
else
{
@ -249,7 +255,8 @@ chunk_t *align_var_def_brace(chunk_t *start, size_t span, size_t *p_nl_count)
&& chunk_is_not_token(pc, CT_FUNC_CLASS_PROTO)
&& ((pc->flags & align_mask) == PCF_VAR_1ST)
&& chunk_is_not_token(pc, CT_FUNC_DEF) // Issue 1452
&& ((pc->level == (start->level + 1)) || pc->level == 0)
&& ( (pc->level == (start->level + 1))
|| pc->level == 0)
&& pc->prev != nullptr
&& pc->prev->type != CT_MEMBER)
{

@ -7,6 +7,7 @@
*/
#include "args.h"
#include "unc_ctype.h"
#include <cstring>
@ -152,7 +153,8 @@ const char *Args::Unused(size_t &index)
size_t Args::SplitLine(char *text, char *args[], size_t num_args)
{
if (text == nullptr || num_args == 0)
if ( text == nullptr
|| num_args == 0)
{
return(0);
}
@ -166,7 +168,8 @@ size_t Args::SplitLine(char *text, char *args[], size_t num_args)
&& *text != 0) // end of string not reached yet
{
// Detect the start of an arg
if (!in_arg && !unc_isspace(*text))
if ( !in_arg
&& !unc_isspace(*text))
{
in_arg = true;
args[argc] = dest;

@ -26,15 +26,12 @@
#include "prototypes.h"
#include "backup.h"
#include "logger.h"
#include "md5.h"
#include "unc_ctype.h"
#include "uncrustify.h"
#include <cerrno>
#include <cstdio>
#include <cstring>
#ifdef __APPLE__
#include <cerrno> // is needed under OSX
#endif
using namespace std;

@ -10,25 +10,15 @@
#include "brace_cleanup.h"
#include "chunk_list.h"
#include "flag_parens.h"
#include "frame_list.h"
#include "indent.h"
#include "keywords.h"
#include "lang_pawn.h"
#include "language_tools.h"
#include "log_rules.h"
#include "logger.h"
#include "prototypes.h"
#include "unc_ctype.h"
#include "uncrustify.h"
#include "uncrustify_types.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <stdexcept>
#include <stdexcept> // to get std::invalid_argument
constexpr static auto LCURRENT = LBC;
using namespace uncrustify;
@ -129,7 +119,7 @@ static size_t preproc_start(BraceState &braceState, ParseFrame &frm, chunk_t *pc
LOG_FUNC_ENTRY();
const size_t pp_level = braceState.pp_level;
chunk_t *next = chunk_get_next_ncnl(pc);
chunk_t *next = chunk_get_next_ncnnl(pc);
if (next == nullptr)
{
@ -198,8 +188,12 @@ void brace_cleanup(void)
while (pc != nullptr)
{
LOG_FMT(LTOK, "%s(%d): orig_line is %zu, orig_col is %zu, text() is '%s'\n",
__func__, __LINE__, pc->orig_line, pc->orig_col, pc->text());
// Check for leaving a #define body
if (braceState.in_preproc != CT_NONE && !pc->flags.test(PCF_IN_PREPROC))
if ( braceState.in_preproc != CT_NONE
&& !pc->flags.test(PCF_IN_PREPROC))
{
if (braceState.in_preproc == CT_PP_DEFINE)
{
@ -212,6 +206,8 @@ void brace_cleanup(void)
const size_t pp_level = (chunk_is_token(pc, CT_PREPROC))
? preproc_start(braceState, frm, pc)
: braceState.pp_level;
LOG_FMT(LTOK, "%s(%d): pp_level is %zu\n",
__func__, __LINE__, pp_level);
// Do before assigning stuff from the frame
if ( language_is_set(LANG_PAWN)
@ -244,11 +240,12 @@ void brace_cleanup(void)
&& !chunk_is_newline(pc)
&& !chunk_is_token(pc, CT_ATTRIBUTE)
&& !chunk_is_token(pc, CT_IGNORED) // Issue #2279
&& (braceState.in_preproc == CT_PP_DEFINE || braceState.in_preproc == CT_NONE))
&& ( braceState.in_preproc == CT_PP_DEFINE
|| braceState.in_preproc == CT_NONE))
{
braceState.consumed = false;
parse_cleanup(braceState, frm, pc);
print_stack(LBCSAFTER, (chunk_is_token(pc, CT_VBRACE_CLOSE)) ? "Virt-}" : pc->str.c_str(), frm);
print_stack(LBCSAFTER, (chunk_is_token(pc, CT_VBRACE_CLOSE)) ? "Virt-}\n" : pc->str.c_str(), frm);
}
pc = chunk_get_next(pc);
}
@ -259,17 +256,19 @@ static bool maybe_while_of_do(chunk_t *pc)
{
LOG_FUNC_ENTRY();
chunk_t *prev = chunk_get_prev_ncnl(pc);
chunk_t *prev = chunk_get_prev_ncnnl(pc);
if (prev == nullptr || !prev->flags.test(PCF_IN_PREPROC))
if ( prev == nullptr
|| !prev->flags.test(PCF_IN_PREPROC))
{
return(false);
}
// Find the chunk before the preprocessor
while (prev != nullptr && prev->flags.test(PCF_IN_PREPROC))
while ( prev != nullptr
&& prev->flags.test(PCF_IN_PREPROC))
{
prev = chunk_get_prev_ncnl(prev);
prev = chunk_get_prev_ncnnl(prev);
}
if ( ( chunk_is_token(prev, CT_VBRACE_CLOSE)
@ -352,7 +351,8 @@ static void parse_cleanup(BraceState &braceState, ParseFrame &frm, chunk_t *pc)
LOG_FMT(LTOK, "%s(%d): frm.stmt_count is %zu, frm.expr_count is %zu\n",
__func__, __LINE__, frm.stmt_count, frm.expr_count);
if ( (frm.stmt_count == 0 || frm.expr_count == 0)
if ( ( frm.stmt_count == 0
|| frm.expr_count == 0)
&& !chunk_is_semicolon(pc)
&& chunk_is_not_token(pc, CT_BRACE_CLOSE)
&& chunk_is_not_token(pc, CT_VBRACE_CLOSE)
@ -454,19 +454,31 @@ static void parse_cleanup(BraceState &braceState, ParseFrame &frm, chunk_t *pc)
{
LOG_FMT(LWARN, "%s(%d): pc->orig_line is %zu, orig_col is %zu, text() is '%s', type is %s\n",
__func__, __LINE__, pc->orig_line, pc->orig_col, pc->text(), get_token_name(pc->type));
LOG_FMT(LWARN, "%s(%d): (frm.top().type + 1) is %s\n",
__func__, __LINE__, get_token_name((c_token_t)(frm.top().type + 1)));
paren_stack_entry_t AA = frm.top(); // Issue #3055
if ( frm.top().type != CT_EOF
&& frm.top().type != CT_PP_DEFINE)
if (AA.type != CT_EOF)
{
LOG_FMT(LWARN, "%s(%d): File: %s, orig_line is %zu, orig_col is %zu, Error: Unexpected '%s' for '%s', which was on line %zu\n",
__func__, __LINE__, cpd.filename.c_str(), pc->orig_line, pc->orig_col,
pc->text(), get_token_name(frm.top().pc->type),
frm.top().pc->orig_line);
print_stack(LBCSPOP, "=Error ", frm);
cpd.error_count++;
exit(EXIT_FAILURE);
LOG_FMT(LWARN, "%s(%d): (frm.top().type + 1) is %s\n",
__func__, __LINE__, get_token_name((c_token_t)(frm.top().type + 1)));
}
if (pc->flags.test(PCF_IN_PREPROC)) // Issue #3113
{
// do nothing
}
else
{
if ( frm.top().type != CT_EOF
&& frm.top().type != CT_PP_DEFINE)
{
LOG_FMT(LWARN, "%s(%d): File: %s, orig_line is %zu, orig_col is %zu, Error: Unexpected '%s' for '%s', which was on line %zu\n",
__func__, __LINE__, cpd.filename.c_str(), pc->orig_line, pc->orig_col,
pc->text(), get_token_name(frm.top().pc->type),
frm.top().pc->orig_line);
print_stack(LBCSPOP, "=Error ", frm);
cpd.error_count++;
exit(EXIT_FAILURE);
}
}
}
else
@ -532,7 +544,7 @@ static void parse_cleanup(BraceState &braceState, ParseFrame &frm, chunk_t *pc)
*/
if (language_is_set(LANG_PAWN))
{
chunk_t *tmp = chunk_get_next_ncnl(pc);
chunk_t *tmp = chunk_get_next_ncnnl(pc);
if ( chunk_is_not_token(tmp, CT_SEMICOLON)
&& chunk_is_not_token(tmp, CT_VSEMICOLON))
@ -568,7 +580,7 @@ static void parse_cleanup(BraceState &braceState, ParseFrame &frm, chunk_t *pc)
|| chunk_is_token(pc, CT_SPAREN_OPEN)
|| chunk_is_token(pc, CT_BRACE_OPEN))
{
chunk_t *prev = chunk_get_prev_ncnl(pc);
chunk_t *prev = chunk_get_prev_ncnnl(pc);
if (prev != nullptr)
{
@ -632,6 +644,7 @@ static void parse_cleanup(BraceState &braceState, ParseFrame &frm, chunk_t *pc)
parent = CT_RETURN;
}
// Carry through CT_ENUM parent in NS_ENUM (type, name) {
// for the vim editor }
else if ( chunk_is_token(prev, CT_FPAREN_CLOSE)
&& language_is_set(LANG_OC)
&& get_chunk_parent_type(prev) == CT_ENUM)
@ -673,7 +686,8 @@ static void parse_cleanup(BraceState &braceState, ParseFrame &frm, chunk_t *pc)
__func__, __LINE__);
chunk_t *tmp = frm.top().pc;
if (tmp != nullptr && get_chunk_parent_type(tmp) == CT_NAMESPACE)
if ( tmp != nullptr
&& get_chunk_parent_type(tmp) == CT_NAMESPACE)
{
LOG_FMT(LBCSPOP, "%s(%d): tmp->parent_type is NAMESPACE\n",
__func__, __LINE__);
@ -723,7 +737,8 @@ static void parse_cleanup(BraceState &braceState, ParseFrame &frm, chunk_t *pc)
}
}
if (chunk_is_token(pc, CT_CASE))
if ( chunk_is_token(pc, CT_CASE)
|| chunk_is_token(pc, CT_DEFAULT))
{
LOG_FMT(LBCSPOP, "%s(%d): pc->orig_line is %zu, pc->orig_col is %zu\n",
__func__, __LINE__, pc->orig_line, pc->orig_col);
@ -810,7 +825,8 @@ static void parse_cleanup(BraceState &braceState, ParseFrame &frm, chunk_t *pc)
|| ( chunk_is_semicolon(pc)
&& frm.top().type != CT_PAREN_OPEN
&& frm.top().type != CT_FPAREN_OPEN
&& frm.top().type != CT_SPAREN_OPEN))
&& frm.top().type != CT_SPAREN_OPEN)
|| chunk_is_token(pc, CT_MACRO)) // Issue #2742
{
LOG_FMT(LSTMT, "%s(%d): orig_line is %zu, reset1 stmt on '%s'\n",
__func__, __LINE__, pc->orig_line, pc->text());
@ -822,7 +838,7 @@ static void parse_cleanup(BraceState &braceState, ParseFrame &frm, chunk_t *pc)
// Mark expression starts
LOG_FMT(LSTMT, "%s(%d): Mark expression starts: orig_line is %zu, orig_col is %zu, text() is '%s'\n",
__func__, __LINE__, pc->orig_line, pc->orig_col, pc->text());
chunk_t *tmp = chunk_get_next_ncnl(pc);
chunk_t *tmp = chunk_get_next_ncnnl(pc);
if ( chunk_is_token(pc, CT_ARITH)
|| chunk_is_token(pc, CT_SHIFT)
@ -856,28 +872,6 @@ static void parse_cleanup(BraceState &braceState, ParseFrame &frm, chunk_t *pc)
LOG_FMT(LSTMT, "%s(%d): orig_line is %zu, orig_col is %zu, reset expr on '%s'\n",
__func__, __LINE__, pc->orig_line, pc->orig_col, pc->text());
}
else if ( chunk_is_token(pc, CT_BRACE_CLOSE)
&& !braceState.consumed
&& braceState.in_preproc != CT_PP_DEFINE)
{
size_t file_pp_level = ifdef_over_whole_file() ? 1 : 0;
if (!cpd.unc_off_used && pc->pp_level == file_pp_level)
{
// fatal error
LOG_FMT(LERR, "%s(%d): Unmatched BRACE_CLOSE\n orig_line is %zu, orig_col is %zu\n",
__func__, __LINE__, pc->orig_line, pc->orig_col);
log_rule_B("tok_split_gte");
if (!options::tok_split_gte())
{
LOG_FMT(LERR, "%s(%d): Try the option 'tok_split_gte = true'\n",
__func__, __LINE__);
}
exit(EXIT_FAILURE);
}
}
} // parse_cleanup
@ -885,12 +879,19 @@ static bool check_complex_statements(ParseFrame &frm, chunk_t *pc, const BraceSt
{
LOG_FUNC_ENTRY();
brace_stage_e atest = frm.top().stage;
LOG_FMT(LBCSPOP, "%s(%d): atest is %s\n",
__func__, __LINE__, get_brace_stage_name(atest));
// Turn an optional parenthesis into either a real parenthesis or a brace
if (frm.top().stage == brace_stage_e::OP_PAREN1)
{
frm.top().stage = (chunk_is_not_token(pc, CT_PAREN_OPEN))
? brace_stage_e::BRACE2
: brace_stage_e::PAREN1;
LOG_FMT(LBCSPOP, "%s(%d): frm.top().stage is now %s\n",
__func__, __LINE__, get_brace_stage_name(frm.top().stage));
}
// Check for CT_ELSE after CT_IF
@ -1021,9 +1022,10 @@ static bool check_complex_statements(ParseFrame &frm, chunk_t *pc, const BraceSt
print_stack(LBCSPOP, "-Error ", frm);
cpd.error_count++;
}
// Insert a CT_VBRACE_OPEN, if needed
// but not in a preprocessor
atest = frm.top().stage;
if ( chunk_is_not_token(pc, CT_BRACE_OPEN)
&& !pc->flags.test(PCF_IN_PREPROC)
&& ( (frm.top().stage == brace_stage_e::BRACE2)
@ -1127,7 +1129,7 @@ static bool handle_complex_close(ParseFrame &frm, chunk_t *pc, const BraceState
frm.top().stage = brace_stage_e::ELSE;
// If the next chunk isn't CT_ELSE, close the statement
chunk_t *next = chunk_get_next_ncnl(pc);
chunk_t *next = chunk_get_next_ncnnl(pc);
if ( next == nullptr
|| chunk_is_not_token(next, CT_ELSE))
@ -1146,7 +1148,7 @@ static bool handle_complex_close(ParseFrame &frm, chunk_t *pc, const BraceState
frm.top().stage = brace_stage_e::CATCH;
// If the next chunk isn't CT_CATCH or CT_FINALLY, close the statement
chunk_t *next = chunk_get_next_ncnl(pc);
chunk_t *next = chunk_get_next_ncnnl(pc);
if ( chunk_is_not_token(next, CT_CATCH)
&& chunk_is_not_token(next, CT_FINALLY))
@ -1213,14 +1215,14 @@ static void mark_namespace(chunk_t *pns)
chunk_t *br_close;
bool is_using = false;
chunk_t *pc = chunk_get_prev_ncnl(pns);
chunk_t *pc = chunk_get_prev_ncnnl(pns);
if (chunk_is_token(pc, CT_USING))
{
is_using = true;
set_chunk_parent(pns, CT_USING);
}
pc = chunk_get_next_ncnl(pns);
pc = chunk_get_next_ncnnl(pns);
while (pc != nullptr)
{
@ -1236,7 +1238,7 @@ static void mark_namespace(chunk_t *pns)
}
return;
}
pc = chunk_get_next_ncnl(pc);
pc = chunk_get_next_ncnnl(pc);
continue;
}
log_rule_B("indent_namespace_limit");
@ -1275,6 +1277,7 @@ static chunk_t *insert_vbrace(chunk_t *pc, bool after, const ParseFrame &frm)
set_chunk_parent(&chunk, frm.top().type);
chunk.orig_line = pc->orig_line;
chunk.level = frm.level;
chunk.pp_level = frm.pp_level;
chunk.brace_level = frm.brace_level;
chunk.flags = pc->flags & PCF_COPY_FLAGS;
chunk.str = "";
@ -1297,7 +1300,8 @@ static chunk_t *insert_vbrace(chunk_t *pc, bool after, const ParseFrame &frm)
chunk.flags &= ~PCF_IN_PREPROC;
}
while (chunk_is_newline(ref) || chunk_is_comment(ref))
while ( chunk_is_newline(ref)
|| chunk_is_comment(ref))
{
ref->level++;
ref->brace_level++;
@ -1315,7 +1319,8 @@ static chunk_t *insert_vbrace(chunk_t *pc, bool after, const ParseFrame &frm)
{
if (chunk_is_token(ref, CT_PREPROC_BODY))
{
while (ref != nullptr && ref->flags.test(PCF_IN_PREPROC))
while ( ref != nullptr
&& ref->flags.test(PCF_IN_PREPROC))
{
ref = chunk_get_prev(ref);
}
@ -1323,6 +1328,11 @@ static chunk_t *insert_vbrace(chunk_t *pc, bool after, const ParseFrame &frm)
else
{
ref = chunk_get_next(ref);
if (chunk_is_token(ref, CT_COMMENT)) // Issue #3034
{
ref = chunk_get_next_nc(ref);
}
}
}
@ -1333,6 +1343,7 @@ static chunk_t *insert_vbrace(chunk_t *pc, bool after, const ParseFrame &frm)
chunk.orig_line = ref->orig_line;
chunk.orig_col = ref->orig_col;
chunk.column = ref->column + ref->len() + 1;
chunk.pp_level = ref->pp_level; // Issue #3055
set_chunk_type(&chunk, CT_VBRACE_OPEN);
return(chunk_add_after(&chunk, ref));
@ -1377,7 +1388,7 @@ bool close_statement(ParseFrame &frm, chunk_t *pc, const BraceState &braceState)
else
{
// otherwise, add before it and consume the vbrace
vbc = chunk_get_prev_ncnl(pc);
vbc = chunk_get_prev_ncnnl(pc);
frm.level--;
frm.brace_level--;

@ -1,10 +1,11 @@
/**
* @file brace_cleanup.h
* prototypes for brace_cleanup.c
* prototypes for brace_cleanup.cpp
*
* @author Ben Gardner
* @license GPL v2+
*/
#ifndef BRACE_CLEANUP_H_INCLUDED
#define BRACE_CLEANUP_H_INCLUDED

@ -8,23 +8,12 @@
#include "braces.h"
#include "chunk_list.h"
#include "combine.h"
#include "calculate_closing_brace_position.h"
#include "combine_tools.h"
#include "error_types.h"
#include "language_tools.h"
#include "log_rules.h"
#include "newlines.h"
#include "prototypes.h"
#include "unc_ctype.h"
#include "uncrustify.h"
#include "uncrustify_types.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <vector>
constexpr static auto LCURRENT = LBR;
using namespace uncrustify;
@ -170,7 +159,7 @@ void do_braces(void)
// Issue #2232 put this at the beginning
chunk_t *pc = chunk_get_head();
while ((pc = chunk_get_next_ncnl(pc)) != nullptr)
while ((pc = chunk_get_next_ncnnl(pc)) != nullptr)
{
if ( chunk_is_not_token(pc, CT_BRACE_OPEN)
&& chunk_is_not_token(pc, CT_VBRACE_OPEN))
@ -180,7 +169,7 @@ void do_braces(void)
chunk_t *br_open = pc;
const c_token_t brc_type = c_token_t(pc->type + 1); // corresponds to closing type
// Detect empty bodies
chunk_t *tmp = chunk_get_next_ncnl(pc);
chunk_t *tmp = chunk_get_next_ncnnl(pc);
if (chunk_is_token(tmp, brc_type))
{
@ -291,7 +280,8 @@ static void examine_braces(void)
|| ( get_chunk_parent_type(pc) == CT_WHILE
&& options::mod_full_brace_while() == IARF_REMOVE)))
{
if (multiline_block && paren_multiline_before_brace(pc))
if ( multiline_block
&& paren_multiline_before_brace(pc))
{
pc = prev;
continue;
@ -313,7 +303,7 @@ static bool should_add_braces(chunk_t *vbopen)
{
return(false);
}
LOG_FMT(LBRDEL, "%s(%d): start on %zu : ",
LOG_FMT(LBRDEL, "%s(%d): start on %zu:\n",
__func__, __LINE__, vbopen->orig_line);
size_t nl_count = 0;
@ -321,7 +311,7 @@ static bool should_add_braces(chunk_t *vbopen)
chunk_t *pc = nullptr;
for (pc = chunk_get_next_nc(vbopen, scope_e::PREPROC);
pc != nullptr && pc->level > vbopen->level;
(pc != nullptr && pc->level > vbopen->level);
pc = chunk_get_next_nc(pc, scope_e::PREPROC))
{
if (chunk_is_newline(pc))
@ -353,7 +343,7 @@ static bool can_remove_braces(chunk_t *bopen)
{
return(false);
}
chunk_t *pc = chunk_get_next_ncnl(bopen, scope_e::PREPROC);
chunk_t *pc = chunk_get_next_ncnnl(bopen, scope_e::PREPROC);
if (chunk_is_token(pc, CT_BRACE_CLOSE))
{
@ -376,7 +366,8 @@ static bool can_remove_braces(chunk_t *bopen)
LOG_FMT(LBRDEL, "%s(%d): - begin with token '%s', orig_line is %zu, orig_col is %zu\n",
__func__, __LINE__, pc->text(), pc->orig_line, pc->orig_col);
while (pc != nullptr && pc->level >= level)
while ( pc != nullptr
&& pc->level >= level)
{
LOG_FMT(LBRDEL, "%s(%d): test token '%s', orig_line is %zu, orig_col is %zu\n",
__func__, __LINE__, pc->text(), pc->orig_line, pc->orig_col);
@ -391,7 +382,8 @@ static bool can_remove_braces(chunk_t *bopen)
{
nl_count += pc->nl_count;
if (nl_max > 0 && nl_count > nl_max)
if ( nl_max > 0
&& nl_count > nl_max)
{
LOG_FMT(LBRDEL, "%s(%d): exceeded %zu newlines\n",
__func__, __LINE__, nl_max);
@ -423,7 +415,8 @@ static bool can_remove_braces(chunk_t *bopen)
hit_semi = true;
}
}
else if ( (chunk_is_token(pc, CT_IF) || chunk_is_token(pc, CT_ELSEIF))
else if ( ( chunk_is_token(pc, CT_IF)
|| chunk_is_token(pc, CT_ELSEIF))
&& br_count == 0)
{
if_count++;
@ -431,7 +424,8 @@ static bool can_remove_braces(chunk_t *bopen)
if (pc->level == level)
{
if (semi_count > 0 && hit_semi)
if ( semi_count > 0
&& hit_semi)
{
// should have bailed due to close brace level drop
LOG_FMT(LBRDEL, "%s(%d): no close brace\n", __func__, __LINE__);
@ -481,8 +475,8 @@ static bool can_remove_braces(chunk_t *bopen)
if ( chunk_is_token(pc, CT_BRACE_CLOSE)
&& get_chunk_parent_type(pc) == CT_IF)
{
chunk_t *next = chunk_get_next_ncnl(pc, scope_e::PREPROC);
chunk_t *tmp_prev = chunk_get_prev_ncnl(pc, scope_e::PREPROC);
chunk_t *next = chunk_get_next_ncnnl(pc, scope_e::PREPROC);
chunk_t *tmp_prev = chunk_get_prev_ncnnl(pc, scope_e::PREPROC);
if ( chunk_is_token(next, CT_ELSE)
&& ( chunk_is_token(tmp_prev, CT_BRACE_CLOSE)
@ -523,7 +517,8 @@ static void examine_brace(chunk_t *bopen)
chunk_t *pc = chunk_get_next_nc(bopen);
while (pc != nullptr && pc->level >= level)
while ( pc != nullptr
&& pc->level >= level)
{
if (chunk_is_token(pc, CT_NEWLINE))
{
@ -547,7 +542,8 @@ static void examine_brace(chunk_t *bopen)
{
nl_count += pc->nl_count;
if (nl_max > 0 && nl_count > nl_max)
if ( nl_max > 0
&& nl_count > nl_max)
{
LOG_FMT(LBRDEL, "%s(%d): exceeded %zu newlines\n",
__func__, __LINE__, nl_max);
@ -582,7 +578,7 @@ static void examine_brace(chunk_t *bopen)
if (br_count == 0)
{
chunk_t *next = chunk_get_next_ncnl(pc, scope_e::PREPROC);
chunk_t *next = chunk_get_next_ncnnl(pc, scope_e::PREPROC);
if ( next == nullptr
|| chunk_is_not_token(next, CT_BRACE_CLOSE))
@ -603,7 +599,8 @@ static void examine_brace(chunk_t *bopen)
if (pc->level == level)
{
if (semi_count > 0 && hit_semi)
if ( semi_count > 0
&& hit_semi)
{
// should have bailed due to close brace level drop
LOG_FMT(LBRDEL, "%s(%d): no close brace\n", __func__, __LINE__);
@ -673,13 +670,13 @@ static void examine_brace(chunk_t *bopen)
if (chunk_is_token(pc, CT_BRACE_CLOSE))
{
chunk_t *next = chunk_get_next_ncnl(pc);
chunk_t *next = chunk_get_next_ncnnl(pc);
if (next != nullptr)
{
while (chunk_is_token(next, CT_VBRACE_CLOSE))
{
next = chunk_get_next_ncnl(next);
next = chunk_get_next_ncnnl(next);
}
if (next != nullptr)
@ -707,11 +704,11 @@ static void examine_brace(chunk_t *bopen)
if (get_chunk_parent_type(bopen) == CT_ELSE)
{
chunk_t *tmp_next = chunk_get_next_ncnl(bopen);
chunk_t *tmp_next = chunk_get_next_ncnnl(bopen);
if (chunk_is_token(tmp_next, CT_IF))
{
chunk_t *tmp_prev = chunk_get_prev_ncnl(bopen);
chunk_t *tmp_prev = chunk_get_prev_ncnnl(bopen);
LOG_FMT(LBRDEL, "%s(%d): else-if removing braces on line %zu and %zu\n",
__func__, __LINE__, bopen->orig_line, pc->orig_line);
@ -809,7 +806,7 @@ static void convert_brace(chunk_t *br)
{
// Issue #2219
// look for opening brace
chunk_t *brace;
chunk_t *brace = nullptr;
if (chunk_is_token(br, CT_VBRACE_OPEN))
{
@ -905,7 +902,7 @@ static void convert_vbrace_to_brace(void)
log_rule_B("mod_full_brace_using");
log_rule_B("mod_full_brace_function");
for (chunk_t *pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next_ncnl(pc))
for (chunk_t *pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next_ncnnl(pc))
{
if (chunk_is_not_token(pc, CT_VBRACE_OPEN))
{
@ -935,7 +932,8 @@ static void convert_vbrace_to_brace(void)
while ((tmp = chunk_get_next(tmp)) != nullptr)
{
if (in_preproc && !tmp->flags.test(PCF_IN_PREPROC))
if ( in_preproc
&& !tmp->flags.test(PCF_IN_PREPROC))
{
// Can't leave a preprocessor
break;
@ -1003,40 +1001,49 @@ chunk_t *insert_comment_after(chunk_t *ref, c_token_t cmt_type,
static void append_tag_name(unc_text &txt, chunk_t *pc)
{
LOG_FUNC_ENTRY();
chunk_t *cur = pc;
chunk_t *tmp = pc;
LOG_FMT(LMCB, "%s(%d): txt is '%s'\n",
__func__, __LINE__, txt.c_str());
// step backwards over all a::b stuff
for (chunk_t *tmp = chunk_get_prev_ncnl(pc)
; (chunk_is_token(tmp, CT_DC_MEMBER) || chunk_is_token(tmp, CT_MEMBER))
; tmp = chunk_get_prev_ncnl(tmp))
while ((tmp = chunk_get_prev_ncnnl(tmp)) != nullptr)
{
tmp = chunk_get_prev_ncnl(tmp);
cur = tmp;
if ( chunk_is_not_token(tmp, CT_DC_MEMBER)
&& chunk_is_not_token(tmp, CT_MEMBER))
{
break;
}
tmp = chunk_get_prev_ncnnl(tmp);
pc = tmp;
if (!chunk_is_word(tmp))
{
break;
}
}
txt += pc->str;
LOG_FMT(LMCB, "%s(%d): txt is '%s'\n",
__func__, __LINE__, txt.c_str());
if (cur == nullptr)
while ((pc = chunk_get_next_ncnnl(pc)) != nullptr)
{
return;
}
txt += cur->str;
cur = chunk_get_next_ncnl(cur);
for (chunk_t *tmp = cur, *tmp_next = chunk_get_next_ncnl(cur)
; (chunk_is_token(tmp, CT_DC_MEMBER) || chunk_is_token(tmp, CT_MEMBER))
; tmp = chunk_get_next_ncnl(tmp), tmp_next = chunk_get_next_ncnl(tmp))
{
txt += tmp->str;
if (tmp_next == nullptr)
if ( chunk_is_not_token(pc, CT_DC_MEMBER)
&& chunk_is_not_token(pc, CT_MEMBER))
{
break;
}
txt += tmp_next->str;
txt += pc->str;
LOG_FMT(LMCB, "%s(%d): txt is '%s'\n",
__func__, __LINE__, txt.c_str());
pc = chunk_get_next_ncnnl(pc);
if (pc != nullptr)
{
txt += pc->str;
LOG_FMT(LMCB, "%s(%d): txt is '%s'\n",
__func__, __LINE__, txt.c_str());
}
}
} // append_tag_name
@ -1049,7 +1056,7 @@ void add_long_closebrace_comment(void)
chunk_t *ns_pc = nullptr;
chunk_t *cl_pc = nullptr;
for (chunk_t *pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next_ncnl(pc))
for (chunk_t *pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next_ncnnl(pc))
{
if ( chunk_is_token(pc, CT_FUNC_DEF)
|| chunk_is_token(pc, CT_OC_MSG_DECL))
@ -1109,7 +1116,8 @@ void add_long_closebrace_comment(void)
// make sure a newline follows in order to not overwrite an already
// existring comment
if (tmp != nullptr && !chunk_is_newline(tmp))
if ( tmp != nullptr
&& !chunk_is_newline(tmp))
{
break;
}
@ -1127,30 +1135,42 @@ void add_long_closebrace_comment(void)
if (tag_pc != nullptr)
{
append_tag_name(xstr, tag_pc);
LOG_FMT(LMCB, "%s(%d): xstr is '%s'\n",
__func__, __LINE__, xstr.c_str());
}
}
else if (get_chunk_parent_type(br_open) == CT_SWITCH && sw_pc != nullptr)
else if ( get_chunk_parent_type(br_open) == CT_SWITCH
&& sw_pc != nullptr)
{
log_rule_B("mod_add_long_switch_closebrace_comment");
nl_min = options::mod_add_long_switch_closebrace_comment();
tag_pc = sw_pc;
xstr = sw_pc->str;
LOG_FMT(LMCB, "%s(%d): xstr is '%s'\n",
__func__, __LINE__, xstr.c_str());
}
else if (get_chunk_parent_type(br_open) == CT_NAMESPACE && ns_pc != nullptr)
else if ( get_chunk_parent_type(br_open) == CT_NAMESPACE
&& ns_pc != nullptr)
{
log_rule_B("mod_add_long_namespace_closebrace_comment");
nl_min = options::mod_add_long_namespace_closebrace_comment();
tag_pc = ns_pc;
xstr = tag_pc->str; // add 'namespace' to the string
LOG_FMT(LMCB, "%s(%d): xstr is '%s'\n",
__func__, __LINE__, xstr.c_str());
// next chunk, normally is going to be the namespace name
// append it with a space to generate "namespace xyz"
chunk_t *tmp_next = chunk_get_next_ncnl(tag_pc);
chunk_t *tmp_next = chunk_get_next_ncnnl(tag_pc);
if (chunk_is_not_token(tmp_next, CT_BRACE_OPEN)) // anonymous namespace -> ignore
{
xstr.append(" ");
LOG_FMT(LMCB, "%s(%d): xstr is '%s'\n",
__func__, __LINE__, xstr.c_str());
append_tag_name(xstr, tmp_next);
LOG_FMT(LMCB, "%s(%d): xstr is '%s'\n",
__func__, __LINE__, xstr.c_str());
}
}
else if ( get_chunk_parent_type(br_open) == CT_CLASS
@ -1162,13 +1182,19 @@ void add_long_closebrace_comment(void)
nl_min = options::mod_add_long_class_closebrace_comment();
tag_pc = cl_pc;
xstr = tag_pc->str;
LOG_FMT(LMCB, "%s(%d): xstr is '%s'\n",
__func__, __LINE__, xstr.c_str());
chunk_t *tmp_next = chunk_get_next(cl_pc);
if (tag_pc != nullptr)
{
xstr.append(" ");
LOG_FMT(LMCB, "%s(%d): xstr is '%s'\n",
__func__, __LINE__, xstr.c_str());
append_tag_name(xstr, tmp_next);
LOG_FMT(LMCB, "%s(%d): xstr is '%s'\n",
__func__, __LINE__, xstr.c_str());
}
}
@ -1181,6 +1207,8 @@ void add_long_closebrace_comment(void)
? CT_COMMENT_CPP : CT_COMMENT;
// Add a comment after the close brace
LOG_FMT(LMCB, "%s(%d): xstr is '%s'\n",
__func__, __LINE__, xstr.c_str());
insert_comment_after(br_close, style, xstr);
}
break;
@ -1194,7 +1222,7 @@ static void move_case_break(void)
LOG_FUNC_ENTRY();
chunk_t *prev = nullptr;
for (chunk_t *pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next_ncnl(pc))
for (chunk_t *pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next_ncnnl(pc))
{
if ( chunk_is_token(pc, CT_BREAK)
&& chunk_is_token(prev, CT_BRACE_CLOSE)
@ -1216,7 +1244,7 @@ static chunk_t *mod_case_brace_remove(chunk_t *br_open)
__func__, __LINE__, br_open->orig_line);
// Find the matching brace close
chunk_t *next = chunk_get_next_ncnl(br_open, scope_e::PREPROC);
chunk_t *next = chunk_get_next_ncnnl(br_open, scope_e::PREPROC);
chunk_t *br_close = chunk_get_next_type(br_open, CT_BRACE_CLOSE, br_open->level, scope_e::PREPROC);
if (br_close == nullptr)
@ -1225,7 +1253,7 @@ static chunk_t *mod_case_brace_remove(chunk_t *br_open)
return(next);
}
// Make sure 'break', 'return', 'goto', 'case' or '}' is after the close brace
chunk_t *pc = chunk_get_next_ncnl(br_close, scope_e::PREPROC);
chunk_t *pc = chunk_get_next_ncnnl(br_close, scope_e::PREPROC);
if ( pc == nullptr
|| ( chunk_is_not_token(pc, CT_BREAK)
@ -1242,9 +1270,10 @@ static chunk_t *mod_case_brace_remove(chunk_t *br_open)
// scan to make sure there are no definitions at brace level between braces
for (chunk_t *tmp_pc = br_open;
tmp_pc != br_close;
tmp_pc = chunk_get_next_ncnl(tmp_pc, scope_e::PREPROC))
tmp_pc = chunk_get_next_ncnnl(tmp_pc, scope_e::PREPROC))
{
if (tmp_pc->level == (br_open->level + 1) && tmp_pc->flags.test(PCF_VAR_DEF))
if ( tmp_pc->level == (br_open->level + 1)
&& tmp_pc->flags.test(PCF_VAR_DEF))
{
LOG_FMT(LMCB, "%s(%d): - vardef on line %zu: '%s'\n",
__func__, __LINE__, tmp_pc->orig_line, pc->text());
@ -1257,7 +1286,7 @@ static chunk_t *mod_case_brace_remove(chunk_t *br_open)
for (chunk_t *tmp_pc = br_open;
tmp_pc != br_close;
tmp_pc = chunk_get_next_ncnl(tmp_pc, scope_e::PREPROC))
tmp_pc = chunk_get_next_ncnnl(tmp_pc, scope_e::PREPROC))
{
if (tmp_pc->brace_level == 0)
{
@ -1290,37 +1319,61 @@ static chunk_t *mod_case_brace_remove(chunk_t *br_open)
static chunk_t *mod_case_brace_add(chunk_t *cl_colon)
{
LOG_FUNC_ENTRY();
LOG_FMT(LMCB, "%s(%d): line %zu",
__func__, __LINE__, cl_colon->orig_line);
LOG_FMT(LMCB, "%s(%d): orig_line %zu, orig_col is %zu\n",
__func__, __LINE__, cl_colon->orig_line, cl_colon->orig_col);
chunk_t *pc = cl_colon;
chunk_t *last = nullptr;
chunk_t *next = chunk_get_next_ncnl(cl_colon, scope_e::PREPROC);
while ((pc = chunk_get_next_ncnl(pc, scope_e::PREPROC)) != nullptr)
// look for the case token to the colon
chunk_t *cas_ = chunk_get_prev_type(cl_colon, CT_CASE, cl_colon->level);
// look for the parent
chunk_t *swit = cas_->parent;
// look for the opening brace of the switch
chunk_t *open = chunk_get_next_type(swit, CT_BRACE_OPEN, swit->level);
// look for the closing brace of the switch
chunk_t *clos = chunk_skip_to_match(open);
// find the end of the case-block
while ((pc = chunk_get_next_ncnnl(pc, scope_e::PREPROC)) != nullptr)
{
if (pc->level < cl_colon->level)
LOG_FMT(LMCB, "%s(%d): text() is '%s', orig_line %zu, orig_col is %zu, pp_level is %zu\n",
__func__, __LINE__, pc->text(), pc->orig_line, pc->orig_col, pc->pp_level);
if (pc->level == cl_colon->level)
{
LOG_FMT(LMCB, "%s(%d): - level drop\n", __func__, __LINE__);
return(next);
if (chunk_is_token(pc, CT_CASE))
{
LOG_FMT(LMCB, "%s(%d): text() is '%s', orig_line %zu, orig_col is %zu\n",
__func__, __LINE__, pc->text(), pc->orig_line, pc->orig_col);
last = calculate_closing_brace_position(cl_colon, pc);
break;
}
}
if ( pc->level == cl_colon->level
&& ( chunk_is_token(pc, CT_CASE)
|| chunk_is_token(pc, CT_BREAK)))
else if (pc->level == cl_colon->level - 1)
{
last = pc;
break;
if (pc == clos)
{
LOG_FMT(LMCB, "%s(%d): text() is '%s', orig_line %zu, orig_col is %zu\n",
__func__, __LINE__, pc->text(), pc->orig_line, pc->orig_col);
// end of switch is reached
last = calculate_closing_brace_position(cl_colon, pc);
LOG_FMT(LMCB, "%s(%d): last->text() is '%s', orig_line %zu, orig_col is %zu\n",
__func__, __LINE__, last->text(), last->orig_line, last->orig_col);
break;
}
}
}
if (last == nullptr)
{
LOG_FMT(LMCB, "%s(%d): - last is nullptr\n", __func__, __LINE__);
chunk_t *next = chunk_get_next_ncnnl(cl_colon, scope_e::PREPROC);
return(next);
}
LOG_FMT(LMCB, "%s(%d): - adding before '%s' on line %zu\n",
__func__, __LINE__, last->text(), last->orig_line);
LOG_FMT(LMCB, "%s(%d): last->text() is '%s', orig_line %zu, orig_col is %zu\n",
__func__, __LINE__, last->text(), last->orig_line, last->orig_col);
LOG_FMT(LMCB, "%s(%d): adding braces after '%s' on line %zu\n",
__func__, __LINE__, cl_colon->text(), cl_colon->orig_line);
chunk_t chunk;
@ -1329,20 +1382,17 @@ static chunk_t *mod_case_brace_add(chunk_t *cl_colon)
chunk.orig_line = cl_colon->orig_line;
chunk.orig_col = cl_colon->orig_col;
chunk.level = cl_colon->level;
chunk.pp_level = cl_colon->pp_level;
chunk.brace_level = cl_colon->brace_level;
chunk.flags = pc->flags & PCF_COPY_FLAGS;
chunk.str = "{";
chunk_t *br_open = chunk_add_after(&chunk, cl_colon);
set_chunk_type(&chunk, CT_BRACE_CLOSE);
chunk.orig_line = last->orig_line;
chunk.orig_col = last->orig_col;
chunk.str = "}";
chunk_t *br_close = chunk_add_before(&chunk, last);
newline_add_before(last);
chunk_t *br_close = chunk_add_after(&chunk, last);
for (pc = chunk_get_next(br_open, scope_e::PREPROC);
pc != br_close;
@ -1364,7 +1414,7 @@ static void mod_case_brace(void)
while (pc != nullptr)
{
chunk_t *next = chunk_get_next_ncnl(pc, scope_e::PREPROC);
chunk_t *next = chunk_get_next_ncnnl(pc, scope_e::PREPROC);
if (next == nullptr)
{
@ -1389,7 +1439,7 @@ static void mod_case_brace(void)
}
else
{
pc = chunk_get_next_ncnl(pc, scope_e::PREPROC);
pc = chunk_get_next_ncnnl(pc, scope_e::PREPROC);
}
}
}
@ -1447,7 +1497,7 @@ static void process_if_chain(chunk_t *br_start)
}
braces.push_back(br_close);
pc = chunk_get_next_ncnl(br_close, scope_e::PREPROC);
pc = chunk_get_next_ncnnl(br_close, scope_e::PREPROC);
if ( pc == nullptr
|| chunk_is_not_token(pc, CT_ELSE))
@ -1461,14 +1511,14 @@ static void process_if_chain(chunk_t *br_start)
// There is an 'else' - we want full braces.
must_have_braces = true;
}
pc = chunk_get_next_ncnl(pc, scope_e::PREPROC);
pc = chunk_get_next_ncnnl(pc, scope_e::PREPROC);
if (chunk_is_token(pc, CT_ELSEIF))
{
while ( chunk_is_not_token(pc, CT_VBRACE_OPEN)
&& chunk_is_not_token(pc, CT_BRACE_OPEN))
{
pc = chunk_get_next_ncnl(pc, scope_e::PREPROC);
pc = chunk_get_next_ncnnl(pc, scope_e::PREPROC);
}
}

@ -1,10 +1,11 @@
/**
* @file braces.h
* prototypes for braces.c
* prototypes for braces.cpp
*
* @author Ben Gardner
* @license GPL v2+
*/
#ifndef BRACES_H_INCLUDED
#define BRACES_H_INCLUDED

@ -0,0 +1,199 @@
/**
* @file calculate_closing_brace_position.cpp
*
* @author Guy Maurel
* @license GPL v2+
*/
#include "calculate_closing_brace_position.h"
#include "chunk_list.h"
using namespace uncrustify;
chunk_t *calculate_closing_brace_position(const chunk_t *cl_colon, chunk_t *pc)
{
LOG_FMT(LMCB, "%s(%d): cl_colon->text() is '%s', orig_line %zu, orig_col is %zu, level is %zu\n",
__func__, __LINE__, cl_colon->text(), cl_colon->orig_line, cl_colon->orig_col, cl_colon->level);
LOG_FMT(LMCB, "%s(%d): pc->text() is '%s', orig_line %zu, orig_col is %zu, level is %zu\n",
__func__, __LINE__, pc->text(), pc->orig_line, pc->orig_col, pc->level);
// end of block is reached
// look back over newline, preprocessor BUT NOT #endif
// Issue #3058
// examine going back the tokens: look for a "brace closing" or a "semi colon" until the colon
// look back over comment, newline, preprocessor BUT NOT #endif
size_t check_level = 0;
if (chunk_is_token(pc, CT_BRACE_CLOSE))
{
check_level = pc->level + 1;
}
else
{
check_level = pc->level;
}
size_t erst_found = 0;
chunk_t *is_brace_close = nullptr;
chunk_t *is_semicolon = nullptr;
chunk_t *is_comment = nullptr;
chunk_t *back = chunk_get_prev_nnl(pc);
while (back != nullptr)
{
if (back == cl_colon)
{
break;
}
if (erst_found != 0)
{
break;
}
if (back->level == check_level)
{
if ( chunk_is_token(back, CT_BRACE_CLOSE)
|| chunk_is_token(back, CT_VBRACE_CLOSE))
{
// brace_close found
is_brace_close = back;
LOG_FMT(LMCB, "%s(%d): BRACE_CLOSE: line is %zu, col is %zu, level is %zu\n",
__func__, __LINE__, is_brace_close->orig_line, is_brace_close->orig_col, is_brace_close->level);
erst_found = 3;
}
if (chunk_is_token(back, CT_SEMICOLON))
{
// semicolon found
is_semicolon = back;
LOG_FMT(LMCB, "%s(%d): SEMICOLON: line is %zu, col is %zu, level is %zu\n",
__func__, __LINE__, is_semicolon->orig_line, is_semicolon->orig_col, is_semicolon->level);
erst_found = 4;
}
if (chunk_is_comment(back))
{
// comment found
is_comment = back;
LOG_FMT(LMCB, "%s(%d): COMMENT: line is %zu, col is %zu, level is %zu\n",
__func__, __LINE__, back->orig_line, back->orig_col, back->level);
}
}
back = chunk_get_prev(back);
}
LOG_FMT(LMCB, "%s(%d): erst_found is %zu\n",
__func__, __LINE__, erst_found);
chunk_t *last = nullptr;
if ( erst_found == 3
|| erst_found == 4)
{
if (is_comment != nullptr)
{
chunk_t *second = nullptr;
if (erst_found == 3)
{
second = is_brace_close;
}
else
{
// erst_found == 4
second = is_semicolon;
}
if (second != nullptr)
{
if (is_comment->orig_line == second->orig_line)
{
last = is_comment;
if (cl_colon->orig_line == is_comment->orig_line)
{
last = chunk_get_next(is_comment);
}
}
else
{
last = chunk_get_prev_ncnnl(pc);
}
}
else
{
LOG_FMT(LMCB, "\n\n%s(%d):\n", __func__, __LINE__);
fprintf(stderr, "FATAL: second is nullptr\n");
fprintf(stderr, "Please make a report.\n");
exit(EX_SOFTWARE);
}
}
else
{
last = chunk_get_prev_ncnnl(pc);
}
}
else
{
LOG_FMT(LMCB, "\n\n%s(%d):\n", __func__, __LINE__);
fprintf(stderr, "FATAL: erst_found is not 3 or 4\n");
fprintf(stderr, "Please make a report.\n");
exit(EX_SOFTWARE);
}
if (chunk_is_token(last, CT_COMMENT_CPP)) // Issue #3058
{
last = chunk_get_next(last);
}
LOG_FMT(LMCB, "%s(%d): last->text() is '%s', orig_line %zu, orig_col is %zu\n",
__func__, __LINE__, last->text(), last->orig_line, last->orig_col);
if (chunk_is_preproc(last))
{
// we have a preprocessor token
while (last != nullptr)
{
LOG_FMT(LMCB, "%s(%d): text() is '%s', orig_line %zu, orig_col is %zu\n",
__func__, __LINE__, last->text(), last->orig_line, last->orig_col);
if (chunk_is_token(last, CT_PP_ENDIF))
{
// look for the parent
chunk_t *parent_last = last->parent;
// compare the positions
int comp = chunk_compare_position(parent_last, cl_colon);
LOG_FMT(LMCB, "%s(%d): comp is %d\n",
__func__, __LINE__, comp);
if (comp == -1)
{
// cl_colon is after parent_last ==>
// the closing brace will be set before #endif
chunk_t *pp_start = chunk_get_pp_start(last);
last = chunk_get_prev_nnl(pp_start);
LOG_FMT(LMCB, "%s(%d): text() is '%s', orig_line %zu, orig_col is %zu\n",
__func__, __LINE__, last->text(), last->orig_line, last->orig_col);
}
else if (comp == 1)
{
// cl_colon is before parent_last ==>
// the closing brace will be set after #endif
LOG_FMT(LMCB, "%s(%d): text() is '%s', orig_line %zu, orig_col is %zu\n",
__func__, __LINE__, last->text(), last->orig_line, last->orig_col);
}
break;
}
last = chunk_get_prev_ncnnl(last);
LOG_FMT(LMCB, "%s(%d): text() is '%s', orig_line %zu, orig_col is %zu\n",
__func__, __LINE__, last->text(), last->orig_line, last->orig_col);
if (!chunk_is_preproc(last))
{
break;
}
}
}
return(last);
} // calculate_closing_brace_position

@ -0,0 +1,18 @@
/**
* @file calculate_closing_brace_position.h
* prototype for calculate_closing_brace_position.cpp
*
* @author Guy Maurel
* @license GPL v2+
*/
#ifndef CALCULATE_CLOSING_BRACE_POSITION_H_INCLUDED
#define CALCULATE_CLOSING_BRACE_POSITION_H_INCLUDED
#include "uncrustify_types.h"
chunk_t *calculate_closing_brace_position(const chunk_t *cl_colon, chunk_t *pc);
#endif /* CALCULATE_CLOSING_BRACE_POSITION_H_INCLUDED */

@ -11,12 +11,6 @@
#include "ListManager.h"
#include "prototypes.h"
#include "space.h"
#include "uncrustify.h"
#include "uncrustify_types.h"
#include <cstdlib>
#include <cstring>
typedef ListManager<chunk_t> ChunkList_t;
@ -256,7 +250,8 @@ bool are_chunks_in_same_line(chunk_t *start, chunk_t *end)
return(false);
}
while (tmp != nullptr && tmp != end)
while ( tmp != nullptr
&& tmp != end)
{
if (chunk_is_token(tmp, CT_NEWLINE))
{
@ -301,7 +296,7 @@ static chunk_t *chunk_search_typelevel(chunk_t *cur, c_token_t type, scope_e sco
{
pc = search_function(pc, scope); // in either direction while
} while ( pc != nullptr // the end of the list was not reached yet
&& (is_expected_type_and_level(pc, type, level) == false));
&& (!is_expected_type_and_level(pc, type, level)));
return(pc); // the latest chunk is the searched one
}
@ -319,7 +314,7 @@ static chunk_t *chunk_search_str(chunk_t *cur, const char *str, size_t len, scop
{
pc = search_function(pc, scope); // in either direction while
} while ( pc != nullptr // the end of the list was not reached yet
&& (is_expected_string_and_level(pc, str, level, len) == false));
&& (!is_expected_string_and_level(pc, str, level, len)));
return(pc); // the latest chunk is the searched one
}
@ -346,7 +341,8 @@ static chunk_t *chunk_search(chunk_t *cur, const check_t check_fct, const scope_
static chunk_t *chunk_ppa_search(chunk_t *cur, const check_t check_fct, const bool cond)
{
if (cur && !cur->flags.test(PCF_IN_PREPROC))
if ( cur != nullptr
&& !cur->flags.test(PCF_IN_PREPROC))
{
// if not in preprocessor, do a regular search
return(chunk_search(cur, check_fct, scope_e::ALL,
@ -354,7 +350,8 @@ static chunk_t *chunk_ppa_search(chunk_t *cur, const check_t check_fct, const bo
}
chunk_t *pc = cur;
while (pc != nullptr && (pc = pc->next) != nullptr)
while ( pc != nullptr
&& (pc = pc->next) != nullptr)
{
if (!pc->flags.test(PCF_IN_PREPROC))
{
@ -394,7 +391,8 @@ chunk_t *chunk_get_next(chunk_t *cur, scope_e scope)
}
chunk_t *pc = g_cl.GetNext(cur);
if (pc == nullptr || scope == scope_e::ALL)
if ( pc == nullptr
|| scope == scope_e::ALL)
{
return(pc);
}
@ -410,7 +408,8 @@ chunk_t *chunk_get_next(chunk_t *cur, scope_e scope)
}
// Not in a preproc, skip any preproc
while (pc != nullptr && pc->flags.test(PCF_IN_PREPROC))
while ( pc != nullptr
&& pc->flags.test(PCF_IN_PREPROC))
{
pc = g_cl.GetNext(pc);
}
@ -426,7 +425,8 @@ chunk_t *chunk_get_prev(chunk_t *cur, scope_e scope)
}
chunk_t *pc = g_cl.GetPrev(cur);
if (pc == nullptr || scope == scope_e::ALL)
if ( pc == nullptr
|| scope == scope_e::ALL)
{
return(pc);
}
@ -442,7 +442,8 @@ chunk_t *chunk_get_prev(chunk_t *cur, scope_e scope)
}
// Not in a preproc, skip any preproc
while (pc != nullptr && pc->flags.test(PCF_IN_PREPROC))
while ( pc != nullptr
&& pc->flags.test(PCF_IN_PREPROC))
{
pc = g_cl.GetPrev(pc);
}
@ -477,15 +478,15 @@ static void chunk_log_msg(chunk_t *chunk, const log_sev_t log, const char *str)
if (chunk_is_token(chunk, CT_NEWLINE))
{
LOG_FMT(log, "<Newline>,");
LOG_FMT(log, "<Newline>,\n");
}
else if (chunk_is_token(chunk, CT_VBRACE_OPEN))
{
LOG_FMT(log, "<VBRACE_OPEN>,");
LOG_FMT(log, "<VBRACE_OPEN>,\n");
}
else if (chunk_is_token(chunk, CT_VBRACE_CLOSE))
{
LOG_FMT(log, "<VBRACE_CLOSE>,");
LOG_FMT(log, "<VBRACE_CLOSE>,\n");
}
else
{
@ -506,20 +507,21 @@ static void chunk_log(chunk_t *pc, const char *text)
chunk_log_msg(pc, log, text);
if (prev != nullptr && next != nullptr)
if ( prev != nullptr
&& next != nullptr)
{
chunk_log_msg(prev, log, " @ between");
chunk_log_msg(next, log, " and");
chunk_log_msg(prev, log, " @ between");
chunk_log_msg(next, log, " and");
}
else if (next != nullptr)
{
chunk_log_msg(next, log, " @ before");
chunk_log_msg(next, log, " @ before");
}
else if (prev != nullptr)
{
chunk_log_msg(prev, log, " @ after");
chunk_log_msg(prev, log, " @ after");
}
LOG_FMT(log, " stage is %s",
LOG_FMT(log, " stage is %s", // Issue #3034
get_unc_stage_name(cpd.unc_stage));
log_func_stack_inline(log);
}
@ -538,10 +540,11 @@ chunk_t *chunk_add_before(const chunk_t *pc_in, chunk_t *ref)
}
void chunk_del_2(chunk_t *pc)
void chunk_del(chunk_t * &pc)
{
g_cl.Pop(pc);
delete pc;
pc = nullptr;
}
@ -582,25 +585,25 @@ chunk_t *chunk_get_prev_nnl(chunk_t *cur, scope_e scope)
}
chunk_t *chunk_get_next_ncnl(chunk_t *cur, scope_e scope)
chunk_t *chunk_get_next_ncnnl(chunk_t *cur, scope_e scope)
{
return(chunk_search(cur, chunk_is_comment_or_newline, scope, direction_e::FORWARD, false));
}
chunk_t *chunk_get_next_ncnlnp(chunk_t *cur, scope_e scope)
chunk_t *chunk_get_next_ncnnlnp(chunk_t *cur, scope_e scope)
{
return(chunk_get_ncnlnp(cur, scope, direction_e::FORWARD));
}
chunk_t *chunk_ppa_get_next_ncnl(chunk_t *cur)
chunk_t *chunk_ppa_get_next_ncnnl(chunk_t *cur)
{
return(chunk_ppa_search(cur, chunk_is_comment_or_newline, false));
}
chunk_t *chunk_get_prev_ncnlnp(chunk_t *cur, scope_e scope)
chunk_t *chunk_get_prev_ncnnlnp(chunk_t *cur, scope_e scope)
{
return(chunk_get_ncnlnp(cur, scope, direction_e::BACKWARD));
}
@ -630,13 +633,13 @@ chunk_t *chunk_get_next_nisq(chunk_t *cur, scope_e scope)
}
chunk_t *chunk_get_prev_ncnl(chunk_t *cur, scope_e scope)
chunk_t *chunk_get_prev_ncnnl(chunk_t *cur, scope_e scope)
{
return(chunk_search(cur, chunk_is_comment_or_newline, scope, direction_e::BACKWARD, false));
}
chunk_t *chunk_get_prev_ncnlni(chunk_t *cur, scope_e scope)
chunk_t *chunk_get_prev_ncnnlni(chunk_t *cur, scope_e scope)
{
return(chunk_search(cur, chunk_is_comment_or_newline_or_ignored, scope, direction_e::BACKWARD, false));
}
@ -697,7 +700,8 @@ chunk_t *chunk_first_on_line(chunk_t *pc)
{
chunk_t *first = pc;
while ((pc = chunk_get_prev(pc)) != nullptr && !chunk_is_newline(pc))
while ( (pc = chunk_get_prev(pc)) != nullptr
&& !chunk_is_newline(pc))
{
first = pc;
}
@ -746,7 +750,8 @@ void chunk_swap_lines(chunk_t *pc1, chunk_t *pc2)
chunk_t *ref2 = chunk_get_prev(pc2);
// Move the line started at pc2 before pc1
while (pc2 != nullptr && !chunk_is_newline(pc2))
while ( pc2 != nullptr
&& !chunk_is_newline(pc2))
{
chunk_t *tmp = chunk_get_next(pc2);
g_cl.Pop(pc2);
@ -760,7 +765,8 @@ void chunk_swap_lines(chunk_t *pc1, chunk_t *pc2)
*/
// Now move the line started at pc1 after ref2
while (pc1 != nullptr && !chunk_is_newline(pc1))
while ( pc1 != nullptr
&& !chunk_is_newline(pc1))
{
chunk_t *tmp = chunk_get_next(pc1);
g_cl.Pop(pc1);
@ -786,7 +792,8 @@ void chunk_swap_lines(chunk_t *pc1, chunk_t *pc2)
* pc1 and pc2 should be the newlines for their lines.
* swap the chunks and the nl_count so that the spacing remains the same.
*/
if (pc1 != nullptr && pc2 != nullptr)
if ( pc1 != nullptr
&& pc2 != nullptr)
{
size_t nl_count = pc1->nl_count;
@ -820,15 +827,15 @@ void chunk_flags_set_real(chunk_t *pc, pcf_flags_t clr_bits, pcf_flags_t set_bit
if (pc->flags != nflags)
{
LOG_FMT(LSETFLG,
"%s(%d): %016llx^%016llx=%016llx "
"orig_line is %zu, orig_col is %zu, text() '%s', type is %s, ",
"%s(%d): %016llx^%016llx=%016llx\n"
" orig_line is %zu, orig_col is %zu, text() '%s', type is %s,",
__func__, __LINE__,
static_cast<pcf_flags_t::int_t>(pc->flags),
static_cast<pcf_flags_t::int_t>(pc->flags ^ nflags),
static_cast<pcf_flags_t::int_t>(nflags),
pc->orig_line, pc->orig_col, pc->text(),
get_token_name(pc->type));
LOG_FMT(LSETFLG, "parent_type is %s",
LOG_FMT(LSETFLG, " parent_type is %s,\n ",
get_token_name(get_chunk_parent_type(pc)));
log_func_stack_inline(LSETFLG);
pc->flags = nflags;
@ -882,7 +889,8 @@ void set_chunk_parent_real(chunk_t *pc, c_token_t token, const char *func, int l
}
else
{
LOG_FMT(LSETPAR, "'%s'\n", pc->text());
char copy[1000];
LOG_FMT(LSETPAR, "'%s'\n", pc->elided_text(copy));
}
LOG_FMT(LSETPAR, " pc->type is %s, pc->parent_type is %s => *type is %s, *parent_type is %s\n",
get_token_name(pc->type), get_token_name(get_chunk_parent_type(pc)),
@ -907,7 +915,7 @@ static chunk_t *chunk_get_ncnlnp(chunk_t *cur, const scope_e scope, const direct
{
chunk_t *pc = cur;
pc = (chunk_is_preproc(pc) == true) ?
pc = chunk_is_preproc(pc) ?
chunk_search(pc, chunk_is_comment_or_newline_in_preproc, scope, dir, false) :
chunk_search(pc, chunk_is_comment_newline_or_preproc, scope, dir, false);
return(pc);
@ -917,6 +925,15 @@ static chunk_t *chunk_get_ncnlnp(chunk_t *cur, const scope_e scope, const direct
static chunk_t *chunk_add(const chunk_t *pc_in, chunk_t *ref, const direction_e pos)
{
#ifdef DEBUG
// test if the pc_in chunk is properly set
if (pc_in->pp_level == 999)
{
fprintf(stderr, "%s(%d): pp_level is not set\n", __func__, __LINE__);
log_func_stack_inline(LSETFLG);
log_flush(true);
exit(EX_SOFTWARE);
}
if (pc_in->orig_line == 0)
{
fprintf(stderr, "%s(%d): no line number\n", __func__, __LINE__);
@ -949,18 +966,19 @@ static chunk_t *chunk_add(const chunk_t *pc_in, chunk_t *ref, const direction_e
chunk_log(pc, "chunk_add(A):");
}
return(pc);
}
} // chunk_add
chunk_t *chunk_get_next_ssq(chunk_t *cur)
{
while (chunk_is_token(cur, CT_TSQUARE) || chunk_is_token(cur, CT_SQUARE_OPEN))
while ( chunk_is_token(cur, CT_TSQUARE)
|| chunk_is_token(cur, CT_SQUARE_OPEN))
{
if (chunk_is_token(cur, CT_SQUARE_OPEN))
{
cur = chunk_skip_to_match(cur);
}
cur = chunk_get_next_ncnl(cur);
cur = chunk_get_next_ncnnl(cur);
}
return(cur);
}
@ -968,13 +986,14 @@ chunk_t *chunk_get_next_ssq(chunk_t *cur)
chunk_t *chunk_get_prev_ssq(chunk_t *cur)
{
while (chunk_is_token(cur, CT_TSQUARE) || chunk_is_token(cur, CT_SQUARE_CLOSE))
while ( chunk_is_token(cur, CT_TSQUARE)
|| chunk_is_token(cur, CT_SQUARE_CLOSE))
{
if (chunk_is_token(cur, CT_SQUARE_CLOSE))
{
cur = chunk_skip_to_match_rev(cur);
}
cur = chunk_get_prev_ncnl(cur);
cur = chunk_get_prev_ncnnl(cur);
}
return(cur);
}
@ -1005,7 +1024,7 @@ static chunk_t *chunk_skip_dc_member(chunk_t *start, scope_e scope, direction_e
return(nullptr);
}
const auto step_fcn = (dir == direction_e::FORWARD)
? chunk_get_next_ncnl : chunk_get_prev_ncnl;
? chunk_get_next_ncnnl : chunk_get_prev_ncnnl;
chunk_t *pc = start;
chunk_t *next = chunk_is_token(pc, CT_DC_MEMBER) ? pc : step_fcn(pc, scope);
@ -1070,3 +1089,71 @@ c_token_t get_type_of_the_parent(chunk_t *pc)
}
return(pc->parent->type);
}
bool chunk_is_attribute_or_declspec(chunk_t *pc)
{
return( language_is_set(LANG_CPP)
&& ( chunk_is_token(pc, CT_ATTRIBUTE)
|| chunk_is_token(pc, CT_DECLSPEC)));
}
bool chunk_is_class_enum_struct_union(chunk_t *pc)
{
return( chunk_is_class_or_struct(pc)
|| chunk_is_enum(pc)
|| chunk_is_token(pc, CT_UNION));
}
bool chunk_is_class_or_struct(chunk_t *pc)
{
return( chunk_is_token(pc, CT_CLASS)
|| chunk_is_token(pc, CT_STRUCT));
}
bool chunk_is_class_struct_union(chunk_t *pc)
{
return( chunk_is_class_or_struct(pc)
|| chunk_is_token(pc, CT_UNION));
}
bool chunk_is_enum(chunk_t *pc)
{
return( chunk_is_token(pc, CT_ENUM)
|| chunk_is_token(pc, CT_ENUM_CLASS));
}
int chunk_compare_position(const chunk_t *A_token, const chunk_t *B_token)
{
if (A_token == nullptr)
{
assert(A_token);
}
if (B_token == nullptr)
{
assert(B_token);
}
if (A_token->orig_line < B_token->orig_line)
{
return(-1);
}
else if (A_token->orig_line == B_token->orig_line)
{
if (A_token->orig_col < B_token->orig_col)
{
return(-1);
}
else if (A_token->orig_col == B_token->orig_col)
{
return(0);
}
}
return(1);
}

@ -87,12 +87,7 @@ chunk_t *chunk_add_before(const chunk_t *pc_in, chunk_t *ref);
*
* @param pc chunk to delete
*/
#define chunk_del(pc) do { \
chunk_del_2((pc)); \
(pc) = nullptr; \
} while (false)
void chunk_del_2(chunk_t *pc);
void chunk_del(chunk_t * &pc);
/**
@ -206,7 +201,7 @@ chunk_t *chunk_get_next_nnl(chunk_t *cur, scope_e scope = scope_e::ALL);
* @param cur chunk to use as start point
* @param scope code region to search in
*/
chunk_t *chunk_get_next_ncnl(chunk_t *cur, scope_e scope = scope_e::ALL);
chunk_t *chunk_get_next_ncnnl(chunk_t *cur, scope_e scope = scope_e::ALL);
/**
@ -215,19 +210,19 @@ chunk_t *chunk_get_next_ncnl(chunk_t *cur, scope_e scope = scope_e::ALL);
* @param cur chunk to use as start point
* @param scope code region to search in
*/
chunk_t *chunk_get_next_ncnlnp(chunk_t *cur, scope_e scope = scope_e::ALL);
chunk_t *chunk_get_next_ncnnlnp(chunk_t *cur, scope_e scope = scope_e::ALL);
/**
* Gets the next non-NEWLINE and non-comment chunk (preprocessor aware).
* Unlike chunk_get_next_ncnl, this will also ignore a line continuation if
* Unlike chunk_get_next_ncnnl, this will also ignore a line continuation if
* the starting chunk is in a preprocessor directive, and may return a newline
* if the search reaches the end of a preprocessor directive.
*
* @param cur chunk to use as start point
* @param scope code region to search in
*/
chunk_t *chunk_ppa_get_next_ncnl(chunk_t *cur);
chunk_t *chunk_ppa_get_next_ncnnl(chunk_t *cur);
/**
@ -294,7 +289,7 @@ chunk_t *chunk_get_prev_nnl(chunk_t *cur, scope_e scope = scope_e::ALL);
* @param cur chunk to use as start point
* @param scope code region to search in
*/
chunk_t *chunk_get_prev_ncnl(chunk_t *cur, scope_e scope = scope_e::ALL);
chunk_t *chunk_get_prev_ncnnl(chunk_t *cur, scope_e scope = scope_e::ALL);
/**
@ -303,7 +298,7 @@ chunk_t *chunk_get_prev_ncnl(chunk_t *cur, scope_e scope = scope_e::ALL);
* @param cur chunk to use as start point
* @param scope code region to search in
*/
chunk_t *chunk_get_prev_ncnlni(chunk_t *cur, scope_e scope = scope_e::ALL);
chunk_t *chunk_get_prev_ncnnlni(chunk_t *cur, scope_e scope = scope_e::ALL);
/**
@ -312,7 +307,7 @@ chunk_t *chunk_get_prev_ncnlni(chunk_t *cur, scope_e scope = scope_e::ALL);
* @param cur chunk to use as start point
* @param scope code region to search in
*/
chunk_t *chunk_get_prev_ncnlnp(chunk_t *cur, scope_e scope = scope_e::ALL);
chunk_t *chunk_get_prev_ncnnlnp(chunk_t *cur, scope_e scope = scope_e::ALL);
/**
@ -477,7 +472,8 @@ static inline bool is_expected_type_and_level(chunk_t *pc, c_token_t type, int l
{
// we don't care about the level (if it is negative) or it is as expected
// and the type is as expected
return( (level < 0 || pc->level == static_cast<size_t>(level))
return( ( level < 0
|| pc->level == static_cast<size_t>(level))
&& pc->type == type);
}
@ -485,7 +481,8 @@ static inline bool is_expected_type_and_level(chunk_t *pc, c_token_t type, int l
static inline bool is_expected_string_and_level(chunk_t *pc, const char *str, int level, size_t len)
{
// we don't care about the level (if it is negative) or it is as expected
return( (level < 0 || pc->level == static_cast<size_t>(level))
return( ( level < 0
|| pc->level == static_cast<size_t>(level))
&& pc->len() == len // and the length is as expected
&& memcmp(str, pc->text(), len) == 0); // and the strings are equal
}
@ -493,13 +490,15 @@ static inline bool is_expected_string_and_level(chunk_t *pc, const char *str, in
static inline bool chunk_is_token(const chunk_t *pc, c_token_t c_token)
{
return(pc != nullptr && pc->type == c_token);
return( pc != nullptr
&& pc->type == c_token);
}
static inline bool chunk_is_not_token(const chunk_t *pc, c_token_t c_token)
{
return(pc != nullptr && pc->type != c_token);
return( pc != nullptr
&& pc->type != c_token);
}
@ -567,21 +566,59 @@ static inline bool chunk_is_comment(chunk_t *pc)
}
/**
* Returns true if the chunk under test is an inheritance access specifier
*/
static inline bool chunk_is_cpp_inheritance_access_specifier(chunk_t *pc)
{
return( language_is_set(LANG_CPP)
&& ( chunk_is_token(pc, CT_ACCESS)
|| chunk_is_token(pc, CT_QUALIFIER))
&& ( std::strncmp(pc->str.c_str(), "private", 7) == 0
|| std::strncmp(pc->str.c_str(), "protected", 9) == 0
|| std::strncmp(pc->str.c_str(), "public", 6) == 0));
} // chunk_is_cpp_inheritance_access_specifier
static inline bool chunk_is_colon(chunk_t *pc)
{
return( chunk_is_token(pc, CT_ACCESS_COLON)
|| chunk_is_token(pc, CT_ASM_COLON)
|| chunk_is_token(pc, CT_BIT_COLON)
|| chunk_is_token(pc, CT_CASE_COLON)
|| chunk_is_token(pc, CT_CLASS_COLON)
|| chunk_is_token(pc, CT_COLON)
|| chunk_is_token(pc, CT_COND_COLON)
|| chunk_is_token(pc, CT_CONSTR_COLON)
|| chunk_is_token(pc, CT_CS_SQ_COLON)
|| chunk_is_token(pc, CT_D_ARRAY_COLON)
|| chunk_is_token(pc, CT_FOR_COLON)
|| chunk_is_token(pc, CT_LABEL_COLON)
|| chunk_is_token(pc, CT_OC_COLON)
|| chunk_is_token(pc, CT_OC_DICT_COLON)
|| chunk_is_token(pc, CT_TAG_COLON)
|| chunk_is_token(pc, CT_WHERE_COLON));
}
static inline bool chunk_is_single_line_comment(chunk_t *pc)
{
return(chunk_is_token(pc, CT_COMMENT) || chunk_is_token(pc, CT_COMMENT_CPP));
return( chunk_is_token(pc, CT_COMMENT)
|| chunk_is_token(pc, CT_COMMENT_CPP));
}
static inline bool chunk_is_newline(chunk_t *pc)
{
return(chunk_is_token(pc, CT_NEWLINE) || chunk_is_token(pc, CT_NL_CONT));
return( chunk_is_token(pc, CT_NEWLINE)
|| chunk_is_token(pc, CT_NL_CONT));
}
static inline bool chunk_is_semicolon(chunk_t *pc)
{
return(chunk_is_token(pc, CT_SEMICOLON) || chunk_is_token(pc, CT_VSEMICOLON));
return( chunk_is_token(pc, CT_SEMICOLON)
|| chunk_is_token(pc, CT_VSEMICOLON));
}
@ -594,21 +631,25 @@ static inline bool chunk_is_semicolon(chunk_t *pc)
*/
static inline bool chunk_is_blank(chunk_t *pc)
{
return(pc != nullptr && (pc->len() == 0));
return( pc != nullptr
&& (pc->len() == 0));
}
//! checks if a chunk is valid and either a comment or newline
static inline bool chunk_is_comment_or_newline(chunk_t *pc)
{
return(chunk_is_comment(pc) || chunk_is_newline(pc));
return( chunk_is_comment(pc)
|| chunk_is_newline(pc));
}
//! checks if a chunk is valid and either a comment or newline or ignored
static inline bool chunk_is_comment_or_newline_or_ignored(chunk_t *pc)
{
return(chunk_is_comment(pc) || chunk_is_newline(pc) || chunk_is_token(pc, CT_IGNORED));
return( chunk_is_comment(pc)
|| chunk_is_newline(pc)
|| chunk_is_token(pc, CT_IGNORED));
}
@ -622,7 +663,8 @@ static inline bool chunk_is_balanced_square(chunk_t *pc)
static inline bool chunk_is_preproc(chunk_t *pc)
{
return(pc != nullptr && pc->flags.test(PCF_IN_PREPROC));
return( pc != nullptr
&& pc->flags.test(PCF_IN_PREPROC));
}
@ -630,7 +672,8 @@ static inline bool chunk_is_comment_or_newline_in_preproc(chunk_t *pc)
{
return( pc != nullptr
&& chunk_is_preproc(pc)
&& (chunk_is_comment(pc) || chunk_is_newline(pc)));
&& ( chunk_is_comment(pc)
|| chunk_is_newline(pc)));
}
@ -644,7 +687,8 @@ static inline bool chunk_is_comment_newline_or_preproc(chunk_t *pc)
static inline bool chunk_is_comment_newline_or_blank(chunk_t *pc)
{
return(chunk_is_comment_or_newline(pc) || chunk_is_blank(pc));
return( chunk_is_comment_or_newline(pc)
|| chunk_is_blank(pc));
}
@ -721,7 +765,10 @@ static inline bool chunk_is_star(chunk_t *pc)
static inline bool chunk_is_nullable(chunk_t *pc)
{
return(language_is_set(LANG_CS) && (pc != nullptr) && (pc->len() == 1) && (pc->str[0] == '?'));
return( language_is_set(LANG_CS)
&& (pc != nullptr)
&& (pc->len() == 1)
&& (pc->str[0] == '?'));
}
@ -735,7 +782,8 @@ static inline bool chunk_is_addr(chunk_t *pc)
chunk_t *prev = chunk_get_prev(pc);
if ( pc->flags.test(PCF_IN_TEMPLATE)
&& (chunk_is_token(prev, CT_COMMA) || chunk_is_token(prev, CT_ANGLE_OPEN)))
&& ( chunk_is_token(prev, CT_COMMA)
|| chunk_is_token(prev, CT_ANGLE_OPEN)))
{
return(false);
}
@ -764,25 +812,35 @@ static inline bool chunk_is_ptr_operator(chunk_t *pc)
}
static inline bool chunk_is_pointer_or_reference(chunk_t *pc)
{
return( chunk_is_ptr_operator(pc)
|| chunk_is_token(pc, CT_BYREF));
}
//! Check to see if there is a newline between the two chunks
bool chunk_is_newline_between(chunk_t *start, chunk_t *end);
static inline bool chunk_is_closing_brace(chunk_t *pc)
{
return(chunk_is_token(pc, CT_BRACE_CLOSE) || chunk_is_token(pc, CT_VBRACE_CLOSE));
return( chunk_is_token(pc, CT_BRACE_CLOSE)
|| chunk_is_token(pc, CT_VBRACE_CLOSE));
}
static inline bool chunk_is_opening_brace(chunk_t *pc)
{
return(chunk_is_token(pc, CT_BRACE_OPEN) || chunk_is_token(pc, CT_VBRACE_OPEN));
return( chunk_is_token(pc, CT_BRACE_OPEN)
|| chunk_is_token(pc, CT_VBRACE_OPEN));
}
static inline bool chunk_is_vbrace(chunk_t *pc)
{
return(chunk_is_token(pc, CT_VBRACE_CLOSE) || chunk_is_token(pc, CT_VBRACE_OPEN));
return( chunk_is_token(pc, CT_VBRACE_CLOSE)
|| chunk_is_token(pc, CT_VBRACE_OPEN));
}
@ -791,7 +849,8 @@ static inline bool chunk_is_paren_open(chunk_t *pc)
return( chunk_is_token(pc, CT_PAREN_OPEN)
|| chunk_is_token(pc, CT_SPAREN_OPEN)
|| chunk_is_token(pc, CT_TPAREN_OPEN)
|| chunk_is_token(pc, CT_FPAREN_OPEN));
|| chunk_is_token(pc, CT_FPAREN_OPEN)
|| chunk_is_token(pc, CT_LPAREN_OPEN));
}
@ -844,7 +903,7 @@ static inline bool chunk_is_forin(chunk_t *pc)
if ( language_is_set(LANG_OC)
&& chunk_is_token(pc, CT_SPAREN_OPEN))
{
chunk_t *prev = chunk_get_prev_ncnl(pc);
chunk_t *prev = chunk_get_prev_ncnnl(pc);
if (chunk_is_token(prev, CT_FOR))
{
@ -854,7 +913,7 @@ static inline bool chunk_is_forin(chunk_t *pc)
&& next->type != CT_SPAREN_CLOSE
&& next->type != CT_IN)
{
next = chunk_get_next_ncnl(next);
next = chunk_get_next_ncnnl(next);
}
if (chunk_is_token(next, CT_IN))
@ -867,18 +926,48 @@ static inline bool chunk_is_forin(chunk_t *pc)
}
/**
* Returns true if pc is an CT_ATTRIBUTE or CT_DECLSPEC
*/
bool chunk_is_attribute_or_declspec(chunk_t *pc);
/**
* Returns true if pc is one of CT_CLASS, CT_ENUM, CT_ENUM_CLASS, CT_STRUCT or CT_UNION
*/
bool chunk_is_class_enum_struct_union(chunk_t *pc);
/**
* Returns true if pc is a CT_CLASS or CT_STRUCT
*/
bool chunk_is_class_or_struct(chunk_t *pc);
/**
* Returns true if pc is one of CT_CLASS, CT_STRUCT or CT_UNION
*/
bool chunk_is_class_struct_union(chunk_t *pc);
/**
* Returns true if pc is a CT_ENUM or CT_ENUM_CLASS
*/
bool chunk_is_enum(chunk_t *pc);
void set_chunk_type_real(chunk_t *pc, c_token_t tt, const char *func, int line);
void set_chunk_parent_real(chunk_t *pc, c_token_t tt, const char *func, int line);
#define set_chunk_type(pc, tt) do { \
set_chunk_type_real((pc), (tt), __func__, __LINE__); \
#define set_chunk_type(pc, tt) do { \
set_chunk_type_real((pc), (tt), __unqualified_func__, __LINE__); \
} while (false)
#define set_chunk_parent(pc, tt) do { \
set_chunk_parent_real((pc), (tt), __func__, __LINE__); \
#define set_chunk_parent(pc, tt) do { \
set_chunk_parent_real((pc), (tt), __unqualified_func__, __LINE__); \
} while (false)
@ -907,4 +996,19 @@ void chunk_set_parent(chunk_t *pc, chunk_t *parent);
c_token_t get_type_of_the_parent(chunk_t *pc);
/**
* @brief compare the positions of two tokens in a file.
*
* The function compares the two positions of two tokens.
*
* @param A_token
* @param B_token
*
* @return returns an integer less than, equal to, or greater than zero
* if A_token is found, respectively, to be less/before than, to
* match, or be greater/after than B_token.
*/
int chunk_compare_position(const chunk_t *A_token, const chunk_t *B_token);
#endif /* CHUNK_LIST_H_INCLUDED */

@ -22,22 +22,6 @@
void fix_casts(chunk_t *start);
/**
* We are on an enum/struct/union tag that is NOT inside a typedef.
* If there is a {...} and words before the ';', then they are variables.
*
* tag { ... } [*] word [, [*]word] ;
* tag [word/type] { ... } [*] word [, [*]word] ;
* enum [word/type [: int_type]] { ... } [*] word [, [*]word] ;
* tag [word/type] [word]; -- this gets caught later.
* fcn(tag [word/type] [word])
* a = (tag [word/type] [*])&b;
*
* REVISIT: should this be consolidated with the typedef code?
*/
void fix_enum_struct_union(chunk_t *pc);
/**
* Simply change any STAR to PTR_TYPE and WORD to TYPE
*
@ -81,14 +65,19 @@ void fix_typedef(chunk_t *start);
chunk_t *fix_variable_definition(chunk_t *start);
/**
* We're on a 'class' or 'struct'.
* Scan for CT_FUNCTION with a string that matches pclass->str
*/
void mark_class_ctor(chunk_t *start);
void mark_cpp_constructor(chunk_t *pc);
void mark_cpp_constructor(chunk_t *pc);
/**
* Mark all chunks belonging to a C++ lambda expression
*
* @param square_open points to a chunk of type CT_SQUARE_OPEN, and the parent type is
* assumed to have already been assigned the value CT_CPP_LAMBDA;
* under this assumption, the function marks all chunks as PCF_IN_LAMBDA
* until the corresponding closing CT_BRACE_CLOSE (with parent type
* CT_CPP_LAMBDA) is encountered
*/
void mark_cpp_lambda(chunk_t *square_open);
/**

@ -105,16 +105,19 @@ void combine_labels(void)
hit_class = true;
}
if (chunk_is_semicolon(next) || chunk_is_token(next, CT_BRACE_OPEN))
if ( chunk_is_semicolon(next)
|| chunk_is_token(next, CT_BRACE_OPEN))
{
hit_class = false;
}
if (chunk_is_token(prev, CT_SQUARE_OPEN) && get_chunk_parent_type(prev) == CT_OC_MSG)
if ( chunk_is_token(prev, CT_SQUARE_OPEN)
&& get_chunk_parent_type(prev) == CT_OC_MSG)
{
cs.Push_Back(prev);
}
else if (chunk_is_token(next, CT_SQUARE_CLOSE) && get_chunk_parent_type(next) == CT_OC_MSG)
else if ( chunk_is_token(next, CT_SQUARE_CLOSE)
&& get_chunk_parent_type(next) == CT_OC_MSG)
{
// pop until we hit '['
while (!cs.Empty())
@ -129,7 +132,8 @@ void combine_labels(void)
}
}
if (chunk_is_token(next, CT_QUESTION) && !next->flags.test(PCF_IN_TEMPLATE))
if ( chunk_is_token(next, CT_QUESTION)
&& !next->flags.test(PCF_IN_TEMPLATE))
{
cs.Push_Back(next);
}
@ -164,7 +168,7 @@ void combine_labels(void)
{
hit_case = false;
set_chunk_type(next, CT_CASE_COLON);
chunk_t *tmp = chunk_get_next_ncnlnp(next); // Issue #2150
chunk_t *tmp = chunk_get_next_ncnnlnp(next); // Issue #2150
if (chunk_is_token(tmp, CT_BRACE_OPEN))
{
@ -177,9 +181,10 @@ void combine_labels(void)
}
}
if (chunk_is_token(cur, CT_NUMBER) && chunk_is_token(prev, CT_ELLIPSIS))
if ( chunk_is_token(cur, CT_NUMBER)
&& chunk_is_token(prev, CT_ELLIPSIS))
{
chunk_t *pre_elipsis = chunk_get_prev_ncnlnp(prev);
chunk_t *pre_elipsis = chunk_get_prev_ncnnlnp(prev);
if (chunk_is_token(pre_elipsis, CT_NUMBER))
{
@ -208,7 +213,8 @@ void combine_labels(void)
if (language_is_set(LANG_PAWN))
{
if (chunk_is_token(cur, CT_WORD) || chunk_is_token(cur, CT_BRACE_CLOSE))
if ( chunk_is_token(cur, CT_WORD)
|| chunk_is_token(cur, CT_BRACE_CLOSE))
{
c_token_t new_type = CT_TAG;
@ -219,7 +225,8 @@ void combine_labels(void)
return;
}
if (chunk_is_newline(prev) && chunk_is_newline(tmp))
if ( chunk_is_newline(prev)
&& chunk_is_newline(tmp))
{
new_type = CT_LABEL;
set_chunk_type(next, CT_LABEL_COLON);
@ -288,7 +295,7 @@ void combine_labels(void)
if (chunk_is_token(labelPrev, CT_NEWLINE))
{
labelPrev = chunk_get_prev_ncnlni(prev); // Issue #2279
labelPrev = chunk_get_prev_ncnnlni(prev); // Issue #2279
}
if ( labelPrev != nullptr
@ -370,7 +377,8 @@ void combine_labels(void)
{
// ignore it - bit field, align or public/private, etc
}
else if (chunk_is_token(cur, CT_ANGLE_CLOSE) || hit_class)
else if ( chunk_is_token(cur, CT_ANGLE_CLOSE)
|| hit_class)
{
// ignore it - template thingy
}
@ -388,7 +396,7 @@ void combine_labels(void)
}
else
{
chunk_t *tmp = chunk_get_next_ncnl(next);
chunk_t *tmp = chunk_get_next_ncnnl(next);
//tmp = chunk_get_next_local(next);
if (tmp != nullptr)
@ -398,7 +406,8 @@ void combine_labels(void)
__func__, __LINE__, tmp->text(), tmp->orig_line, tmp->orig_col,
get_token_name(tmp->type));
if (chunk_is_token(tmp, CT_BASE) || chunk_is_token(tmp, CT_THIS))
if ( chunk_is_token(tmp, CT_BASE)
|| chunk_is_token(tmp, CT_THIS))
{
// ignore it, as it is a C# base thingy
}

@ -0,0 +1,324 @@
/**
* @file combine_skip.cpp
*
* @author Guy Maurel
* @license GPL v2+
* extract from combine.cpp
*/
#include "combine_skip.h"
#include "combine_tools.h"
chunk_t *skip_align(chunk_t *start)
{
chunk_t *pc = start;
if (chunk_is_token(pc, CT_ALIGN))
{
pc = chunk_get_next_ncnnl(pc);
if (chunk_is_token(pc, CT_PAREN_OPEN))
{
pc = chunk_get_next_type(pc, CT_PAREN_CLOSE, pc->level);
pc = chunk_get_next_ncnnl(pc);
if (chunk_is_token(pc, CT_COLON))
{
pc = chunk_get_next_ncnnl(pc);
}
}
}
return(pc);
}
chunk_t *skip_expression(chunk_t *pc)
{
return(chunk_get_next_ncnnl(skip_to_expression_end(pc)));
}
chunk_t *skip_expression_rev(chunk_t *pc)
{
return(chunk_get_prev_ncnnlni(skip_to_expression_start(pc)));
}
static chunk_t *skip_to_expression_edge(chunk_t *pc, chunk_t *(*chunk_get_next)(chunk_t *cur, scope_e scope))
{
chunk_t *prev = pc;
if ( prev != nullptr
&& chunk_get_next != nullptr)
{
std::size_t level = prev->level;
chunk_t *next = prev;
std::size_t template_nest = get_cpp_template_angle_nest_level(prev);
while ( next != nullptr
&& next->level >= level)
{
/**
* if we encounter a comma or semicolon at the level of the starting chunk,
* return the current chunk
*/
if ( next->level == level
&& ( chunk_is_token(next, CT_COMMA)
|| chunk_is_semicolon(next)))
{
break;
}
/**
* check the template nest level; if the current chunk's nest level
* is less than that of the starting chunk, return the current chunk
*/
auto next_template_nest = get_cpp_template_angle_nest_level(next);
if (template_nest > next_template_nest)
{
break;
}
prev = next;
next = (*chunk_get_next)(next, scope_e::PREPROC);
}
}
return(prev);
}
chunk_t *skip_to_expression_end(chunk_t *pc)
{
return(skip_to_expression_edge(pc, chunk_get_next_ncnnl));
}
chunk_t *skip_to_expression_start(chunk_t *pc)
{
return(skip_to_expression_edge(pc, chunk_get_prev_ncnnlni));
}
chunk_t *skip_to_next_statement(chunk_t *pc)
{
while ( pc != nullptr
&& !chunk_is_semicolon(pc)
&& chunk_is_not_token(pc, CT_BRACE_OPEN)
&& chunk_is_not_token(pc, CT_BRACE_CLOSE))
{
pc = chunk_get_next_ncnnl(pc);
}
return(pc);
}
chunk_t *skip_parent_types(chunk_t *colon)
{
auto pc = chunk_get_next_ncnnlnp(colon);
while (pc)
{
// Skip access specifier
if (chunk_is_token(pc, CT_ACCESS))
{
pc = chunk_get_next_ncnnlnp(pc);
continue;
}
// Check for a type name
if (!( chunk_is_token(pc, CT_WORD)
|| chunk_is_token(pc, CT_TYPE)))
{
LOG_FMT(LPCU,
"%s is confused; expected a word at %zu:%zu "
"following type list at %zu:%zu\n", __func__,
colon->orig_line, colon->orig_col,
pc->orig_line, pc->orig_col);
return(colon);
}
// Get next token
auto next = skip_template_next(chunk_get_next_ncnnlnp(pc));
if ( chunk_is_token(next, CT_DC_MEMBER)
|| chunk_is_token(next, CT_COMMA))
{
pc = chunk_get_next_ncnnlnp(next);
}
else if (next)
{
LOG_FMT(LPCU, "%s -> %zu:%zu ('%s')\n", __func__,
next->orig_line, next->orig_col, next->text());
return(next);
}
else
{
break;
}
}
LOG_FMT(LPCU, "%s: did not find end of type list (start was %zu:%zu)\n",
__func__, colon->orig_line, colon->orig_col);
return(colon);
} // skip_parent_types
chunk_t *skip_template_prev(chunk_t *ang_close)
{
if (chunk_is_token(ang_close, CT_ANGLE_CLOSE))
{
chunk_t *pc = chunk_get_prev_type(ang_close, CT_ANGLE_OPEN, ang_close->level);
return(chunk_get_prev_ncnnlni(pc)); // Issue #2279
}
return(ang_close);
}
chunk_t *skip_tsquare_next(chunk_t *ary_def)
{
if ( chunk_is_token(ary_def, CT_SQUARE_OPEN)
|| chunk_is_token(ary_def, CT_TSQUARE))
{
return(chunk_get_next_nisq(ary_def));
}
return(ary_def);
}
chunk_t *skip_attribute(chunk_t *attr)
{
chunk_t *pc = attr;
while (chunk_is_token(pc, CT_ATTRIBUTE))
{
pc = chunk_get_next_ncnnl(pc);
if (chunk_is_token(pc, CT_FPAREN_OPEN))
{
pc = chunk_get_next_type(pc, CT_FPAREN_CLOSE, pc->level);
}
}
return(pc);
}
chunk_t *skip_attribute_next(chunk_t *attr)
{
chunk_t *next = skip_attribute(attr);
if ( next != attr
&& chunk_is_token(next, CT_FPAREN_CLOSE))
{
attr = chunk_get_next_ncnnl(next);
}
return(attr);
}
chunk_t *skip_attribute_prev(chunk_t *fp_close)
{
chunk_t *pc = fp_close;
while (true)
{
if ( chunk_is_token(pc, CT_FPAREN_CLOSE)
&& get_chunk_parent_type(pc) == CT_ATTRIBUTE)
{
pc = chunk_get_prev_type(pc, CT_ATTRIBUTE, pc->level);
}
else if (chunk_is_not_token(pc, CT_ATTRIBUTE))
{
break;
}
pc = chunk_get_prev_ncnnlni(pc); // Issue #2279
}
return(pc);
}
chunk_t *skip_declspec(chunk_t *pc)
{
if (chunk_is_token(pc, CT_DECLSPEC))
{
pc = chunk_get_next_ncnnl(pc);
if (chunk_is_token(pc, CT_PAREN_OPEN))
{
pc = chunk_skip_to_match(pc);
}
}
return(pc);
}
chunk_t *skip_declspec_next(chunk_t *pc)
{
chunk_t *next = skip_declspec(pc);
if ( next != pc
&& chunk_is_token(next, CT_PAREN_CLOSE))
{
pc = chunk_get_next_ncnnl(next);
}
return(pc);
}
chunk_t *skip_declspec_prev(chunk_t *pc)
{
if ( chunk_is_token(pc, CT_PAREN_CLOSE)
&& get_chunk_parent_type(pc) == CT_DECLSPEC)
{
pc = chunk_skip_to_match_rev(pc);
pc = chunk_get_prev_ncnnlni(pc);
if (chunk_is_token(pc, CT_DECLSPEC))
{
pc = chunk_get_prev_ncnnlni(pc);
}
}
return(pc);
}
chunk_t *skip_matching_brace_bracket_paren_next(chunk_t *pc)
{
if ( chunk_is_token(pc, CT_BRACE_OPEN)
|| chunk_is_token(pc, CT_PAREN_OPEN)
|| chunk_is_token(pc, CT_SQUARE_OPEN))
{
pc = chunk_skip_to_match(pc);
if (pc != nullptr)
{
/**
* a matching brace, square bracket, or paren was found;
* retrieve the subsequent chunk
*/
pc = chunk_get_next_ncnnl(pc);
}
}
return(pc);
}
chunk_t *skip_to_chunk_before_matching_brace_bracket_paren_rev(chunk_t *pc)
{
if ( chunk_is_token(pc, CT_BRACE_CLOSE)
|| chunk_is_token(pc, CT_PAREN_CLOSE)
|| chunk_is_token(pc, CT_SQUARE_CLOSE))
{
pc = chunk_skip_to_match_rev(pc);
if (pc != nullptr)
{
/**
* a matching brace, square bracket, or paren was found;
* retrieve the preceding chunk
*/
pc = chunk_get_prev_ncnnlni(pc);
}
}
return(pc);
}

@ -0,0 +1,169 @@
/**
* @file combine_skip.h
*
* @author Guy Maurel
* @license GPL v2+
* extract from combine.cpp
*/
#ifndef COMBINE_SKIP_H_INCLUDED
#define COMBINE_SKIP_H_INCLUDED
#include "chunk_list.h"
/**
* Skips the D 'align()' statement and the colon, if present.
* align(2) int foo; -- returns 'int'
* align(4): -- returns 'int'
* int bar;
*/
chunk_t *skip_align(chunk_t *start);
/**
* Skips chunks in the forward direction and attempts to find the
* chunk associated with the end of the current expression; returns
* the first chunk to satisfy one of the following:
* 1) Chunk is a comma or semicolon at the level of the starting chunk
* 2) Preceding chunk is at higher template nest level relative to the
* current chunk under test
*/
chunk_t *skip_expression(chunk_t *pc);
/**
* Skips chunks in the reverse direction and attempts to find the
* chunk associated with the start of the current expression; returns
* the first chunk to satisfy one of the following:
* 1) Chunk is a comma or semicolon at the level of the starting chunk
* 2) Preceding chunk is at lower template nest level relative to the
* current chunk under test
*/
chunk_t *skip_expression_rev(chunk_t *pc);
/**
* Skips chunks in the forward direction and attempts to find the
* chunk associated with the end of the current expression; specifically,
* the function returns that which immediately precedes a chunk
* satisfying one of the following:
* 1) Next chunk is a comma or semicolon at the level of the starting chunk
* 2) Preceding chunk is at a higher template nest level relative to the
* subsequent chunk
*/
chunk_t *skip_to_expression_end(chunk_t *pc);
/**
* Skips chunks in the reverse direction and attempts to find the chunk
* associated with the start of the current expression; specifically,
* the function returns that which immediately follows a chunk
* satisfying one of the following:
* 1) Prior chunk is a comma or semicolon at the level of the starting chunk
* 2) Preceding chunk is at a lower template nest level relative to the
* subsequent chunk
*/
chunk_t *skip_to_expression_start(chunk_t *pc);
/**
* Skips the list of class/struct parent types.
*/
chunk_t *skip_parent_types(chunk_t *colon);
/**
* Skips over the rest of the template if ang_open is indeed a CT_ANGLE_OPEN.
* Points to the chunk after the CT_ANGLE_CLOSE.
* If the chunk isn't an CT_ANGLE_OPEN, then it is returned.
*/
chunk_t *skip_template_next(chunk_t *ang_open);
/**
* Skips over the rest of the template if ang_close is indeed a CT_ANGLE_CLOSE.
* Points to the chunk before the CT_ANGLE_OPEN
* If the chunk isn't an CT_ANGLE_CLOSE, then it is returned.
*/
chunk_t *skip_template_prev(chunk_t *ang_close);
//! Skips to the start of the next statement.
chunk_t *skip_to_next_statement(chunk_t *pc);
/**
* Skips the rest of the array definitions if ary_def is indeed a
* CT_TSQUARE or CT_SQUARE_OPEN
*/
chunk_t *skip_tsquare_next(chunk_t *ary_def);
/**
* If pc is CT_ATTRIBUTE, then skip it and everything preceding the closing
* paren; return the chunk marked CT_FPAREN_CLOSE
* If the chunk isn't a CT_ATTRIBUTE, then it is returned.
*/
chunk_t *skip_attribute(chunk_t *attr);
/**
* If attr is CT_ATTRIBUTE, then skip it and the parens and return the chunk
* after the CT_FPAREN_CLOSE.
* If the chunk isn't an CT_ATTRIBUTE, then it is returned.
*/
chunk_t *skip_attribute_next(chunk_t *attr);
/**
* If fp_close is a CT_FPAREN_CLOSE with a parent of CT_ATTRIBUTE, then skip it
* and the '__attribute__' thingy and return the chunk before CT_ATTRIBUTE.
* Otherwise return fp_close.
*/
chunk_t *skip_attribute_prev(chunk_t *fp_close);
/**
* If pc is CT_DECLSPEC, then skip it and everything preceding the closing
* paren; return the chunk marked CT_FPAREN_CLOSE
* If the chunk isn't a CT_DECLSPEC, then it is returned.
*/
chunk_t *skip_declspec(chunk_t *pc);
/**
* If pc is CT_DECLSPEC, then skip it and the parens and return the chunk
* after the CT_FPAREN_CLOSE.
* If the chunk isn't a CT_DECLSPEC, then it is returned.
*/
chunk_t *skip_declspec_next(chunk_t *pc);
/**
* If pc is a CT_FPAREN_CLOSE with a parent of CT_DECLSPEC, then skip it
* and the '__declspec' keyword and return the chunk before CT_DECLSPEC.
* Otherwise return pc.
*/
chunk_t *skip_declspec_prev(chunk_t *pc);
/**
* If pc is a CT_BRACE_OPEN, CT_PAREN_OPEN or CT_SQUARE_OPEN, then skip
* forward to the next non-comment/non-newline chunk following the matching
* CT_BRACE_CLOSE, CT_PAREN_CLOSE or CT_SQUARE_CLOSE; if pc is none of these
* upon calling this function, then pc is returned.
*/
chunk_t *skip_matching_brace_bracket_paren_next(chunk_t *pc);
/**
* If pc is a CT_BRACE_CLOSE, CT_PAREN_CLOSE or CT_SQUARE_CLOSE, then skip
* in reverse to the first non-comment/non-newline chunk preceding the matching
* CT_BRACE_OPEN, CT_PAREN_OPEN or CT_SQUARE_OPEN; if pc is none of these upon
* calling this function, then pc is returned.
*/
chunk_t *skip_to_chunk_before_matching_brace_bracket_paren_rev(chunk_t *pc);
#endif /* COMBINE_SKIP_H_INCLUDED */

@ -8,7 +8,6 @@
#include "combine_tools.h"
#include "combine_fix_mark.h"
#include "unc_ctype.h"
#include "uncrustify.h"
@ -17,17 +16,23 @@ bool can_be_full_param(chunk_t *start, chunk_t *end)
{
LOG_FUNC_ENTRY();
LOG_FMT(LFPARAM, "%s:", __func__);
LOG_FMT(LFPARAM, "%s(%d): start->text() is '%s', type is %s\n",
__func__, __LINE__, start->text(), get_token_name(start->type));
LOG_FMT(LFPARAM, "%s(%d): end->text() is '%s', type is %s\n",
__func__, __LINE__, end->text(), get_token_name(end->type));
int word_count = 0;
int type_count = 0;
chunk_t *pc;
int word_count = 0;
int type_count = 0;
chunk_t *pc = nullptr;
chunk_t *first_word = nullptr;
bool first_word_set = false;
for (pc = start;
pc != nullptr && pc != end;
pc = chunk_get_next_ncnl(pc, scope_e::PREPROC))
pc = chunk_get_next_ncnnl(pc, scope_e::PREPROC))
{
LOG_FMT(LFPARAM, " [%s]", pc->text());
LOG_FMT(LFPARAM, "%s(%d): pc->text() is '%s', type is %s\n",
__func__, __LINE__, pc->text(), get_token_name(pc->type));
if ( chunk_is_token(pc, CT_QUALIFIER)
|| chunk_is_token(pc, CT_STRUCT)
@ -35,27 +40,37 @@ bool can_be_full_param(chunk_t *start, chunk_t *end)
|| chunk_is_token(pc, CT_UNION)
|| chunk_is_token(pc, CT_TYPENAME))
{
LOG_FMT(LFPARAM, " <== %s! (yes)\n", get_token_name(pc->type));
LOG_FMT(LFPARAM, "%s(%d): <== %s! (yes)\n",
__func__, __LINE__, get_token_name(pc->type));
return(true);
}
if (chunk_is_token(pc, CT_WORD) || chunk_is_token(pc, CT_TYPE))
if ( chunk_is_token(pc, CT_WORD)
|| chunk_is_token(pc, CT_TYPE))
{
++word_count;
if (!first_word_set)
{
first_word = pc;
first_word_set = true;
}
if (chunk_is_token(pc, CT_TYPE))
{
++type_count;
}
}
else if (chunk_is_token(pc, CT_MEMBER) || chunk_is_token(pc, CT_DC_MEMBER))
else if ( chunk_is_token(pc, CT_MEMBER)
|| chunk_is_token(pc, CT_DC_MEMBER))
{
if (word_count > 0)
{
--word_count;
}
}
else if (pc != start && chunk_is_ptr_operator(pc))
else if ( pc != start
&& chunk_is_ptr_operator(pc))
{
// chunk is OK
}
@ -66,15 +81,20 @@ bool can_be_full_param(chunk_t *start, chunk_t *end)
}
else if (chunk_is_token(pc, CT_ANGLE_OPEN))
{
LOG_FMT(LFPARAM, " <== template\n");
LOG_FMT(LFPARAM, "%s(%d): <== template\n",
__func__, __LINE__);
return(true);
}
else if (chunk_is_token(pc, CT_ELLIPSIS))
{
LOG_FMT(LFPARAM, " <== elipses\n");
LOG_FMT(LFPARAM, "%s(%d): <== elipses\n",
__func__, __LINE__);
return(true);
}
else if (word_count == 0 && chunk_is_token(pc, CT_PAREN_OPEN))
else if ( word_count == 0
&& chunk_is_token(pc, CT_PAREN_OPEN))
{
// Check for old-school func proto param '(type)'
chunk_t *tmp1 = chunk_skip_to_match(pc, scope_e::PREPROC);
@ -83,24 +103,26 @@ bool can_be_full_param(chunk_t *start, chunk_t *end)
{
return(false);
}
chunk_t *tmp2 = chunk_get_next_ncnl(tmp1, scope_e::PREPROC);
chunk_t *tmp2 = chunk_get_next_ncnnl(tmp1, scope_e::PREPROC);
if (tmp2 == nullptr)
{
return(false);
}
if (chunk_is_token(tmp2, CT_COMMA) || chunk_is_paren_close(tmp2))
if ( chunk_is_token(tmp2, CT_COMMA)
|| chunk_is_paren_close(tmp2))
{
do
{
pc = chunk_get_next_ncnl(pc, scope_e::PREPROC);
pc = chunk_get_next_ncnnl(pc, scope_e::PREPROC);
if (pc == nullptr)
{
return(false);
}
LOG_FMT(LFPARAM, " [%s]", pc->text());
LOG_FMT(LFPARAM, "%s(%d): pc->text() is '%s', type is %s\n",
__func__, __LINE__, pc->text(), get_token_name(pc->type));
} while (pc != tmp1);
// reset some vars to allow [] after parens
@ -109,28 +131,30 @@ bool can_be_full_param(chunk_t *start, chunk_t *end)
}
else
{
LOG_FMT(LFPARAM, " <== [%s] not fcn type!\n", get_token_name(pc->type));
LOG_FMT(LFPARAM, "%s(%d): <== '%s' not fcn type!\n",
__func__, __LINE__, get_token_name(pc->type));
return(false);
}
}
else if ( (word_count == 1 || (word_count == type_count))
else if ( ( word_count == 1
|| (word_count == type_count))
&& chunk_is_token(pc, CT_PAREN_OPEN))
{
// Check for func proto param 'void (*name)' or 'void (*name)(params)' or 'void (^name)(params)'
// <name> can be optional
chunk_t *tmp1 = chunk_get_next_ncnl(pc, scope_e::PREPROC);
chunk_t *tmp1 = chunk_get_next_ncnnl(pc, scope_e::PREPROC);
if (tmp1 == nullptr)
{
return(false);
}
chunk_t *tmp2 = chunk_get_next_ncnl(tmp1, scope_e::PREPROC);
chunk_t *tmp2 = chunk_get_next_ncnnl(tmp1, scope_e::PREPROC);
if (tmp2 == nullptr)
{
return(false);
}
chunk_t *tmp3 = (chunk_is_str(tmp2, ")", 1)) ? tmp2 : chunk_get_next_ncnl(tmp2, scope_e::PREPROC);
chunk_t *tmp3 = (chunk_is_str(tmp2, ")", 1)) ? tmp2 : chunk_get_next_ncnnl(tmp2, scope_e::PREPROC);
if (tmp3 == nullptr)
{
@ -138,14 +162,18 @@ bool can_be_full_param(chunk_t *start, chunk_t *end)
}
if ( !chunk_is_str(tmp3, ")", 1)
|| !(chunk_is_str(tmp1, "*", 1) || chunk_is_str(tmp1, "^", 1)) // Issue #2656
|| !(tmp2->type == CT_WORD || chunk_is_str(tmp2, ")", 1)))
|| !( chunk_is_str(tmp1, "*", 1)
|| chunk_is_str(tmp1, "^", 1)) // Issue #2656
|| !( tmp2->type == CT_WORD
|| chunk_is_str(tmp2, ")", 1)))
{
LOG_FMT(LFPARAM, " <== [%s] not fcn type!\n", get_token_name(pc->type));
LOG_FMT(LFPARAM, "%s(%d): <== '%s' not fcn type!\n",
__func__, __LINE__, get_token_name(pc->type));
return(false);
}
LOG_FMT(LFPARAM, " <skip fcn type>");
tmp1 = chunk_get_next_ncnl(tmp3, scope_e::PREPROC);
LOG_FMT(LFPARAM, "%s(%d): <skip fcn type>\n",
__func__, __LINE__);
tmp1 = chunk_get_next_ncnnl(tmp3, scope_e::PREPROC);
if (tmp1 == nullptr)
{
@ -157,6 +185,8 @@ bool can_be_full_param(chunk_t *start, chunk_t *end)
tmp3 = chunk_skip_to_match(tmp1, scope_e::PREPROC);
}
pc = tmp3;
LOG_FMT(LFPARAM, "%s(%d): pc->text() is '%s', type is %s\n",
__func__, __LINE__, pc->text(), get_token_name(pc->type));
// reset some vars to allow [] after parens
word_count = 1;
@ -166,15 +196,21 @@ bool can_be_full_param(chunk_t *start, chunk_t *end)
{
// ignore it
}
else if (word_count == 1 && chunk_is_token(pc, CT_SQUARE_OPEN))
else if ( word_count == 1
&& chunk_is_token(pc, CT_SQUARE_OPEN))
{
// skip over any array stuff
pc = chunk_skip_to_match(pc, scope_e::PREPROC);
LOG_FMT(LFPARAM, "%s(%d): pc->text() is '%s', type is %s\n",
__func__, __LINE__, pc->text(), get_token_name(pc->type));
}
else if (word_count == 2 && chunk_is_token(pc, CT_SQUARE_OPEN))
else if ( word_count == 2
&& chunk_is_token(pc, CT_SQUARE_OPEN))
{
// Bug #671: is it such as: bool foo[FOO_MAX]
pc = chunk_skip_to_match(pc, scope_e::PREPROC);
LOG_FMT(LFPARAM, "%s(%d): pc->text() is '%s', type is %s\n",
__func__, __LINE__, pc->text(), get_token_name(pc->type));
}
else if ( word_count == 1
&& language_is_set(LANG_CPP)
@ -184,51 +220,90 @@ bool can_be_full_param(chunk_t *start, chunk_t *end)
}
else
{
LOG_FMT(LFPARAM, " <== [%s] no way! tc=%d wc=%d\n",
get_token_name(pc->type), type_count, word_count);
LOG_FMT(LFPARAM, "%s(%d): <== type is %s, no way!, type count is %d, word count is %d\n",
__func__, __LINE__, get_token_name(pc->type), type_count, word_count);
return(false);
}
LOG_FMT(LFPARAM, "%s(%d): pc->text() is '%s', type is %s\n",
__func__, __LINE__, pc->text(), get_token_name(pc->type));
}
chunk_t *last = chunk_get_prev_ncnlni(pc); // Issue #2279
chunk_t *last = chunk_get_prev_ncnnlni(pc); // Issue #2279
LOG_FMT(LFPARAM, "%s(%d): last->text() is '%s', type is %s\n",
__func__, __LINE__, last->text(), get_token_name(last->type));
if (chunk_is_ptr_operator(last))
{
LOG_FMT(LFPARAM, " <== [%s] sure!\n", get_token_name(pc->type));
LOG_FMT(LFPARAM, "%s(%d): <== type is %s, sure!\n",
__func__, __LINE__, get_token_name(last->type));
return(true);
}
if (word_count < 2 && type_count < 1 && start->brace_level > 0)
if ( word_count < 2
&& type_count < 1
&& start->brace_level > 0)
{
LOG_FMT(LFPARAM, " !MVP!");
LOG_FMT(LFPARAM, "%s(%d): !MVP!\n",
__func__, __LINE__);
// Oh, joy, we are in Most Vexing Parse territory
auto const brace =
chunk_get_prev_type(start, CT_BRACE_OPEN, start->brace_level - 1);
if (brace)
if (brace != nullptr)
{
LOG_FMT(LFPARAM, " (matching %s brace at %zu:%zu)",
get_token_name(get_chunk_parent_type(brace)),
brace->orig_line, brace->orig_col);
LOG_FMT(LFPARAM, "%s(%d): (matching %s brace at orig_line %zu, orig_col is %zu)",
__func__, __LINE__,
get_token_name(get_chunk_parent_type(brace)), brace->orig_line, brace->orig_col);
}
if ( brace
if ( brace != nullptr
&& ( get_chunk_parent_type(brace) == CT_CLASS
|| get_chunk_parent_type(brace) == CT_STRUCT))
{
// A Most Vexing Parse variable declaration cannot occur in the body
// of a struct/class, so we probably have a function prototype
LOG_FMT(LFPARAM, " <== [%s] Likely!\n",
(pc == nullptr ? "nullptr" : get_token_name(pc->type)));
LOG_FMT(LFPARAM, "%s(%d): <== type is %s, Likely!\n",
__func__, __LINE__, (pc == nullptr ? "nullptr" : get_token_name(pc->type)));
return(true);
}
}
LOG_FMT(LFPARAM, "%s(%d): pc->text() is '%s', word_count is %d, type_count is %d\n",
__func__, __LINE__, pc->text(), word_count, type_count);
if (first_word != nullptr)
{
LOG_FMT(LFPARAM, "%s(%d): first_word->text() is '%s'\n",
__func__, __LINE__, first_word->text());
}
bool ret = ( word_count >= 2
|| (word_count == 1 && type_count == 1));
|| ( word_count == 1
&& type_count == 1));
LOG_FMT(LFPARAM, " <== [%s] %s!\n",
(pc == nullptr ? "nullptr" : get_token_name(pc->type)),
ret ? "Yup" : "Unlikely");
LOG_FMT(LFPARAM, "%s(%d): pc->text() is '%s', ",
__func__, __LINE__, pc->text());
LOG_FMT(LFPARAM, "<== type is %s, ",
(pc == nullptr ? "nullptr" : get_token_name(pc->type)));
if (ret)
{
LOG_FMT(LFPARAM, "Yup!\n");
if (!chunk_is_token(first_word, CT_TYPE))
{
set_chunk_type(first_word, CT_TYPE);
}
chunk_t *tmp = chunk_get_prev_ncnnl(first_word);
if (chunk_is_token(tmp, CT_STAR))
{
set_chunk_type(tmp, CT_PTR_TYPE);
}
}
else
{
LOG_FMT(LFPARAM, "Unlikely!\n");
}
return(ret);
} // can_be_full_param
@ -249,7 +324,7 @@ bool chunk_ends_type(chunk_t *start)
return(false);
}
for ( ; pc != nullptr; pc = chunk_get_prev_ncnlni(pc)) // Issue #2279
for ( ; pc != nullptr; pc = chunk_get_prev_ncnnlni(pc)) // Issue #2279
{
LOG_FMT(LFTYPE, "%s(%d): type is %s, text() '%s', orig_line %zu, orig_col %zu\n ",
__func__, __LINE__, get_token_name(pc->type), pc->text(),
@ -339,7 +414,8 @@ void flag_series(chunk_t *start, chunk_t *end, pcf_flags_t set_flags, pcf_flags_
{
LOG_FUNC_ENTRY();
while (start != nullptr && start != end)
while ( start != nullptr
&& start != end)
{
chunk_flags_upd(start, clr_flags, set_flags);
@ -363,7 +439,8 @@ size_t get_cpp_template_angle_nest_level(chunk_t *pc)
LOG_FUNC_ENTRY();
int nestLevel = 0;
while (pc != nullptr && pc->flags.test(PCF_IN_TEMPLATE))
while ( pc != nullptr
&& pc->flags.test(PCF_IN_TEMPLATE))
{
if ( chunk_is_token(pc, CT_ANGLE_CLOSE)
&& get_chunk_parent_type(pc) == CT_TEMPLATE)
@ -375,7 +452,7 @@ size_t get_cpp_template_angle_nest_level(chunk_t *pc)
{
++nestLevel;
}
pc = chunk_get_prev_ncnlni(pc);
pc = chunk_get_prev_ncnnlni(pc);
}
return(nestLevel <= 0 ? 0 : size_t(nestLevel));
}
@ -387,10 +464,11 @@ chunk_t *get_d_template_types(ChunkStack &cs, chunk_t *open_paren)
chunk_t *tmp = open_paren;
bool maybe_type = true;
while ( ((tmp = chunk_get_next_ncnl(tmp)) != nullptr)
while ( ((tmp = chunk_get_next_ncnnl(tmp)) != nullptr)
&& tmp->level > open_paren->level)
{
if (chunk_is_token(tmp, CT_TYPE) || chunk_is_token(tmp, CT_WORD))
if ( chunk_is_token(tmp, CT_TYPE)
|| chunk_is_token(tmp, CT_WORD))
{
if (maybe_type)
{
@ -410,14 +488,16 @@ chunk_t *get_d_template_types(ChunkStack &cs, chunk_t *open_paren)
bool go_on(chunk_t *pc, chunk_t *start)
{
if (pc == nullptr || pc->level != start->level)
if ( pc == nullptr
|| pc->level != start->level)
{
return(false);
}
if (pc->flags.test(PCF_IN_FOR))
{
return((!chunk_is_semicolon(pc)) && (!(chunk_is_token(pc, CT_COLON))));
return( (!chunk_is_semicolon(pc))
&& (!(chunk_is_token(pc, CT_COLON))));
}
return(!chunk_is_semicolon(pc));
} // go_on
@ -481,5 +561,5 @@ chunk_t *set_paren_parent(chunk_t *start, c_token_t parent)
set_chunk_parent(end, parent);
}
LOG_FMT(LFLPAREN, "%s(%d):\n", __func__, __LINE__);
return(chunk_get_next_ncnl(end, scope_e::PREPROC));
return(chunk_get_next_ncnnl(end, scope_e::PREPROC));
} // set_paren_parent

@ -5,18 +5,17 @@
* @author Ben Gardner
* @license GPL v2+
*/
#ifndef WIN32
#include "uncrustify_types.h"
#include <cstdlib>
#include <string>
bool unc_getenv(const char *name, std::string &str)
{
const char *val = getenv(name);
if (val)
if (val != nullptr)
{
str = val;
return(true);

@ -56,7 +56,8 @@ bool unc_homedir(std::string &home)
}
std::string hd, hp;
if (unc_getenv("HOMEDRIVE", hd) && unc_getenv("HOMEPATH", hp))
if ( unc_getenv("HOMEDRIVE", hd)
&& unc_getenv("HOMEPATH", hp))
{
home = hd + hp;
return(true);

@ -9,9 +9,7 @@
#ifndef CS_TOP_IS_QUESTION_H_INCLUDED
#define CS_TOP_IS_QUESTION_H_INCLUDED
//#include "chunk_list.h"
#include "ChunkStack.h"
//#include "uncrustify_types.h"
bool cs_top_is_question(ChunkStack &cs, size_t level);

@ -8,15 +8,8 @@
#include "detect.h"
#include "chunk_list.h"
#include "ChunkStack.h"
#include "prototypes.h"
#include "unc_ctype.h"
#include "uncrustify_types.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace uncrustify;
@ -86,7 +79,8 @@ sp_votes::~sp_votes()
{
m_option = (m_force > m_add) ? IARF_FORCE : IARF_ADD;
}
else if (m_force == 0 && m_add == 0)
else if ( m_force == 0
&& m_add == 0)
{
m_option = IARF_REMOVE;
}
@ -167,7 +161,8 @@ static void detect_space_options(void)
break;
}
if (chunk_is_token(pc, CT_ARITH) || chunk_is_token(pc, CT_SHIFT))
if ( chunk_is_token(pc, CT_ARITH)
|| chunk_is_token(pc, CT_SHIFT))
{
vote_sp_arith.vote(pc, next);
vote_sp_arith.vote(prev, pc);
@ -225,13 +220,16 @@ static void detect_space_options(void)
vote_sp_inside_paren.vote(pc, next);
}
if ( (chunk_is_paren_open(pc) && chunk_is_paren_open(next))
|| (chunk_is_paren_close(pc) && chunk_is_paren_close(next)))
if ( ( chunk_is_paren_open(pc)
&& chunk_is_paren_open(next))
|| ( chunk_is_paren_close(pc)
&& chunk_is_paren_close(next)))
{
vote_sp_paren_paren.vote(pc, next);
}
if (chunk_is_paren_close(pc) && chunk_is_token(next, CT_BRACE_OPEN))
if ( chunk_is_paren_close(pc)
&& chunk_is_token(next, CT_BRACE_OPEN))
{
vote_sp_paren_brace.vote(pc, next);
}
@ -271,7 +269,8 @@ static void detect_space_options(void)
}
if ( pc->type != CT_PTR_TYPE
&& (chunk_is_token(prev, CT_QUALIFIER) || chunk_is_token(prev, CT_TYPE)))
&& ( chunk_is_token(prev, CT_QUALIFIER)
|| chunk_is_token(prev, CT_TYPE)))
{
vote_sp_after_type.vote(prev, pc);
}
@ -298,7 +297,8 @@ static void detect_space_options(void)
{
vote_sp_angle_paren.vote(prev, pc);
}
else if (chunk_is_token(next, CT_WORD) || CharTable::IsKw1(next->str[0]))
else if ( chunk_is_token(next, CT_WORD)
|| CharTable::IsKw1(next->str[0]))
{
vote_sp_angle_word.vote(prev, pc);
}

@ -8,11 +8,9 @@
#include "enum_cleanup.h"
#include "chunk_list.h"
#include "log_rules.h"
#include "logger.h"
#include "uncrustify.h"
#include "uncrustify_types.h"
constexpr static auto LCURRENT = LTOK;
using namespace uncrustify;
@ -37,7 +35,7 @@ void enum_cleanup(void)
{
LOG_FMT(LTOK, "%s(%d): orig_line is %zu, type is %s\n",
__func__, __LINE__, pc->orig_line, get_token_name(pc->type));
chunk_t *prev = chunk_get_prev_ncnlnp(pc);
chunk_t *prev = chunk_get_prev_ncnnlnp(pc);
// test of (prev == nullptr) is not necessary
if (chunk_is_token(prev, CT_COMMA))
@ -68,6 +66,7 @@ void enum_cleanup(void)
comma.orig_line = prev->orig_line;
comma.orig_col = prev->orig_col + 1;
comma.nl_count = 0;
comma.pp_level = 0;
comma.flags = PCF_NONE;
comma.str = ",";
chunk_add_after(&comma, prev);

@ -5,7 +5,9 @@
*/
#include "chunk_list.h"
#include "flag_braced_init_list.h"
#include "uncrustify.h"
@ -47,7 +49,7 @@ bool detect_cpp_braced_init_list(chunk_t *pc, chunk_t *next)
|| get_chunk_parent_type(pc) == CT_BRACED_INIT_LIST)))
{
log_pcf_flags(LFCNR, pc->flags);
auto brace_open = chunk_get_next_ncnl(pc);
auto brace_open = chunk_get_next_ncnnl(pc);
if ( chunk_is_token(brace_open, CT_BRACE_OPEN)
&& ( get_chunk_parent_type(brace_open) == CT_NONE
@ -70,13 +72,13 @@ bool detect_cpp_braced_init_list(chunk_t *pc, chunk_t *next)
void flag_cpp_braced_init_list(chunk_t *pc, chunk_t *next)
{
auto brace_open = chunk_get_next_ncnl(pc);
auto brace_open = chunk_get_next_ncnnl(pc);
auto brace_close = chunk_skip_to_match(next);
set_chunk_parent(brace_open, CT_BRACED_INIT_LIST);
set_chunk_parent(brace_close, CT_BRACED_INIT_LIST);
auto *tmp = chunk_get_next_ncnl(brace_close);
auto *tmp = chunk_get_next_ncnnl(brace_close);
if (tmp != nullptr)
{
@ -98,7 +100,8 @@ void flag_cpp_braced_init_list(chunk_t *pc, chunk_t *next)
// for the case CT_ASSIGN (and others).
// TODO: Move this block to the fix_fcn_call_args function.
if (chunk_is_token(pc, CT_WORD) && pc->flags.test(PCF_IN_FCN_CALL))
if ( chunk_is_token(pc, CT_WORD)
&& pc->flags.test(PCF_IN_FCN_CALL))
{
set_chunk_type(pc, CT_TYPE);
}

@ -5,7 +5,6 @@
*/
#include "chunk_list.h"
#include "flag_decltype.h"
bool flag_cpp_decltype(chunk_t *pc)
@ -14,7 +13,7 @@ bool flag_cpp_decltype(chunk_t *pc)
if (chunk_is_token(pc, CT_DECLTYPE))
{
auto paren_open = chunk_get_next_ncnl(pc);
auto paren_open = chunk_get_next_ncnnl(pc);
if (chunk_is_token(paren_open, CT_PAREN_OPEN))
{

@ -6,6 +6,7 @@
*/
#include "flag_parens.h"
#include "uncrustify.h"
@ -37,7 +38,8 @@ chunk_t *flag_parens(chunk_t *po, pcf_flags_t flags, c_token_t opentype, c_token
if (po != paren_close)
{
if ( flags != PCF_NONE
|| (parent_all && parenttype != CT_NONE))
|| ( parent_all
&& parenttype != CT_NONE))
{
chunk_t *pc;
@ -66,5 +68,5 @@ chunk_t *flag_parens(chunk_t *po, pcf_flags_t flags, c_token_t opentype, c_token
set_chunk_parent(paren_close, parenttype);
}
}
return(chunk_get_next_ncnl(paren_close, scope_e::PREPROC));
return(chunk_get_next_ncnnl(paren_close, scope_e::PREPROC));
} // flag_parens

@ -8,15 +8,8 @@
#include "frame_list.h"
#include "chunk_list.h"
#include "error_types.h"
#include "prototypes.h"
#include "uncrustify.h"
#include "uncrustify_types.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
namespace
{

@ -11,17 +11,8 @@
#include "keywords.h"
#include "args.h"
#include "char_table.h"
#include "language_tools.h"
#include "prototypes.h"
#include "unc_ctype.h"
#include "uncrustify.h"
#include "uncrustify_limits.h"
#include "uncrustify_types.h"
#include <cerrno>
#include <cstdlib>
#include <cstring>
#include <map>
@ -367,7 +358,8 @@ void init_keywords()
{
chunk_tag_t *tag = &keywords[idx];
if ((tag->lang_flags == LANG_ALL) || (tag->lang_flags == LANG_ALLC))
if ( (tag->lang_flags == LANG_ALL)
|| (tag->lang_flags == LANG_ALLC))
{
continue;
}
@ -505,7 +497,8 @@ c_token_t find_keyword_type(const char *word, size_t len)
if (p_ret != nullptr)
{
if (strcmp(p_ret->tag, "__pragma") == 0 || strcmp(p_ret->tag, "_Pragma") == 0)
if ( strcmp(p_ret->tag, "__pragma") == 0
|| strcmp(p_ret->tag, "_Pragma") == 0)
{
cpd.in_preproc = CT_PREPROC;
}
@ -550,7 +543,8 @@ int load_keyword_file(const char *filename)
if (argc > 0)
{
if (argc == 1 && CharTable::IsKw1(*args[0]))
if ( argc == 1
&& CharTable::IsKw1(*args[0]))
{
add_keyword(args[0], CT_TYPE);
}

@ -8,12 +8,7 @@
#include "lang_pawn.h"
#include "chunk_list.h"
#include "ChunkStack.h"
#include "language_tools.h"
#include "prototypes.h"
#include "uncrustify.h"
#include "uncrustify_types.h"
using namespace uncrustify;
@ -63,14 +58,16 @@ chunk_t *pawn_add_vsemi_after(chunk_t *pc)
{
LOG_FUNC_ENTRY();
if (chunk_is_token(pc, CT_VSEMICOLON) || chunk_is_token(pc, CT_SEMICOLON))
if ( chunk_is_token(pc, CT_VSEMICOLON)
|| chunk_is_token(pc, CT_SEMICOLON))
{
return(pc);
}
chunk_t *next = chunk_get_next_nc(pc);
if ( next != nullptr
&& (chunk_is_token(next, CT_VSEMICOLON) || chunk_is_token(next, CT_SEMICOLON)))
&& ( chunk_is_token(next, CT_VSEMICOLON)
|| chunk_is_token(next, CT_SEMICOLON)))
{
return(pc);
}
@ -91,6 +88,8 @@ chunk_t *pawn_add_vsemi_after(chunk_t *pc)
void pawn_scrub_vsemi(void)
{
constexpr static auto LCURRENT = LPVSEMI;
LOG_FUNC_ENTRY();
log_rule_B("mod_pawn_semicolon");
@ -106,7 +105,7 @@ void pawn_scrub_vsemi(void)
{
continue;
}
chunk_t *prev = chunk_get_prev_ncnl(pc);
chunk_t *prev = chunk_get_prev_ncnnl(pc);
if (chunk_is_token(prev, CT_BRACE_CLOSE))
{
@ -208,7 +207,8 @@ static chunk_t *pawn_process_line(chunk_t *start)
//LOG_FMT(LSYS, "%s: %d - %s\n", __func__,
// start->orig_line, start->text());
if (chunk_is_token(start, CT_NEW) || chunk_is_str(start, "const", 5))
if ( chunk_is_token(start, CT_NEW)
|| chunk_is_str(start, "const", 5))
{
return(pawn_process_variable(start));
}
@ -272,7 +272,8 @@ static chunk_t *pawn_process_variable(chunk_t *start)
&& prev != nullptr // Issue 2586
&& !pawn_continued(prev, start->level))
{
if (prev->type != CT_VSEMICOLON && prev->type != CT_SEMICOLON)
if ( prev->type != CT_VSEMICOLON
&& prev->type != CT_SEMICOLON)
{
pawn_add_vsemi_after(prev);
}
@ -347,7 +348,8 @@ static chunk_t *pawn_mark_function0(chunk_t *start, chunk_t *fcn)
}
else
{
if (chunk_is_token(start, CT_FORWARD) || chunk_is_token(start, CT_NATIVE))
if ( chunk_is_token(start, CT_FORWARD)
|| chunk_is_token(start, CT_NATIVE))
{
LOG_FMT(LPFUNC, "%s: %zu] '%s' [%s] proto due to %s\n",
__func__, fcn->orig_line, fcn->text(),
@ -377,7 +379,7 @@ static chunk_t *pawn_process_func_def(chunk_t *pc)
* we need to add virtual braces around the function body.
*/
chunk_t *clp = chunk_get_next_str(pc, ")", 1, 0);
chunk_t *last = chunk_get_next_ncnl(clp);
chunk_t *last = chunk_get_next_ncnnl(clp);
if (last != nullptr)
{
@ -386,7 +388,8 @@ static chunk_t *pawn_process_func_def(chunk_t *pc)
}
// See if there is a state clause after the function
if (last != nullptr && chunk_is_str(last, "<", 1))
if ( last != nullptr
&& chunk_is_str(last, "<", 1))
{
LOG_FMT(LPFUNC, "%s: %zu] '%s' has state angle open %s\n",
__func__, pc->orig_line, pc->text(), get_token_name(last->type));
@ -407,7 +410,7 @@ static chunk_t *pawn_process_func_def(chunk_t *pc)
set_chunk_type(last, CT_ANGLE_CLOSE);
set_chunk_parent(last, CT_FUNC_DEF);
}
last = chunk_get_next_ncnl(last);
last = chunk_get_next_ncnnl(last);
}
if (last == nullptr)
@ -444,16 +447,17 @@ static chunk_t *pawn_process_func_def(chunk_t *pc)
last = prev;
// find the next newline at level 0
prev = chunk_get_next_ncnl(prev);
prev = chunk_get_next_ncnnl(prev);
do
{
LOG_FMT(LPFUNC, "%s:%zu] check %s, level %zu\n",
__func__, prev->orig_line, get_token_name(prev->type), prev->level);
if (chunk_is_token(prev, CT_NEWLINE) && prev->level == 0)
if ( chunk_is_token(prev, CT_NEWLINE)
&& prev->level == 0)
{
chunk_t *next = chunk_get_next_ncnl(prev);
chunk_t *next = chunk_get_next_ncnnl(prev);
if ( next != nullptr
&& next->type != CT_ELSE
@ -501,7 +505,7 @@ chunk_t *pawn_check_vsemicolon(chunk_t *pc)
* - it is something that needs a continuation
* + arith, assign, bool, comma, compare
*/
chunk_t *prev = chunk_get_prev_ncnl(pc);
chunk_t *prev = chunk_get_prev_ncnnl(pc);
if ( prev == nullptr
|| prev == vb_open

@ -0,0 +1,138 @@
/**
* @file log_levels.h
*
* Enum for log levels.
* Use these for the log severities in LOG_FMT(), etc.
*
* @author Ben Gardner
* @author Guy Maurel October 2015- 2021
* @license GPL v2+
*/
#ifndef LOG_LEVELS_H_INCLUDED
#define LOG_LEVELS_H_INCLUDED
/**
* list of available log levels
*
* The user defines which log level is active using the
* -L or -log option.
* use -L A to set all the levels
* All messages which have a level that is active will be stored to the log
* file.
* All other log messages will be discarded.
* Different parts of the software use different log levels.
* This allows to log only operations of a specific operation.
* This eases debugging.
* To get all log messages use the option -La
* By default only system messages (level=LSYS) are logged.
*/
enum log_sev_t
{
LSYS = 0, //! system messages
LERR = 1, //! error messages
LWARN = 2, //! warnings
LNOTE = 3, //! user notifications
LINFO = 4, //! user informations
LDATA = 5, //! data logging
LFILELIST = 8, //! Files in the file list file
LLINEENDS = 9, //! Show which line endings are used
LCASTS = 10, //! align casts
LALBR = 11, //! align braces
LALTD = 12, //! Align Typedef
LALPP = 13, //! align #define
LALPROTO = 14, //! align prototype
LALNLC = 15, //! align backslash-newline
LALTC = 16, //! align trailing comments
LALADD = 17, //! align add
LALASS = 18, //! align assign
LFVD = 19, //! fix_var_def
LFVD2 = 20, //! fix_var_def-2
LINDENT = 21, //! indent_text
LINDENT2 = 22, //! indent_text tab level
LINDPSE = 23, //! indent_text stack
LINDPC = 24, //! indent play-by-play
LNEWLINE = 25, //! newlines
LPF = 26, //! Parse Frame
LSTMT = 27, //! Marking statements/expressions
LTOK = 28, //! Tokenize
LALRC = 29, //! align right comment
LCMTIND = 30, //! Comment Indent
LINDLINE = 31, //! indent line
LSIB = 32, //! Scan IB
LRETURN = 33, //! add/remove parens for return
LBRDEL = 34, //! brace removal
LFCN = 35, //! function detection
LFCNP = 36, //! function parameters
LPCU = 37, //! parse cleanup
LDYNKW = 38, //! dynamic keywords
LOUTIND = 39, //! output indent
LBCSAFTER = 40, //! Brace cleanup stack - after each token
LBCSPOP = 41, //! Brace cleanup stack - log pops
LBCSPUSH = 42, //! Brace cleanup stack - log push
LBCSSWAP = 43, //! Brace cleanup stack - log swaps
LFTOR = 44, //! Class Ctor or Dtor
LAS = 45, //! align_stack
LPPIS = 46, //! Preprocessor Indent and Space
LTYPEDEF = 47, //! Typedef and function types
LVARDEF = 48, //! Variable def marking
LDEFVAL = 49, //! define values
LPVSEMI = 50, //! Pawn: virtual semicolons
LPFUNC = 51, //! Pawn: function recognition
LSPLIT = 52, //! Line splitting
LFTYPE = 53, //! Function type detection
LTEMPL = 54, //! Template detection
LPARADD = 55, //! adding parens in if/while
LPARADD2 = 56, //! adding parens in if/while - details
LBLANKD = 57, //! blank line details
LTEMPFUNC = 58, //! Template function detection
LSCANSEMI = 59, //! scan semicolon removal
LDELSEMI = 60, //! Removing semicolons
LFPARAM = 61, //! Testing for a full parameter
LNL1LINE = 62, //! NL check for 1 liners
LPFCHK = 63, //! Parse Frame check function call
LAVDB = 64, //! align var def braces
LSORT = 65, //! Sorting
LSPACE = 66, //! Space
LALIGN = 67, //! align
LALAGAIN = 68, //! align again
LOPERATOR = 69, //! operator
LASFCP = 70, //! Align Same Function Call Params
LINDLINED = 71, //! indent line details
LBCTRL = 72, //! beautifier control
LRMRETURN = 73, //! remove 'return;'
LPPIF = 74, //! #if/#else/#endif pair processing
LMCB = 75, //! mod_case_brace
LBRCH = 76, //! if brace chain
LFCNR = 77, //! function return type
LOCCLASS = 78, //! OC Class stuff
LOCMSG = 79, //! OC Message stuff
LBLANK = 80, //! Blank Lines
LOBJCWORD = 81, //! Convert keyword to CT_WORD in certain circumstances
LCHANGE = 82, //! something changed
LCONTTEXT = 83, //! comment cont_text set
LANNOT = 84, //! Java annotation
LOCBLK = 85, //! OC Block stuff
LFLPAREN = 86, //! Flag paren
LOCMSGD = 87, //! OC Message declaration
LINDENTAG = 88, //! indent again
LNFD = 89, //! newline-function-def
LJDBI = 90, //! Java Double Brace Init
LSETPAR = 91, //! set_chunk_parent()
LSETTYP = 92, //! set_chunk_type()
LSETFLG = 93, //! set_chunk_flags()
LNLFUNCT = 94, //! newlines before function
LCHUNK = 95, //! Add or delete chunk
LBC = 96, //! brace cleanup
LCOMBINE = 97, //! combine
LGUY98 = 98, //! for guy-test
LGUY = 99, //! for guy-test
LBR = 100, //! braces
LOUTPUT = 101, //! output
LUNC = 102, //! rules used in uncrustify.cpp
LQT = 103, //! load/save options for Qt
LOTHER = 255, //! stuff that doesn't neatly fit any other category
};
#endif /* LOG_LEVELS_H_INCLUDED */

@ -0,0 +1,80 @@
/**
* @file log_rules.cpp
* is an extract from space.cpp
*
* @author Guy Maurel
* @license GPL v2+
*/
#include "log_rules.h"
#include "unc_tools.h"
void log_rule2(const char *func, size_t line, const char *rule, chunk_t *first, chunk_t *second)
{
LOG_FUNC_ENTRY();
if (second->type != CT_NEWLINE)
{
LOG_FMT(LSPACE, "%s(%zu): first->orig_line is %zu, first->orig_col is %zu, first->text() is '%s', [%s/%s] <===>\n",
func, line, first->orig_line, first->orig_col, first->text(),
get_token_name(first->type), get_token_name(get_chunk_parent_type(first)));
LOG_FMT(LSPACE, " second->orig_line is %zu, second->orig_col is %zu, second->text() is '%s', [%s/%s] :",
second->orig_line, second->orig_col, second->text(),
get_token_name(second->type), get_token_name(get_chunk_parent_type(second)));
LOG_FMT(LSPACE, " rule %s[line %zu]\n",
rule, line);
}
}
#ifdef SUPER_LOG
void log_rule3(log_sev_t sev, const char *func, size_t line, const char *rule)
#else
void log_rule3(log_sev_t sev, const char *func, const char *rule)
#endif
{
// some Windows platforms provide a qualified function name ("ABC::XYZ::function_Name")
// as __func__; call get_unqualified_func_name() to return an unqualified function name
func = get_unqualified_func_name(func);
#ifdef SUPER_LOG
LOG_FMT(sev, "log_rule(%s:%zu): rule is '%s'\n", func, line, rule);
#else
LOG_FMT(sev, "log_rule(%s): rule is '%s'\n", func, rule);
#endif
}
void log_rule4(const char *rule, chunk_t *first)
{
if (cpd.html_file == nullptr)
{
return;
}
if (first->tracking == nullptr)
{
first->tracking = new track_list;
first->tracking->reserve(3);
}
// copy the rule
size_t length = strlen(rule) + 1;
char *r = (char *)malloc(length);
strcpy(r, rule);
size_t a_number = get_A_Number();
Track_nr A = make_pair(a_number, r);
first->tracking->push_back(A);
size_t sizeOfTrack = first->tracking->size();
LOG_FMT(LSPACE, "log_rule4(%d): rule is '%s', after '%s'', at line %zu, tracking number is %zu, size is %zu\n",
__LINE__, rule, first->text(), first->orig_line, a_number, sizeOfTrack);
}

@ -0,0 +1,63 @@
/**
* @file log_rules.h
* prototypes for log_rules.cpp
*
* @author Guy Maurel
* @license GPL v2+
*/
#ifndef LOG_RULES_H_INCLUDED
#define LOG_RULES_H_INCLUDED
#include "chunk_list.h"
#include "uncrustify.h"
using namespace uncrustify;
#if defined DEBUG
#define log_rule(rule) \
do { \
log_rule2(__func__, __LINE__, (rule), first, second); \
log_rule4((rule), first); \
\
} while (0)
#else
#define log_rule(rule) \
do { \
log_rule2(__func__, __LINE__, (rule), first, second); \
} while (0)
#endif
#define log_rule_short(rule) \
do { \
log_rule2(__func__, __LINE__, (rule), first, second); \
} while (0)
// if you need more debug informations, remove the comment at the next line
#define SUPER_LOG 1
#ifdef SUPER_LOG
#define log_rule_B(rule) \
do { \
log_rule3(LCURRENT, __func__, __LINE__, (rule)); \
} while (0)
#else
#define log_rule_B(rule) \
do { \
log_rule3(LCURRENT, __func__, (rule)); \
} while (0)
#endif
void log_rule2(const char *func, size_t line, const char *rule, chunk_t *first, chunk_t *second);
#ifdef SUPER_LOG
void log_rule3(log_sev_t sev, const char *func, size_t line, const char *rule);
#else
void log_rule3(log_sev_t sev, const char *func, const char *rule);
#endif
void log_rule4(const char *rule, chunk_t *first);
#endif /* LOG_RULES_H_INCLUDED */

@ -10,16 +10,11 @@
* @license GPL v2+
*/
#include "compat.h"
#include "log_levels.h"
#include "logger.h"
#include "unc_ctype.h"
#include "uncrustify_types.h"
#include <cstdio>
#include <deque>
#include <stdarg.h>
#include <vector>
#include "compat.h"
#include <cstdarg> // to get va_start, va_end
struct log_fcn_info
@ -57,6 +52,8 @@ struct log_buf
log_mask_t mask;
bool show_hdr; //! flag determine if a header gets added to log message
};
static struct log_buf g_log;
@ -129,7 +126,8 @@ void log_flush(bool force_nl)
{
if (g_log.buf_len > 0)
{
if (force_nl && g_log.bufX[g_log.buf_len - 1] != '\n')
if ( force_nl
&& g_log.bufX[g_log.buf_len - 1] != '\n')
{
g_log.bufX[g_log.buf_len++] = '\n';
g_log.bufX[g_log.buf_len] = 0;
@ -158,7 +156,8 @@ static size_t log_start(log_sev_t sev)
}
// If not in a log, the buffer is empty. Add the header, if enabled.
if (!g_log.in_log && g_log.show_hdr)
if ( !g_log.in_log
&& g_log.show_hdr)
{
g_log.buf_len = static_cast<size_t>(snprintf(&g_log.bufX[0], g_log.bufX.size(), "<%d>", sev));
}
@ -182,7 +181,8 @@ static void log_end(void)
void log_fmt(log_sev_t sev, const char *fmt, ...)
{
if (fmt == nullptr || !log_sev_on(sev))
if ( fmt == nullptr
|| !log_sev_on(sev))
{
return;
}
@ -194,7 +194,7 @@ void log_fmt(log_sev_t sev, const char *fmt, ...)
return;
}
// the value of buffer_length is experimental
const int buffer_length = 4100;
const int buffer_length = 40000;
char buf[buffer_length];
// it MUST be a 'unsigned int' variable to be runable under windows
@ -309,3 +309,28 @@ void log_func_stack(log_sev_t sev, const char *prefix, const char *suffix, size_
LOG_FMT(sev, "%s", suffix);
}
}
const char *get_unqualified_func_name(const char *func)
{
/**
* we look for the last ':' character;
*/
for (auto i = strlen(func); i > 0; --i)
{
if (func[i - 1] == ':')
{
/**
* function name is qualified, so return the
* unqualified portion
*/
return(func + i);
}
}
/**
* input function name is unqualified
*/
return(func);
}

@ -16,8 +16,8 @@
#define LOGGER_H_INCLUDED
#include "logmask.h"
#include <cstdio> // FILE
#include <cstring> // strlen()
/**
@ -118,13 +118,16 @@ void log_flush(bool force_nl);
#endif
#define __unqualified_func__ get_unqualified_func_name(__func__)
#ifdef DEBUG
/**
* This should be called as the first thing in a function.
* It uses the log_func class to add an entry to the function log stack.
* It is automatically removed when the function returns.
*/
#define LOG_FUNC_ENTRY() log_func log_fe = log_func(__func__, __LINE__)
#define LOG_FUNC_ENTRY() log_func log_fe = log_func(__unqualified_func__, __LINE__)
#else
@ -150,6 +153,14 @@ public:
void log_func_stack(log_sev_t sev, const char *prefix = 0, const char *suffix = "\n", size_t skip_cnt = 0);
/**
* Return the unqualified function name from the input argument
* @param the qualified function name, usually provided by __func__ macro
* @return the corresponding unqualified name
*/
const char *get_unqualified_func_name(const char *func);
#define log_func_stack_inline(_sev) log_func_stack((_sev), " [CallStack:", "]\n", 0)

@ -26,7 +26,8 @@
*/
char *logmask_to_str(const log_mask_t &mask, char *buf, int size)
{
if (buf == nullptr || size <= 0)
if ( buf == nullptr
|| size <= 0)
{
return(buf);
}
@ -61,7 +62,8 @@ char *logmask_to_str(const log_mask_t &mask, char *buf, int size)
}
// handle a range that ends on the last bit
if (is_range && last_sev != -1)
if ( is_range
&& last_sev != -1)
{
buf[len - 1] = '-'; // change last comma to a dash
len += snprintf(&buf[len], size - len, "%d", last_sev);

@ -10,7 +10,6 @@
#define NEWLINES_H_INCLUDED
#include "chunk_list.h"
#include "uncrustify_types.h"
/**
* Double the newline, if allowed.
@ -23,6 +22,13 @@ void double_newline(chunk_t *nl);
*/
void newlines_remove_newlines(void);
/**
* Remove all newlines that fail the checks performed by the can_increase_nl() function
*/
void newlines_remove_disallowed();
/** Step through all chunks, altering newlines inside parens of if/for/while/do as needed.
* Handles the style options: nl_multi_line_sparen_open, nl_multi_line_sparen_close, nl_before_if_closing_paren
*/

@ -3,26 +3,23 @@
* Parses the options from the config file.
*
* @author Ben Gardner
* @author Guy Maurel since version 0.62 for uncrustify4Qt
* October 2015, 2016
* @author Guy Maurel October 2015, 2021
* @author Matthew Woehlke since version 0.67
* @license GPL v2+
*/
#include "option.h"
#include "keywords.h"
#include "option_enum.h"
#include "uncrustify.h"
#include "uncrustify_limits.h"
#include "uncrustify_types.h"
#include "uncrustify_version.h"
#include <fstream>
#include <unordered_map>
#include <cctype>
#include <cstdarg>
#include <cstring>
#include <cctype> // to get std::tolower
#include <cstdarg> // to get va_start, va_end
namespace uncrustify
{
@ -156,7 +153,9 @@ std::string to_lower(const std::string &in)
//-----------------------------------------------------------------------------
bool is_arg_sep(int ch)
{
return(isspace(ch) || ch == ',' || ch == '=');
return( isspace(ch)
|| ch == ','
|| ch == '=');
}
@ -179,13 +178,15 @@ std::vector<std::string> split_args(std::string in, const char *filename,
while (n < k)
{
// Skip leading space
while (n < k && is_sep(in[n]))
while ( n < k
&& is_sep(in[n]))
{
++n;
}
// Detect comments or trailing space
if (n >= k || in[n] == '#')
if ( n >= k
|| in[n] == '#')
{
break;
}
@ -197,7 +198,8 @@ std::vector<std::string> split_args(std::string in, const char *filename,
for ((void)n; in[n] != *quote; ++n)
{
if (n < k && in[n] == '\\')
if ( n < k
&& in[n] == '\\')
{
in.erase(n, 1);
--k;
@ -213,7 +215,8 @@ std::vector<std::string> split_args(std::string in, const char *filename,
out.push_back(in.substr(start, n - start));
if (++n < k && !is_sep(in[n]))
if ( ++n < k
&& !is_sep(in[n]))
{
OptionWarning w{ filename };
w("unexpected text following quoted-string");
@ -224,7 +227,10 @@ std::vector<std::string> split_args(std::string in, const char *filename,
// Extract anything else
const auto start = n;
for ((void)n; n < k && !is_sep(in[n]); ++n)
for ((void)n;
( n < k
&& !is_sep(in[n]));
++n)
{
if (in[n] == '\\')
{
@ -254,14 +260,18 @@ bool is_path_relative(const std::string &path)
#ifdef WIN32
// Check for partition labels as indication for an absolute path
// 'X:\path\to\file' style absolute disk path
if (path.size() > 1 && isalpha(path[0]) && path[1] == ':')
if ( path.size() > 1
&& isalpha(path[0])
&& path[1] == ':')
{
return(false);
}
// Check for double backslashs as indication for a network path
// '\\server\path\to\file style' absolute UNC path
if (path.size() > 1 && path[0] == '\\' && path[1] == '\\')
if ( path.size() > 1
&& path[0] == '\\'
&& path[1] == '\\')
{
return(false);
}
@ -279,7 +289,9 @@ void print_description(FILE *pfile, std::string description,
{
// Descriptions always start with a '\n', so skip the first character
for (std::string::size_type start = 1, length = description.length();
start != std::string::npos && start < length; ++start)
( start != std::string::npos
&& start < length);
++start)
{
// Check for empty line so we can squelch trailing whitespace
if (description[start] == '\n')
@ -462,7 +474,8 @@ bool read_number(const char *in, Option<T> &out)
char *c;
const auto val = std::strtol(in, &c, 10);
if (*c == 0 && out.validate(val))
if ( *c == 0
&& out.validate(val))
{
out.m_val = static_cast<T>(val);
return(true);
@ -861,7 +874,8 @@ void process_option_line(const std::string &config_line, const char *filename,
// Check for necessary arguments
const auto &cmd = to_lower(args.front());
if (cmd == "set" || cmd == "file_ext")
if ( cmd == "set"
|| cmd == "file_ext")
{
if (args.size() < 3)
{

@ -66,7 +66,6 @@ enum class iarf_e // <IARF>
ADD = (1u << 0), //! option adds a given feature
REMOVE = (1u << 1), //! option removes a given feature
FORCE = (ADD | REMOVE), //! option forces the usage of a given feature
// UNC_INTERNAL
NOT_DEFINED = (1u << 2) //! for debugging
};
@ -214,7 +213,8 @@ public:
BoundedOption(const char *opt_name, const char *opt_desc, T opt_val = T{})
: Option<T>{opt_name, opt_desc, opt_val}
{
assert(opt_val >= min && opt_val <= max);
assert( opt_val >= min
&& opt_val <= max);
}
std::string minStr() const override { return(std::to_string(min)); }

@ -30,7 +30,6 @@
* instantiation. Note also that the line break, as shown, is required.
*/
#include "option.h"
#include "option_enum.h"
namespace uncrustify
@ -76,18 +75,16 @@ string_replace_tab_chars;
extern Option<bool>
tok_split_gte;
// Disable formatting of NL_CONT ('\\n') ended lines (e.g. multiline macros)
// Disable formatting of NL_CONT ('\\n') ended lines (e.g. multi-line macros).
extern Option<bool>
disable_processing_nl_cont;
// Specify the marker used in comments to disable processing of part of the
// file.
// The comment should be used alone in one line.
extern Option<string>
disable_processing_cmt; // = UNCRUSTIFY_OFF_TEXT
// Specify the marker used in comments to (re)enable processing in a file.
// The comment should be used alone in one line.
extern Option<string>
enable_processing_cmt; // = UNCRUSTIFY_ON_TEXT
@ -95,6 +92,13 @@ enable_processing_cmt; // = UNCRUSTIFY_ON_TEXT
extern Option<bool>
enable_digraphs;
// Option to allow both disable_processing_cmt and enable_processing_cmt
// strings, if specified, to be interpreted as ECMAScript regular expressions.
// If true, a regex search will be performed within comments according to the
// specified patterns in order to disable/enable processing.
extern Option<bool>
processing_cmt_as_regex;
// Add or remove the UTF-8 BOM (recommend 'remove').
extern Option<iarf_e>
utf8_bom;
@ -108,18 +112,6 @@ utf8_byte;
extern Option<bool>
utf8_force;
// Add or remove space between 'do' and '{'.
extern Option<iarf_e>
sp_do_brace_open;
// Add or remove space between '}' and 'while'.
extern Option<iarf_e>
sp_brace_close_while;
// Add or remove space between 'while' and '('.
extern Option<iarf_e>
sp_while_paren_open;
//END
///////////////////////////////////////////////////////////////////////////////
@ -156,6 +148,12 @@ sp_cpp_lambda_square_paren;
extern Option<iarf_e>
sp_cpp_lambda_square_brace;
// Add or remove space after the opening parenthesis and before the closing
// parenthesis of a argument list of a C++11 lambda, as in
// '[]( <here> int x <here> ){ ... }'.
extern Option<iarf_e>
sp_cpp_lambda_argument_list;
// Add or remove space after the argument list of a C++11 lambda, as in
// '[](int x) <here> { ... }'.
extern Option<iarf_e>
@ -250,7 +248,7 @@ sp_balance_nested_parens;
extern Option<iarf_e>
sp_paren_brace;
// Add or remove space between nested braces, i.e. '{{' vs '{ {'.
// Add or remove space between nested braces, i.e. '{{' vs. '{ {'.
extern Option<iarf_e>
sp_brace_brace;
@ -337,9 +335,8 @@ sp_before_byref_func;
extern Option<iarf_e>
sp_after_type; // = IARF_FORCE
// Add or remove space between 'decltype(...)' and word.
//
// Overrides sp_after_type.
// Add or remove space between 'decltype(...)' and word,
// brace or function call.
extern Option<iarf_e>
sp_after_decltype;
@ -424,6 +421,18 @@ sp_after_sparen;
extern Option<iarf_e>
sp_sparen_brace;
// Add or remove space between 'do' and '{'.
extern Option<iarf_e>
sp_do_brace_open;
// Add or remove space between '}' and 'while'.
extern Option<iarf_e>
sp_brace_close_while;
// Add or remove space between 'while' and '('. Overrides sp_before_sparen.
extern Option<iarf_e>
sp_while_paren_open;
// (D) Add or remove space between 'invariant' and '('.
extern Option<iarf_e>
sp_invariant_paren;
@ -1068,31 +1077,39 @@ extern Option<iarf_e>
sp_range;
// Add or remove space after ':' in a Java/C++11 range-based 'for',
// as in 'for (Type var : expr)'.
// as in 'for (Type var : <here> expr)'.
extern Option<iarf_e>
sp_after_for_colon;
// Add or remove space before ':' in a Java/C++11 range-based 'for',
// as in 'for (Type var : expr)'.
// as in 'for (Type var <here> : expr)'.
extern Option<iarf_e>
sp_before_for_colon;
// (D) Add or remove space between 'extern' and '(' as in 'extern (C)'.
// (D) Add or remove space between 'extern' and '(' as in 'extern <here> (C)'.
extern Option<iarf_e>
sp_extern_paren;
// Add or remove space after the opening of a C++ comment,
// i.e. '// A' vs. '//A'.
// Add or remove space after the opening of a C++ comment, as in '// <here> A'.
extern Option<iarf_e>
sp_cmt_cpp_start;
// If true, space is added with sp_cmt_cpp_start will be added after doxygen
// Add or remove space in a C++ region marker comment, as in '// <here> BEGIN'.
// A region marker is defined as a comment which is not preceded by other text
// (i.e. the comment is the first non-whitespace on the line), and which starts
// with either 'BEGIN' or 'END'.
//
// Overrides sp_cmt_cpp_start.
extern Option<iarf_e>
sp_cmt_cpp_region;
// If true, space added with sp_cmt_cpp_start will be added after Doxygen
// sequences like '///', '///<', '//!' and '//!<'.
extern Option<bool>
sp_cmt_cpp_doxygen;
// If true, space is added with sp_cmt_cpp_start will be added after Qt
// translator or meta-data comments like '//:', '//=', and '//~'.
// If true, space added with sp_cmt_cpp_start will be added after Qt translator
// or meta-data comments like '//:', '//=', and '//~'.
extern Option<bool>
sp_cmt_cpp_qttr;
@ -1279,6 +1296,13 @@ indent_extern;
extern Option<bool>
indent_class;
// Additional indent before the leading base class colon.
// Negative values decrease indent down to the first column.
// Requires a newline break before colon (see pos_class_colon
// and nl_class_colon)
extern BoundedOption<signed, -16, 16>
indent_before_class_colon;
// Whether to indent the stuff after a leading base class colon.
extern Option<bool>
indent_class_colon;
@ -1412,12 +1436,19 @@ extern Option<bool>
indent_relative_single_line_comments;
// Spaces to indent 'case' from 'switch'. Usually 0 or indent_columns.
// It might wise to choose the same value for the option indent_case_brace.
extern BoundedOption<unsigned, 0, 16>
indent_switch_case;
// Spaces to indent '{' from 'case'. By default, the brace will appear under
// the 'c' in case. Usually set to 0 or indent_columns. Negative values are OK.
// It might wise to choose the same value for the option indent_switch_case.
extern BoundedOption<signed, -16, 16>
indent_case_brace;
// indent 'break' with 'case' from 'switch'.
extern Option<bool>
indent_switch_break_with_case; // = false
indent_switch_break_with_case;
// Whether to indent preprocessor statements inside of switch statements.
extern Option<bool>
@ -1428,11 +1459,6 @@ indent_switch_pp; // = true
extern BoundedOption<unsigned, 0, 16>
indent_case_shift;
// Spaces to indent '{' from 'case'. By default, the brace will appear under
// the 'c' in case. Usually set to 0 or indent_columns. Negative values are OK.
extern BoundedOption<signed, -16, 16>
indent_case_brace;
// Whether to indent comments found in first column.
extern Option<bool>
indent_col1_comment;
@ -1489,6 +1515,11 @@ indent_paren_after_func_decl;
extern Option<bool>
indent_paren_after_func_call;
// Whether to indent a comma when inside a brace.
// If true, aligns under the open brace.
extern Option<bool>
indent_comma_brace;
// Whether to indent a comma when inside a parenthesis.
// If true, aligns under the open parenthesis.
extern Option<bool>
@ -1531,7 +1562,7 @@ indent_align_assign; // = true
// If true, the indentation of the chunks after a '=' sequence will be set at
// LHS token indentation column before '='.
extern Option<bool>
indent_off_after_assign; // = false
indent_off_after_assign;
// Whether to align continued statements at the '('. If false or the '(' is
// followed by a newline, the next line indent is one tab.
@ -1540,7 +1571,7 @@ indent_align_paren; // = true
// (OC) Whether to indent Objective-C code inside message selectors.
extern Option<bool>
indent_oc_inside_msg_sel; // = false
indent_oc_inside_msg_sel;
// (OC) Whether to indent Objective-C blocks at brace level instead of usual
// rules.
@ -1611,10 +1642,10 @@ extern Option<bool>
indent_cpp_lambda_body;
// How to indent compound literals that are being returned.
// true: add both the indent from return & the compound literal open brace (ie:
// 2 indent levels)
// false: only indent 1 level, don't add the indent for the open brace, only add
// the indent for the return.
// true: add both the indent from return & the compound literal open brace
// (i.e. 2 indent levels)
// false: only indent 1 level, don't add the indent for the open brace, only
// add the indent for the return.
extern Option<bool>
indent_compound_literal_return; // = true
@ -1630,9 +1661,9 @@ indent_using_block; // = true
extern BoundedOption<unsigned, 0, 2>
indent_ternary_operator;
// Whether to indent the statments inside ternary operator.
// Whether to indent the statements inside ternary operator.
extern Option<bool>
indent_inside_ternary_operator; // false
indent_inside_ternary_operator;
// If true, the indentation of the chunks after a `return` sequence will be set at return indentation column.
extern Option<bool>
@ -1703,6 +1734,10 @@ nl_if_leave_one_liners;
extern Option<bool>
nl_while_leave_one_liners;
// Don't split one-line do statements, as in 'do { b++; } while(...);'.
extern Option<bool>
nl_do_leave_one_liners;
// Don't split one-line for statements, as in 'for(...) b++;'.
extern Option<bool>
nl_for_leave_one_liners;
@ -2222,7 +2257,7 @@ nl_func_call_args_multi_line;
extern Option<bool>
nl_func_call_end_multi_line;
// Whether to respect nl_func_call_XXX option incase of closure args.
// Whether to respect nl_func_call_XXX option in case of closure args.
extern Option<bool>
nl_func_call_args_multi_line_ignore_closures; // false
@ -2452,9 +2487,8 @@ nl_create_while_one_liner;
extern Option<bool>
nl_create_func_def_one_liner;
// Whether to collapse a function definition whose body (not counting braces)
// is only one line so that the entire definition (prototype, braces, body) is
// a single line.
// Whether to split one-line simple unbraced if statements into three lines by
// adding newlines, as in 'int a[12] = { <here> 0 <here> };'.
extern Option<bool>
nl_create_list_one_liner;
@ -2492,7 +2526,9 @@ extern BoundedOption<unsigned, 0, 16>
nl_max_blank_in_func;
// The number of newlines inside an empty function body.
// This option is overridden by nl_collapse_empty_body=true
// This option overrides eat_blanks_after_open_brace and
// eat_blanks_before_close_brace, but is ignored when
// nl_collapse_empty_body=true
extern BoundedOption<unsigned, 0, 16>
nl_inside_empty_func;
@ -2500,7 +2536,8 @@ nl_inside_empty_func;
extern BoundedOption<unsigned, 0, 16>
nl_before_func_body_proto;
// The number of newlines before a multi-line function definition.
// The number of newlines before a multi-line function definition. Where
// applicable, this option is overridden with eat_blanks_after_open_brace=true
extern BoundedOption<unsigned, 0, 16>
nl_before_func_body_def;
@ -3233,10 +3270,47 @@ cmt_width;
//
// 0: No reflowing (apart from the line wrapping due to cmt_width) (default)
// 1: No touching at all
// 2: Full reflow
// 2: Full reflow (enable cmt_indent_multi for indent with line wrapping due to cmt_width)
extern BoundedOption<unsigned, 0, 2>
cmt_reflow_mode;
// Path to a file that contains regular expressions describing patterns for
// which the end of one line and the beginning of the next will be folded into
// the same sentence or paragraph during full comment reflow. The regular
// expressions are described using ECMAScript syntax. The syntax for this
// specification is as follows, where "..." indicates the custom regular
// expression and "n" indicates the nth end_of_prev_line_regex and
// beg_of_next_line_regex regular expression pair:
//
// end_of_prev_line_regex[1] = "...$"
// beg_of_next_line_regex[1] = "^..."
// end_of_prev_line_regex[2] = "...$"
// beg_of_next_line_regex[2] = "^..."
// .
// .
// .
// end_of_prev_line_regex[n] = "...$"
// beg_of_next_line_regex[n] = "^..."
//
// Note that use of this option overrides the default reflow fold regular
// expressions, which are internally defined as follows:
//
// end_of_prev_line_regex[1] = "[\w,\]\)]$"
// beg_of_next_line_regex[1] = "^[\w,\[\(]"
// end_of_prev_line_regex[2] = "\.$"
// beg_of_next_line_regex[2] = "^[A-Z]"
extern Option<string>
cmt_reflow_fold_regex_file;
// Whether to indent wrapped lines to the start of the encompassing paragraph
// during full comment reflow (cmt_reflow_mode = 2). Overrides the value
// specified by cmt_sp_after_star_cont.
//
// Note that cmt_align_doxygen_javadoc_tags overrides this option for
// paragraphs associated with javadoc tags
extern Option<bool>
cmt_reflow_indent_to_paragraph_start;
// Whether to convert all tabs to spaces in comments. If false, tabs in
// comments are left alone, unless used for indenting.
extern Option<bool>
@ -3249,6 +3323,22 @@ cmt_convert_tab_to_spaces;
extern Option<bool>
cmt_indent_multi; // = true
// Whether to align doxygen javadoc-style tags ('@param', '@return', etc.)
// and corresponding fields such that groups of consecutive block tags,
// parameter names, and descriptions align with one another. Overrides that
// which is specified by the cmt_sp_after_star_cont. If cmt_width > 0, it may
// be necessary to enable cmt_indent_multi and set cmt_reflow_mode = 2
// in order to achieve the desired alignment for line-wrapping.
extern Option<bool>
cmt_align_doxygen_javadoc_tags;
// The number of spaces to insert after the star and before doxygen
// javadoc-style tags (@param, @return, etc). Requires enabling
// cmt_align_doxygen_javadoc_tags. Overrides that which is specified by the
// cmt_sp_after_star_cont.
extern BoundedOption<unsigned, 0, 16>
cmt_sp_before_doxygen_javadoc_tags; // = 1
// Whether to group c-comments that look like they are in a block.
extern Option<bool>
cmt_c_group;
@ -3740,9 +3830,8 @@ use_sp_after_angle_always;
extern Option<bool>
use_options_overriding_for_qt_macros; // = true
// If true: the form feed character is removed from the list
// of whitespace characters.
// See https://en.cppreference.com/w/cpp/string/byte/isspace
// If true: the form feed character is removed from the list of whitespace
// characters. See https://en.cppreference.com/w/cpp/string/byte/isspace.
extern Option<bool>
use_form_feed_no_more_as_whitespace_character;
@ -3776,6 +3865,11 @@ debug_line_number_to_protocol;
extern Option<signed>
debug_timeout;
// Set the number of characters to be printed if the text is too long,
// 0: do not truncate.
extern BoundedOption<unsigned, 0, 960>
debug_truncate;
//END
} // namespace options

@ -13,6 +13,8 @@
#include "log_rules.h"
constexpr static auto LCURRENT = LQT;
using namespace uncrustify;
// for the modification of options within the SIGNAL/SLOT call.
@ -40,7 +42,7 @@ private:
Option<iarf_e> *m_option;
const iarf_e m_override_value;
iarf_e m_saved_value = iarf_e::NOT_DEFINED;
iarf_e m_saved_value = IARF_NOT_DEFINED;
};
@ -56,7 +58,7 @@ void temporary_iarf_option::save_and_override()
void temporary_iarf_option::restore()
{
(*m_option) = m_saved_value;
m_saved_value = iarf_e::NOT_DEFINED;
m_saved_value = IARF_NOT_DEFINED;
}
//-----------------------------------------------------------------------------

@ -8,15 +8,7 @@
#include "parens.h"
#include "chunk_list.h"
#include "log_rules.h"
#include "unc_ctype.h"
#include "uncrustify.h"
#include "uncrustify_types.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace uncrustify;
@ -48,6 +40,8 @@ static void check_bool_parens(chunk_t *popen, chunk_t *pclose, int nest);
void do_parens(void)
{
constexpr static auto LCURRENT = LPARADD;
LOG_FUNC_ENTRY();
log_rule_B("mod_full_paren_if_bool");
@ -56,7 +50,7 @@ void do_parens(void)
{
chunk_t *pc = chunk_get_head();
while ((pc = chunk_get_next_ncnl(pc)) != nullptr)
while ((pc = chunk_get_next_ncnnl(pc)) != nullptr)
{
if ( pc->type != CT_SPAREN_OPEN
|| ( get_chunk_parent_type(pc) != CT_IF
@ -88,7 +82,7 @@ static void add_parens_between(chunk_t *first, chunk_t *last)
last->text(), last->level);
// Don't do anything if we have a bad sequence, ie "&& )"
chunk_t *first_n = chunk_get_next_ncnl(first);
chunk_t *first_n = chunk_get_next_ncnnl(first);
if (first_n == last)
{
@ -107,7 +101,7 @@ static void add_parens_between(chunk_t *first, chunk_t *last)
chunk_add_before(&pc, first_n);
chunk_t *last_p = chunk_get_prev_ncnl(last, scope_e::PREPROC);
chunk_t *last_p = chunk_get_prev_ncnnl(last, scope_e::PREPROC);
set_chunk_type(&pc, CT_PAREN_CLOSE);
pc.orig_line = last_p->orig_line;
@ -122,7 +116,7 @@ static void add_parens_between(chunk_t *first, chunk_t *last)
for (chunk_t *tmp = first_n;
tmp != last_p;
tmp = chunk_get_next_ncnl(tmp))
tmp = chunk_get_next_ncnnl(tmp))
{
tmp->level++;
}
@ -146,7 +140,8 @@ static void check_bool_parens(chunk_t *popen, chunk_t *pclose, int nest)
chunk_t *pc = popen;
while ((pc = chunk_get_next_ncnl(pc)) != nullptr && pc != pclose)
while ( (pc = chunk_get_next_ncnnl(pc)) != nullptr
&& pc != pclose)
{
if (pc->flags.test(PCF_IN_PREPROC))
{

@ -0,0 +1,53 @@
/**
* @file parent_for_pp.cpp
*
* @author Guy Maurel
* @license GPL v2+
*/
#include "parent_for_pp.h"
#include "chunk_list.h"
void do_parent_for_pp(void)
{
LOG_FUNC_ENTRY();
vector<chunk_t *> viz;
chunk_t *pc = chunk_get_head();
while ((pc = chunk_get_next_ncnnl(pc)) != nullptr)
{
// CT_PP_IF, // #if, #ifdef, or #ifndef
// CT_PP_ELSE, // #else or #elif
// CT_PP_ENDIF, // #endif
if (chunk_is_token(pc, CT_PP_IF))
{
LOG_FMT(LMCB, "%s(%d): IF: orig_line %zu, orig_col is %zu\n",
__func__, __LINE__, pc->orig_line, pc->orig_col);
log_pcf_flags(LMCB, pc->flags);
viz.push_back(pc);
}
else if (chunk_is_token(pc, CT_PP_ELSE))
{
LOG_FMT(LMCB, "%s(%d): ELSE: orig_line %zu, orig_col is %zu\n",
__func__, __LINE__, pc->orig_line, pc->orig_col);
log_pcf_flags(LMCB, pc->flags);
size_t level = pc->pp_level;
chunk_t *a = viz.at(level - 1);
chunk_set_parent(pc, a);
}
else if (chunk_is_token(pc, CT_PP_ENDIF))
{
LOG_FMT(LMCB, "%s(%d): ENDIF: orig_line %zu, orig_col is %zu\n",
__func__, __LINE__, pc->orig_line, pc->orig_col);
log_pcf_flags(LMCB, pc->flags);
size_t level = pc->pp_level;
chunk_t *a = viz.at(level);
chunk_set_parent(pc, a);
viz.pop_back();
}
}
} // do_parent_for_pp

@ -0,0 +1,17 @@
/**
* @file parent_for_pp.h
* prototype for parent_for_pp.cpp
*
* @author Guy Maurel
* @license GPL v2+
*/
#ifndef PARENT_FOR_PP_H_INCLUDED
#define PARENT_FOR_PP_H_INCLUDED
// mark the parent
void do_parent_for_pp(void);
#endif /* PARENT_FOR_PP_H_INCLUDED */

@ -54,7 +54,8 @@ static const char *pcf_names[] =
"IN_FCN_CTOR", // 42 Issue #2152
"IN_TRY_BLOCK", // 43 Issue #1734
"INCOMPLETE", // 44
"WF_IF", // 45
"IN_LAMBDA", // 45
"WF_IF", // 46
};

@ -8,10 +8,7 @@
#ifndef PCF_FLAGS_STR_INCLUDED
#define PCF_FLAGS_STR_INCLUDED
#include "base_types.h"
#include "enum_flags.h"
#include "log_levels.h"
#include "logger.h"
#include <cstddef> // do get the definition of size_t
@ -29,7 +26,7 @@ constexpr auto pcf_bit(size_t b) -> decltype(0ULL)
return(1ULL << b);
}
enum pcf_flag_e : decltype(0ULL)
enum pcf_flag_e : decltype ( 0ULL )
{
// Copy flags are in the lower 17 bits
PCF_NONE = 0ULL,
@ -53,38 +50,39 @@ enum pcf_flag_e : decltype(0ULL)
PCF_IN_DECLTYPE = pcf_bit(16),
// Non-Copy flags are in the upper 47 bits
PCF_FORCE_SPACE = pcf_bit(17), //! must have a space after this token
PCF_STMT_START = pcf_bit(18), //! marks the start of a statement
PCF_EXPR_START = pcf_bit(19),
PCF_DONT_INDENT = pcf_bit(20), //! already aligned!
PCF_ALIGN_START = pcf_bit(21),
PCF_WAS_ALIGNED = pcf_bit(22),
PCF_VAR_TYPE = pcf_bit(23), //! part of a variable def type
PCF_VAR_DEF = pcf_bit(24), //! variable name in a variable def
PCF_VAR_1ST = pcf_bit(25), //! 1st variable def in a statement
PCF_VAR_1ST_DEF = (PCF_VAR_DEF | PCF_VAR_1ST),
PCF_VAR_INLINE = pcf_bit(26), //! type was an inline struct/enum/union
PCF_RIGHT_COMMENT = pcf_bit(27),
PCF_OLD_FCN_PARAMS = pcf_bit(28),
PCF_LVALUE = pcf_bit(29), //! left of assignment
PCF_ONE_LINER = pcf_bit(30),
PCF_ONE_CLASS = (PCF_ONE_LINER | PCF_IN_CLASS),
PCF_EMPTY_BODY = pcf_bit(31),
PCF_ANCHOR = pcf_bit(32), //! aligning anchor
PCF_PUNCTUATOR = pcf_bit(33),
PCF_INSERTED = pcf_bit(34), //! chunk was inserted from another file
PCF_LONG_BLOCK = pcf_bit(35), //! the block is 'long' by some measure
PCF_OC_BOXED = pcf_bit(36), //! inside OC boxed expression
PCF_KEEP_BRACE = pcf_bit(37), //! do not remove brace
PCF_OC_RTYPE = pcf_bit(38), //! inside OC return type
PCF_OC_ATYPE = pcf_bit(39), //! inside OC arg type
PCF_WF_ENDIF = pcf_bit(40), //! #endif for whole file ifdef
PCF_IN_QT_MACRO = pcf_bit(41), //! in a QT-macro, i.e. SIGNAL, SLOT
PCF_IN_FCN_CTOR = pcf_bit(42), //! inside function constructor
PCF_IN_TRY_BLOCK = pcf_bit(43), //! inside Function-try-block
PCF_INCOMPLETE = pcf_bit(44), //! class/struct forward declaration
PCF_WF_IF = pcf_bit(45), //! #if for a whole file ifdef
PCF_NOT_POSSIBLE = pcf_bit(46), //! it is not possible to make an one_liner
PCF_FORCE_SPACE = pcf_bit(17), //! must have a space after this token
PCF_STMT_START = pcf_bit(18), //! marks the start of a statement
PCF_EXPR_START = pcf_bit(19),
PCF_DONT_INDENT = pcf_bit(20), //! already aligned!
PCF_ALIGN_START = pcf_bit(21),
PCF_WAS_ALIGNED = pcf_bit(22),
PCF_VAR_TYPE = pcf_bit(23), //! part of a variable def type
PCF_VAR_DEF = pcf_bit(24), //! variable name in a variable def
PCF_VAR_1ST = pcf_bit(25), //! 1st variable def in a statement
PCF_VAR_1ST_DEF = (PCF_VAR_DEF | PCF_VAR_1ST),
PCF_VAR_INLINE = pcf_bit(26), //! type was an inline struct/enum/union
PCF_RIGHT_COMMENT = pcf_bit(27),
PCF_OLD_FCN_PARAMS = pcf_bit(28),
PCF_LVALUE = pcf_bit(29), //! left of assignment
PCF_ONE_LINER = pcf_bit(30),
PCF_ONE_CLASS = (PCF_ONE_LINER | PCF_IN_CLASS),
PCF_EMPTY_BODY = pcf_bit(31),
PCF_ANCHOR = pcf_bit(32), //! aligning anchor
PCF_PUNCTUATOR = pcf_bit(33),
PCF_INSERTED = pcf_bit(34), //! chunk was inserted from another file
PCF_LONG_BLOCK = pcf_bit(35), //! the block is 'long' by some measure
PCF_OC_BOXED = pcf_bit(36), //! inside OC boxed expression
PCF_KEEP_BRACE = pcf_bit(37), //! do not remove brace
PCF_OC_RTYPE = pcf_bit(38), //! inside OC return type
PCF_OC_ATYPE = pcf_bit(39), //! inside OC arg type
PCF_WF_ENDIF = pcf_bit(40), //! #endif for whole file ifdef
PCF_IN_QT_MACRO = pcf_bit(41), //! in a QT-macro, i.e. SIGNAL, SLOT
PCF_IN_FCN_CTOR = pcf_bit(42), //! inside function constructor
PCF_IN_TRY_BLOCK = pcf_bit(43), //! inside Function-try-block
PCF_INCOMPLETE = pcf_bit(44), //! class/struct forward declaration
PCF_IN_LAMBDA = pcf_bit(45), //! inside a lambda expression
PCF_WF_IF = pcf_bit(46), //! #if for a whole file ifdef
PCF_NOT_POSSIBLE = pcf_bit(47), //! it is not possible to make an one_liner
//! because the line would be too long
};

@ -54,6 +54,8 @@ static inline size_t calc_next_tab_column(size_t col, size_t tabsize)
*/
static inline size_t next_tab_column(size_t col)
{
constexpr static auto LCURRENT = LINDENT;
log_rule_B("output_tab_size");
return(calc_next_tab_column(col, uncrustify::options::output_tab_size()));
}

@ -8,11 +8,12 @@
#include "punctuators.h"
#include "log_rules.h"
//#include "log_rules.h"
#include "prototypes.h"
#include <algorithm>
constexpr static auto LCURRENT = LOTHER;
using namespace std;
using namespace uncrustify;
@ -35,7 +36,8 @@ using namespace uncrustify;
const chunk_tag_t *find_punctuator(const char *str, int lang_flags)
{
if (str == nullptr || str[0] == '\0')
if ( str == nullptr
|| str[0] == '\0')
{
return(nullptr);
}
@ -51,7 +53,8 @@ const chunk_tag_t *find_punctuator(const char *str, int lang_flags)
const auto *parent = punc_table; //!< graph in table form, initially point at first entry
auto ch_idx = int{};
while (ch_idx < 6 && str[ch_idx] != '\0') //!< symbols6: max punc len = 6
while ( ch_idx < 6
&& str[ch_idx] != '\0') //!< symbols6: max punc len = 6
{
// search for next parent node in all current child nodes
parent = binary_find(parent, next(parent, parent->left_in_group), str[ch_idx]);

@ -19,8 +19,9 @@ void quick_align_again(void)
for (chunk_t *pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next(pc))
{
char copy[1000];
LOG_FMT(LALAGAIN, "%s(%d): orig_line is %zu, orig_col is %zu, column is %zu, text() '%s'\n",
__func__, __LINE__, pc->orig_line, pc->orig_col, pc->column, pc->text());
__func__, __LINE__, pc->orig_line, pc->orig_col, pc->column, pc->elided_text(copy));
if ( pc->align.next != nullptr
&& pc->flags.test(PCF_ALIGN_START))

@ -65,7 +65,7 @@ void remove_extra_returns(void)
if (remove_it)
{
chunk_t *semicolon = chunk_get_next_ncnl(pc);
chunk_t *semicolon = chunk_get_next_ncnnl(pc);
if ( semicolon != nullptr
&& chunk_is_token(semicolon, CT_SEMICOLON))

@ -8,17 +8,7 @@
#include "semicolons.h"
#include "chunk_list.h"
#include "ChunkStack.h"
#include "language_tools.h"
#include "prototypes.h"
#include "unc_ctype.h"
#include "uncrustify.h"
#include "uncrustify_types.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
static void remove_semicolon(chunk_t *pc);
@ -51,12 +41,12 @@ void remove_extra_semicolons(void)
while (pc != nullptr)
{
chunk_t *next = chunk_get_next_ncnl(pc);
chunk_t *next = chunk_get_next_ncnnl(pc);
chunk_t *prev;
if ( chunk_is_token(pc, CT_SEMICOLON)
&& !pc->flags.test(PCF_IN_PREPROC)
&& (prev = chunk_get_prev_ncnl(pc)) != nullptr)
&& (prev = chunk_get_prev_ncnnl(pc)) != nullptr)
{
LOG_FMT(LSCANSEMI, "%s(%d): Semi orig_line is %zu, orig_col is %zu, parent is %s, prev = '%s' [%s/%s]\n",
__func__, __LINE__, pc->orig_line, pc->orig_col, get_token_name(get_chunk_parent_type(pc)),
@ -87,7 +77,8 @@ void remove_extra_semicolons(void)
{
check_unknown_brace_close(pc, prev);
}
else if (chunk_is_token(prev, CT_SEMICOLON) && get_chunk_parent_type(prev) != CT_FOR)
else if ( chunk_is_token(prev, CT_SEMICOLON)
&& get_chunk_parent_type(prev) != CT_FOR)
{
remove_semicolon(pc);
}
@ -118,7 +109,7 @@ static void check_unknown_brace_close(chunk_t *semi, chunk_t *brace_close)
LOG_FUNC_ENTRY();
chunk_t *pc = chunk_get_prev_type(brace_close, CT_BRACE_OPEN, brace_close->level);
pc = chunk_get_prev_ncnl(pc);
pc = chunk_get_prev_ncnnl(pc);
if ( pc != nullptr
&& pc->type != CT_RETURN

@ -8,13 +8,13 @@
#include "sorting.h"
#include "chunk_list.h"
#include "log_rules.h"
#include "newlines.h"
#include "prototypes.h"
#include <regex>
constexpr static auto LCURRENT = LSORT;
using namespace uncrustify;
Option<std::string> *include_category_options[] =
@ -134,7 +134,8 @@ static bool text_contains_filename_without_ext(const char *text)
size_t slash_idx = filepath.find_last_of("/\\");
std::string filename_without_ext = filepath;
if (slash_idx != std::string::npos && slash_idx < (filepath.size() - 1))
if ( slash_idx != std::string::npos
&& slash_idx < (filepath.size() - 1))
{
std::string filename = filepath.substr(slash_idx + 1);
size_t dot_idx = filename.find_last_of('.');
@ -203,7 +204,8 @@ static int compare_chunks(chunk_t *pc1, chunk_t *pc2, bool tcare)
return(0);
}
while (pc1 != nullptr && pc2 != nullptr)
while ( pc1 != nullptr
&& pc2 != nullptr)
{
auto const &s1_ext = chunk_sort_str(pc1);
auto const &s2_ext = chunk_sort_str(pc2);
@ -218,11 +220,13 @@ static int compare_chunks(chunk_t *pc1, chunk_t *pc2, bool tcare)
bool s1_contains_filename = text_contains_filename_without_ext(s1.c_str());
bool s2_contains_filename = text_contains_filename_without_ext(s2.c_str());
if (s1_contains_filename && !s2_contains_filename)
if ( s1_contains_filename
&& !s2_contains_filename)
{
return(-1);
}
else if (!s1_contains_filename && s2_contains_filename)
else if ( !s1_contains_filename
&& s2_contains_filename)
{
return(1);
}
@ -234,11 +238,13 @@ static int compare_chunks(chunk_t *pc1, chunk_t *pc2, bool tcare)
const bool s1_has_dot = has_dot(s1_ext);
const bool s2_has_dot = has_dot(s2_ext);
if (s1_has_dot && !s2_has_dot)
if ( s1_has_dot
&& !s2_has_dot)
{
return(1);
}
else if (!s1_has_dot && s2_has_dot)
else if ( !s1_has_dot
&& s2_has_dot)
{
return(-1);
}
@ -248,11 +254,13 @@ static int compare_chunks(chunk_t *pc1, chunk_t *pc2, bool tcare)
{
log_rule_B("mod_sort_incl_import_prioritize_angle_over_quotes");
if (s1.startswith("<") && s2.startswith("\""))
if ( s1.startswith("<")
&& s2.startswith("\""))
{
return(-1);
}
else if (s1.startswith("\"") && s2.startswith("<"))
else if ( s1.startswith("\"")
&& s2.startswith("<"))
{
return(1);
}
@ -318,7 +326,8 @@ static int compare_chunks(chunk_t *pc1, chunk_t *pc2, bool tcare)
}
}
if (pc1 == nullptr || !chunk_is_newline(pc2))
if ( pc1 == nullptr
|| !chunk_is_newline(pc2))
{
return(-1);
}
@ -420,7 +429,8 @@ static void delete_chunks_on_line_having_chunk(chunk_t *chunk)
chunk_t *pc = chunk_first_on_line(chunk);
while (pc != nullptr && !chunk_is_comment(pc))
while ( pc != nullptr
&& !chunk_is_comment(pc))
{
chunk_t *next_pc = chunk_get_next(pc);
LOG_FMT(LCHUNK, "%s(%d): Removed '%s' on orig_line %zu\n",
@ -503,7 +513,8 @@ static void group_imports_by_adding_newlines(chunk_t **chunks, size_t num_chunks
c_idx = -1;
}
if (c_idx_last != c_idx && idx > 0)
if ( c_idx_last != c_idx
&& idx > 0)
{
blankline_add_before(chunks[idx]);
}
@ -518,7 +529,8 @@ static void group_imports_by_adding_newlines(chunk_t **chunks, size_t num_chunks
{
chunk_has_dot = has_dot(chunks[idx]->str);
if (chunk_last_has_dot != chunk_has_dot && idx > 0)
if ( chunk_last_has_dot != chunk_has_dot
&& idx > 0)
{
blankline_add_before(chunks[idx]);
}
@ -533,7 +545,8 @@ static void group_imports_by_adding_newlines(chunk_t **chunks, size_t num_chunks
{
chunk_pri = get_chunk_priority(chunks[idx]);
if (chunk_pri_last != chunk_pri && idx > 0)
if ( chunk_pri_last != chunk_pri
&& idx > 0)
{
blankline_add_before(chunks[idx]);
}
@ -549,7 +562,8 @@ static void group_imports_by_adding_newlines(chunk_t **chunks, size_t num_chunks
auto const &chunk_text = chunk_sort_str(chunks[idx]);
chunk_has_filename = text_contains_filename_without_ext(chunk_text.c_str());
if (!chunk_has_filename && last_chunk_has_filename)
if ( !chunk_has_filename
&& last_chunk_has_filename)
{
blankline_add_before(chunks[idx]);
}

@ -1,15 +1,15 @@
/**
* @file sorting.h
* prototypes for sorting.c
* prototypes for sorting.cpp
*
* @author Ben Gardner
* @license GPL v2+
*/
#ifndef SORTING_H_INCLUDED
#define SORTING_H_INCLUDED
#include "uncrustify_types.h"
#include <stdlib.h>
/**
* alphabetically sort the #include or #import

@ -19,7 +19,7 @@
/**
* This is an enum of all the different chunks/tokens/elements that the
* program can work with. The parser and scanner assigns one of these to
* program can work with. The parser and scanner assigns one of these to
* each chunk/token.
*/
enum c_token_t
@ -177,7 +177,7 @@ enum c_token_t
CT_USING,
CT_USING_STMT, // using (xxx) ...
CT_USING_ALIAS, // using identifier attr(optional) = type-id
CT_D_WITH, // D: paren+braced
CT_D_WITH, // D: parenthetis+braced
CT_D_MODULE,
CT_SUPER,
CT_DELEGATE,
@ -197,23 +197,26 @@ enum c_token_t
CT_D_VERSION, // turns into CT_D_VERSION_IF if not followed by '='
CT_D_VERSION_IF, // version(x) { }
// note for paren/brace/square pairs: close MUST be open + 1
// note for parenthetis/brace/square pairs: close MUST be open + 1
CT_PAREN_OPEN,
CT_PAREN_CLOSE,
CT_ANGLE_OPEN, // template<T*>
CT_ANGLE_CLOSE,
CT_SPAREN_OPEN, // 'special' paren after if/for/switch/while/synchronized/catch
CT_SPAREN_OPEN, // 'special' parenthetis after if/for/switch/while/synchronized/catch
CT_SPAREN_CLOSE,
CT_PPAREN_OPEN, // 'protect' paren to protect a type such as (*int)
CT_PPAREN_OPEN, // 'protect' parenthetis to protect a type such as (*int)
CT_PPAREN_CLOSE, // used at align_func_param
CT_FPAREN_OPEN, // 'function' paren after fcn/macro fcn
CT_FPAREN_OPEN, // 'function' parenthetis after fcn/macro fcn
CT_FPAREN_CLOSE,
CT_TPAREN_OPEN, // 'type' paren used in function types
CT_LPAREN_OPEN, // lambda-declarator parenthetis
CT_LPAREN_CLOSE,
CT_TPAREN_OPEN, // 'type' parenthetis used in function types
CT_TPAREN_CLOSE,
CT_BRACE_OPEN, // {...}
@ -248,6 +251,7 @@ enum c_token_t
CT_FUNC_WRAP, // macro that wraps the function name
CT_PROTO_WRAP, // macro: "RETVAL PROTO_WRAP( fcn_name, (PARAMS))". Parens for PARAMS are optional.
CT_MACRO_FUNC, // function-like macro
CT_MACRO_FUNC_CALL, // function-like macro call
CT_MACRO, // a macro def
CT_QUALIFIER, // static, const, etc
CT_EXTERN, // extern

@ -0,0 +1,55 @@
/**
* @file tokenize.h
* prototypes for tokenize.c
*
* @author Ben Gardner
* @license GPL v2+
*/
#ifndef TOKENIZE_H_INCLUDED
#define TOKENIZE_H_INCLUDED
#include "uncrustify_types.h"
/**
* Test the input string to see if it satisfies the criteria
* specified by the disable_processing_cmt option
* @param text the string to which a match will be attempted
* @param start_idx the starting index within the string from which the
* search will be performed
* @return returns a non-negative position index that points to the beginning
* of the line containing the marker, if found
*/
int find_disable_processing_comment_marker(const unc_text &text, std::size_t start_idx = 0);
/**
* Test the input string to see if it satisfies the criteria
* specified by the enable_processing_cmt option
* @param text the string to which a match will be attempted
* @param start_idx the starting index within the string from which the
* search will be performed
* @return returns a non-negative position index that points to the end
* of the line containing the marker, if found
*/
int find_enable_processing_comment_marker(const unc_text &text, std::size_t start_idx = 0);
/**
* @brief Parse the text into chunks
*
* This function parses or tokenizes the whole buffer into a list.
* It has to do some tricks to parse preprocessors.
*
* If output_text() were called immediately after, two things would happen:
* - trailing whitespace are removed.
* - leading space & tabs are converted to the appropriate format.
*
* All the tokens are inserted before ref. If ref is NULL, they are inserted
* at the end of the list. Line numbers are relative to the start of the data.
*/
void tokenize(const std::deque<int> &data, chunk_t *ref);
#endif /* TOKENIZE_H_INCLUDED */

@ -6,33 +6,22 @@
* - detect "version = 10;" vs "version (xxx) {"
*
* @author Ben Gardner
* @author Guy Maurel since version 0.62 for uncrustify4Qt
* October 2015, 2016
* @author Guy Maurel 2015, 2021
* @license GPL v2+
*/
#include "tokenize_cleanup.h"
#include "char_table.h"
#include "chunk_list.h"
#include "combine.h"
#include "combine_skip.h"
#include "error_types.h"
#include "flag_braced_init_list.h"
#include "flag_decltype.h"
#include "keywords.h"
#include "language_tools.h"
#include "log_rules.h"
#include "prototypes.h"
#include "punctuators.h"
#include "space.h"
#include "unc_ctype.h"
#include "uncrustify.h"
#include "uncrustify_types.h"
#include <vector>
#include <cstring>
using namespace uncrustify;
@ -98,7 +87,7 @@ static chunk_t *handle_double_angle_close(chunk_t *pc)
{
chunk_t *next = chunk_get_next(pc);
if (next)
if (next != nullptr)
{
if ( chunk_is_token(pc, CT_ANGLE_CLOSE)
&& chunk_is_token(next, CT_ANGLE_CLOSE)
@ -110,7 +99,7 @@ static chunk_t *handle_double_angle_close(chunk_t *pc)
set_chunk_type(pc, CT_SHIFT);
pc->orig_col_end = next->orig_col_end;
chunk_t *tmp = chunk_get_next_ncnl(next);
chunk_t *tmp = chunk_get_next_ncnnl(next);
chunk_del(next);
next = tmp;
}
@ -171,15 +160,16 @@ void tokenize_trailing_return_types(void)
// auto f24() const throw() -> bool = delete;
chunk_t *pc;
for (pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next_ncnl(pc))
for (pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next_ncnnl(pc))
{
char copy[1000];
LOG_FMT(LNOTE, "%s(%d): orig_line is %zu, orig_col is %zu, text() is '%s'\n",
__func__, __LINE__, pc->orig_line, pc->orig_col, pc->text());
__func__, __LINE__, pc->orig_line, pc->orig_col, pc->elided_text(copy));
if ( chunk_is_token(pc, CT_MEMBER)
&& (strcmp(pc->text(), "->") == 0))
{
chunk_t *tmp = chunk_get_prev_ncnl(pc);
chunk_t *tmp = chunk_get_prev_ncnnl(pc);
chunk_t *tmp_2;
chunk_t *open_paren;
@ -187,18 +177,18 @@ void tokenize_trailing_return_types(void)
{
// auto max(int a, int b) const -> int;
// auto f11() const -> bool;
tmp = chunk_get_prev_ncnl(tmp);
tmp = chunk_get_prev_ncnnl(tmp);
}
else if (chunk_is_token(tmp, CT_NOEXCEPT))
{
// noexcept is present
tmp_2 = chunk_get_prev_ncnl(tmp);
tmp_2 = chunk_get_prev_ncnnl(tmp);
if (chunk_is_token(tmp_2, CT_QUALIFIER))
{
// auto f12() const noexcept -> bool;
// auto f15() const noexcept -> bool = delete;
tmp = chunk_get_prev_ncnl(tmp_2);
tmp = chunk_get_prev_ncnnl(tmp_2);
}
else
{
@ -210,12 +200,12 @@ void tokenize_trailing_return_types(void)
else if (chunk_is_token(tmp, CT_PAREN_CLOSE))
{
open_paren = chunk_get_prev_type(tmp, CT_PAREN_OPEN, tmp->level);
tmp = chunk_get_prev_ncnl(open_paren);
tmp = chunk_get_prev_ncnnl(open_paren);
if (chunk_is_token(tmp, CT_NOEXCEPT))
{
// noexcept is present
tmp_2 = chunk_get_prev_ncnl(tmp);
tmp_2 = chunk_get_prev_ncnnl(tmp);
if (chunk_is_token(tmp_2, CT_QUALIFIER))
{
@ -223,7 +213,7 @@ void tokenize_trailing_return_types(void)
// auto f14() const noexcept(false) -> bool;
// auto f16() const noexcept(true) -> bool = delete;
// auto f17() const noexcept(false) -> bool = delete;
tmp = chunk_get_prev_ncnl(tmp_2);
tmp = chunk_get_prev_ncnnl(tmp_2);
}
else
{
@ -237,13 +227,13 @@ void tokenize_trailing_return_types(void)
else if (chunk_is_token(tmp, CT_THROW))
{
// throw is present
tmp_2 = chunk_get_prev_ncnl(tmp);
tmp_2 = chunk_get_prev_ncnnl(tmp);
if (chunk_is_token(tmp_2, CT_QUALIFIER))
{
// auto f23() const throw() -> bool;
// auto f24() const throw() -> bool = delete;
tmp = chunk_get_prev_ncnl(tmp_2);
tmp = chunk_get_prev_ncnnl(tmp_2);
}
else
{
@ -263,7 +253,8 @@ void tokenize_trailing_return_types(void)
}
if ( chunk_is_token(tmp, CT_FPAREN_CLOSE)
&& (get_chunk_parent_type(tmp) == CT_FUNC_PROTO || get_chunk_parent_type(tmp) == CT_FUNC_DEF))
&& ( get_chunk_parent_type(tmp) == CT_FUNC_PROTO
|| get_chunk_parent_type(tmp) == CT_FUNC_DEF))
{
set_chunk_type(pc, CT_TRAILING_RET);
LOG_FMT(LNOTE, "%s(%d): set trailing return type for text() is '%s'\n",
@ -290,11 +281,11 @@ void tokenize_cleanup(void)
*/
chunk_t *pc;
for (pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next_ncnl(pc))
for (pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next_ncnnl(pc))
{
if (chunk_is_token(pc, CT_SQUARE_OPEN))
{
next = chunk_get_next_ncnl(pc);
next = chunk_get_next_ncnnl(pc);
if (chunk_is_token(next, CT_SQUARE_CLOSE))
{
@ -313,7 +304,7 @@ void tokenize_cleanup(void)
if ( chunk_is_token(pc, CT_SEMICOLON)
&& pc->flags.test(PCF_IN_PREPROC)
&& !chunk_get_next_ncnl(pc, scope_e::PREPROC))
&& !chunk_get_next_ncnnl(pc, scope_e::PREPROC))
{
LOG_FMT(LNOTE, "%s(%d): %s:%zu Detected a macro that ends with a semicolon. Possible failures if used.\n",
__func__, __LINE__, cpd.filename.c_str(), pc->orig_line);
@ -321,11 +312,11 @@ void tokenize_cleanup(void)
}
// change := to CT_SQL_ASSIGN Issue #527
for (pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next_ncnl(pc))
for (pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next_ncnnl(pc))
{
if (chunk_is_token(pc, CT_COLON))
{
next = chunk_get_next_ncnl(pc);
next = chunk_get_next_ncnnl(pc);
if (chunk_is_token(next, CT_ASSIGN))
{
@ -340,16 +331,19 @@ void tokenize_cleanup(void)
// We can handle everything else in the second pass
pc = chunk_get_head();
next = chunk_get_next_ncnl(pc);
next = chunk_get_next_ncnnl(pc);
while (pc != nullptr && next != nullptr)
while ( pc != nullptr
&& next != nullptr)
{
if (chunk_is_token(pc, CT_DOT) && language_is_set(LANG_ALLC))
if ( chunk_is_token(pc, CT_DOT)
&& language_is_set(LANG_ALLC))
{
set_chunk_type(pc, CT_MEMBER);
}
if (chunk_is_token(pc, CT_NULLCOND) && language_is_set(LANG_CS))
if ( chunk_is_token(pc, CT_NULLCOND)
&& language_is_set(LANG_CS))
{
set_chunk_type(pc, CT_MEMBER);
}
@ -393,13 +387,15 @@ void tokenize_cleanup(void)
* var x = (T)base.y;
*/
if ( chunk_is_token(pc, CT_BASE)
&& (chunk_is_token(next, CT_PAREN_OPEN) || chunk_is_token(next, CT_DOT)))
&& ( chunk_is_token(next, CT_PAREN_OPEN)
|| chunk_is_token(next, CT_DOT)))
{
set_chunk_type(pc, CT_WORD);
}
if ( chunk_is_token(pc, CT_ENUM)
&& (chunk_is_token(next, CT_STRUCT) || chunk_is_token(next, CT_CLASS)))
&& ( chunk_is_token(next, CT_STRUCT)
|| chunk_is_token(next, CT_CLASS)))
{
set_chunk_type(next, CT_ENUM_CLASS);
}
@ -443,9 +439,10 @@ void tokenize_cleanup(void)
else
{
// Something else followed by a open brace
chunk_t *tmp = chunk_get_next_ncnl(next);
chunk_t *tmp = chunk_get_next_ncnnl(next);
if (tmp == nullptr || tmp->type != CT_BRACE_OPEN)
if ( tmp == nullptr
|| tmp->type != CT_BRACE_OPEN)
{
set_chunk_type(pc, CT_QUALIFIER);
}
@ -459,8 +456,11 @@ void tokenize_cleanup(void)
* CT_WORD which is preceded by CT_DC_MEMBER: '::aaa *b'
*/
if ( (chunk_is_token(next, CT_STAR))
|| (language_is_set(LANG_CPP) && (chunk_is_token(next, CT_CARET)))
|| (language_is_set(LANG_CS) && (chunk_is_token(next, CT_QUESTION)) && (strcmp(pc->text(), "null") != 0)))
|| ( language_is_set(LANG_CPP)
&& (chunk_is_token(next, CT_CARET)))
|| ( language_is_set(LANG_CS)
&& (chunk_is_token(next, CT_QUESTION))
&& (strcmp(pc->text(), "null") != 0)))
{
if ( chunk_is_token(pc, CT_TYPE)
|| chunk_is_token(pc, CT_QUALIFIER)
@ -558,7 +558,7 @@ void tokenize_cleanup(void)
pc->orig_col = prev->orig_col;
pc->orig_line = prev->orig_line;
chunk_t *to_be_deleted = prev;
prev = chunk_get_prev_ncnl(prev);
prev = chunk_get_prev_ncnnl(prev);
if (prev != nullptr)
{
@ -573,7 +573,23 @@ void tokenize_cleanup(void)
if ( chunk_is_token(pc, CT_WORD)
&& chunk_is_token(next, CT_DC_MEMBER))
{
set_chunk_type(pc, CT_TYPE);
prev = chunk_get_prev(pc);
if (prev == nullptr) // Issue #3010
{
set_chunk_type(pc, CT_TYPE);
}
else
{
if (chunk_is_token(prev, CT_COLON))
{
// nothing to do
}
else
{
set_chunk_type(pc, CT_TYPE);
}
}
}
// Set parent type for 'if constexpr'
@ -733,7 +749,8 @@ void tokenize_cleanup(void)
if (chunk_is_token(pc, CT_ACCESS))
{
// Handle Qt slots - maybe should just check for a CT_WORD?
if (chunk_is_str(next, "slots", 5) || chunk_is_str(next, "Q_SLOTS", 7))
if ( chunk_is_str(next, "slots", 5)
|| chunk_is_str(next, "Q_SLOTS", 7))
{
chunk_t *tmp = chunk_get_next(next);
@ -748,7 +765,7 @@ void tokenize_cleanup(void)
set_chunk_type(next, CT_ACCESS_COLON);
chunk_t *tmp;
if ((tmp = chunk_get_next_ncnl(next)) != nullptr)
if ((tmp = chunk_get_next_ncnnl(next)) != nullptr)
{
chunk_flags_set(tmp, PCF_STMT_START | PCF_EXPR_START);
}
@ -762,11 +779,15 @@ void tokenize_cleanup(void)
}
// Look for <newline> 'EXEC' 'SQL'
if ( (chunk_is_str_case(pc, "EXEC", 4) && chunk_is_str_case(next, "SQL", 3))
|| ( (*pc->str.c_str() == '$') && pc->type != CT_SQL_WORD
if ( ( chunk_is_str_case(pc, "EXEC", 4)
&& chunk_is_str_case(next, "SQL", 3))
|| ( (*pc->str.c_str() == '$')
&& pc->type != CT_SQL_WORD
/* but avoid breaking tokenization for C# 6 interpolated strings. */
&& ( !language_is_set(LANG_CS)
|| ((chunk_is_token(pc, CT_STRING)) && (!pc->str.startswith("$\"")) && (!pc->str.startswith("$@\""))))))
|| ( chunk_is_token(pc, CT_STRING)
&& (!pc->str.startswith("$\""))
&& (!pc->str.startswith("$@\""))))))
{
chunk_t *tmp = chunk_get_prev(pc);
@ -823,7 +844,7 @@ void tokenize_cleanup(void)
{
set_chunk_type(tmp, CT_SQL_WORD);
}
tmp = chunk_get_next_ncnl(tmp);
tmp = chunk_get_next_ncnnl(tmp);
}
}
}
@ -838,21 +859,22 @@ void tokenize_cleanup(void)
pc->str += next->str;
pc->orig_col_end = next->orig_col_end;
chunk_del(next);
next = chunk_get_next_ncnl(pc);
next = chunk_get_next_ncnnl(pc);
// label the 'in'
if (chunk_is_token(next, CT_PAREN_OPEN))
{
chunk_t *tmp = chunk_get_next_ncnl(next);
chunk_t *tmp = chunk_get_next_ncnnl(next);
while (tmp && tmp->type != CT_PAREN_CLOSE)
while ( tmp != nullptr
&& tmp->type != CT_PAREN_CLOSE)
{
if (chunk_is_str(tmp, "in", 2))
{
set_chunk_type(tmp, CT_IN);
break;
}
tmp = chunk_get_next_ncnl(tmp);
tmp = chunk_get_next_ncnnl(tmp);
}
}
}
@ -879,8 +901,10 @@ void tokenize_cleanup(void)
}
// Fix self keyword back to word when mixing c++/objective-c
if ( chunk_is_token(pc, CT_THIS) && !strcmp(pc->text(), "self")
&& (chunk_is_token(next, CT_COMMA) || chunk_is_token(next, CT_PAREN_CLOSE)))
if ( chunk_is_token(pc, CT_THIS)
&& !strcmp(pc->text(), "self")
&& ( chunk_is_token(next, CT_COMMA)
|| chunk_is_token(next, CT_PAREN_CLOSE)))
{
set_chunk_type(pc, CT_WORD);
}
@ -888,7 +912,8 @@ void tokenize_cleanup(void)
// Fix self keyword back to word when mixing c++/objective-c
if ( chunk_is_token(pc, CT_THIS)
&& !strcmp(pc->text(), "self")
&& (chunk_is_token(next, CT_COMMA) || chunk_is_token(next, CT_PAREN_CLOSE)))
&& ( chunk_is_token(next, CT_COMMA)
|| chunk_is_token(next, CT_PAREN_CLOSE)))
{
set_chunk_type(pc, CT_WORD);
}
@ -896,7 +921,10 @@ void tokenize_cleanup(void)
// Another hack to clean up more keyword abuse
if ( chunk_is_token(pc, CT_CLASS)
&& (chunk_is_token(prev, CT_DOT) || chunk_is_token(next, CT_DOT)))
&& ( chunk_is_token(prev, CT_DOT)
|| chunk_is_token(next, CT_DOT)
|| chunk_is_token(prev, CT_MEMBER) // Issue #3031
|| chunk_is_token(next, CT_MEMBER)))
{
set_chunk_type(pc, CT_WORD);
}
@ -912,7 +940,7 @@ void tokenize_cleanup(void)
}
set_chunk_parent(next, pc->type);
chunk_t *tmp = chunk_get_next_ncnl(next);
chunk_t *tmp = chunk_get_next_ncnnl(next);
if (tmp != nullptr)
{
@ -928,9 +956,10 @@ void tokenize_cleanup(void)
if (chunk_is_token(pc, CT_OC_INTF))
{
chunk_t *tmp = chunk_get_next_ncnl(pc, scope_e::PREPROC);
chunk_t *tmp = chunk_get_next_ncnnl(pc, scope_e::PREPROC);
while (tmp != nullptr && tmp->type != CT_OC_END)
while ( tmp != nullptr
&& tmp->type != CT_OC_END)
{
if (get_token_pattern_class(tmp->type) != pattern_class_e::NONE)
{
@ -939,7 +968,7 @@ void tokenize_cleanup(void)
get_token_name(tmp->type));
set_chunk_type(tmp, CT_WORD);
}
tmp = chunk_get_next_ncnl(tmp, scope_e::PREPROC);
tmp = chunk_get_next_ncnnl(tmp, scope_e::PREPROC);
}
}
@ -959,7 +988,8 @@ void tokenize_cleanup(void)
chunk_t *tmp = chunk_get_next(next);
if (tmp != nullptr && tmp->next != nullptr)
if ( tmp != nullptr
&& tmp->next != nullptr)
{
if (chunk_is_token(tmp, CT_PAREN_CLOSE))
{
@ -1015,7 +1045,7 @@ void tokenize_cleanup(void)
set_chunk_type(tmp, CT_OC_SEL_NAME);
set_chunk_parent(tmp, pc->type);
while ((tmp = chunk_get_next_ncnl(tmp)) != nullptr)
while ((tmp = chunk_get_next_ncnnl(tmp)) != nullptr)
{
if (chunk_is_token(tmp, CT_PAREN_CLOSE))
{
@ -1056,13 +1086,15 @@ void tokenize_cleanup(void)
set_chunk_type(pc, CT_SIZEOF);
}
if (chunk_is_token(pc, CT_UNSAFE) && next->type != CT_BRACE_OPEN)
if ( chunk_is_token(pc, CT_UNSAFE)
&& next->type != CT_BRACE_OPEN)
{
set_chunk_type(pc, CT_QUALIFIER);
}
if ( ( chunk_is_token(pc, CT_USING)
|| (chunk_is_token(pc, CT_TRY) && language_is_set(LANG_JAVA)))
|| ( chunk_is_token(pc, CT_TRY)
&& language_is_set(LANG_JAVA)))
&& chunk_is_token(next, CT_PAREN_OPEN))
{
set_chunk_type(pc, CT_USING_STMT);
@ -1115,17 +1147,33 @@ void tokenize_cleanup(void)
prev = pc;
pc = next;
next = chunk_get_next_ncnl(pc);
next = chunk_get_next_ncnnl(pc);
}
} // tokenize_cleanup
bool invalid_open_angle_template(chunk_t *prev)
{
if (prev == nullptr)
{
return(false);
}
// A template requires a word/type right before the open angle
return( prev->type != CT_WORD
&& prev->type != CT_TYPE
&& prev->type != CT_COMMA
&& prev->type != CT_QUALIFIER
&& prev->type != CT_OPERATOR_VAL
&& get_chunk_parent_type(prev) != CT_OPERATOR);
}
static void check_template(chunk_t *start, bool in_type_cast)
{
LOG_FMT(LTEMPL, "%s(%d): orig_line %zu, orig_col %zu:\n",
__func__, __LINE__, start->orig_line, start->orig_col);
chunk_t *prev = chunk_get_prev_ncnl(start, scope_e::PREPROC);
chunk_t *prev = chunk_get_prev_ncnnl(start, scope_e::PREPROC);
if (prev == nullptr)
{
@ -1142,14 +1190,15 @@ static void check_template(chunk_t *start, bool in_type_cast)
size_t level = 1;
size_t parens = 0;
for (pc = chunk_get_next_ncnl(start, scope_e::PREPROC);
for (pc = chunk_get_next_ncnnl(start, scope_e::PREPROC);
pc != nullptr;
pc = chunk_get_next_ncnl(pc, scope_e::PREPROC))
pc = chunk_get_next_ncnnl(pc, scope_e::PREPROC))
{
LOG_FMT(LTEMPL, "%s(%d): type is %s, level is %zu\n",
__func__, __LINE__, get_token_name(pc->type), level);
if ((pc->str[0] == '>') && (pc->len() > 1))
if ( (pc->str[0] == '>')
&& (pc->len() > 1))
{
if (pc->str[1] == '=') // Issue #1462 and #2565
{
@ -1227,13 +1276,7 @@ static void check_template(chunk_t *start, bool in_type_cast)
* then it isn't a template.
*/
// A template requires a word/type right before the open angle
if ( prev->type != CT_WORD
&& prev->type != CT_TYPE
&& prev->type != CT_COMMA
&& prev->type != CT_QUALIFIER
&& prev->type != CT_OPERATOR_VAL
&& get_chunk_parent_type(prev) != CT_OPERATOR)
if (invalid_open_angle_template(prev))
{
LOG_FMT(LTEMPL, "%s(%d): - after type %s + ( - Not a template\n",
__func__, __LINE__, get_token_name(prev->type));
@ -1248,9 +1291,10 @@ static void check_template(chunk_t *start, bool in_type_cast)
bool hit_semicolon = false;
pc = start;
while ((pc = chunk_get_prev_ncnl(pc, scope_e::PREPROC)) != nullptr)
while ((pc = chunk_get_prev_ncnnl(pc, scope_e::PREPROC)) != nullptr)
{
if ( (chunk_is_token(pc, CT_SEMICOLON) && hit_semicolon)
if ( ( chunk_is_token(pc, CT_SEMICOLON)
&& hit_semicolon)
|| chunk_is_token(pc, CT_SQUARE_CLOSE))
{
break;
@ -1278,16 +1322,19 @@ static void check_template(chunk_t *start, bool in_type_cast)
break;
}
if (chunk_is_token(pc, CT_SEMICOLON) && !hit_semicolon)
if ( chunk_is_token(pc, CT_SEMICOLON)
&& !hit_semicolon)
{
hit_semicolon = true;
}
if ( (( chunk_is_token(pc, CT_IF)
|| chunk_is_token(pc, CT_RETURN)
|| chunk_is_token(pc, CT_WHILE)
|| chunk_is_token(pc, CT_WHILE_OF_DO)) && hit_semicolon == false)
|| (chunk_is_token(pc, CT_FOR) && hit_semicolon == true))
if ( ( ( chunk_is_token(pc, CT_IF)
|| chunk_is_token(pc, CT_RETURN)
|| chunk_is_token(pc, CT_WHILE)
|| chunk_is_token(pc, CT_WHILE_OF_DO))
&& !hit_semicolon)
|| ( chunk_is_token(pc, CT_FOR)
&& hit_semicolon))
{
in_if = true;
break;
@ -1303,21 +1350,35 @@ static void check_template(chunk_t *start, bool in_type_cast)
tokens[0] = CT_ANGLE_OPEN;
for (pc = chunk_get_next_ncnl(start, scope_e::PREPROC);
for (pc = chunk_get_next_ncnnl(start, scope_e::PREPROC);
pc != nullptr;
pc = chunk_get_next_ncnl(pc, scope_e::PREPROC))
pc = chunk_get_next_ncnnl(pc, scope_e::PREPROC))
{
LOG_FMT(LTEMPL, "%s(%d): type is %s, num_tokens is %zu\n",
__func__, __LINE__, get_token_name(pc->type), num_tokens);
constexpr static auto LCURRENT = LTEMPL;
LOG_FMT(LTEMPL, "%s(%d): pc->orig_line is %zu, pc->orig_col is %zu, type is %s, num_tokens is %zu\n",
__func__, __LINE__, pc->orig_line, pc->orig_col, get_token_name(pc->type), num_tokens);
log_rule_B("tok_split_gte");
if (chunk_is_token(pc, CT_BRACE_OPEN)) // Issue #2886
{
// look for the closing brace
chunk_t *A = chunk_skip_to_match(pc);
LOG_FMT(LTEMPL, "%s(%d): A->orig_line is %zu, A->orig_col is %zu, type is %s\n",
__func__, __LINE__, A->orig_line, A->orig_col, get_token_name(A->type));
pc = chunk_get_next(A);
}
if ( (tokens[num_tokens - 1] == CT_ANGLE_OPEN)
&& (pc->str[0] == '>')
&& (pc->len() > 1)
&& ( options::tok_split_gte()
|| ( (chunk_is_str(pc, ">>", 2) || chunk_is_str(pc, ">>>", 3))
&& (num_tokens >= 2 || (num_tokens >= 1 && in_type_cast)))))
|| ( ( chunk_is_str(pc, ">>", 2)
|| chunk_is_str(pc, ">>>", 3))
&& ( num_tokens >= 2
|| ( num_tokens >= 1
&& in_type_cast)))))
{
LOG_FMT(LTEMPL, "%s(%d): {split '%s' at orig_line %zu, orig_col %zu}\n",
__func__, __LINE__, pc->text(), pc->orig_line, pc->orig_col);
@ -1327,8 +1388,16 @@ static void check_template(chunk_t *start, bool in_type_cast)
if (chunk_is_str(pc, "<", 1))
{
tokens[num_tokens] = CT_ANGLE_OPEN;
num_tokens++;
if ( num_tokens > 0 && (tokens[num_tokens - 1] == CT_PAREN_OPEN)
&& invalid_open_angle_template(pc->prev))
{
set_chunk_type(pc, CT_COMPARE); // Issue #3127
}
else
{
tokens[num_tokens] = CT_ANGLE_OPEN;
num_tokens++;
}
}
else if (chunk_is_str(pc, ">", 1))
{
@ -1346,7 +1415,8 @@ static void check_template(chunk_t *start, bool in_type_cast)
}
}
else if ( in_if
&& (chunk_is_token(pc, CT_BOOL) || chunk_is_token(pc, CT_COMPARE)))
&& ( chunk_is_token(pc, CT_BOOL)
|| chunk_is_token(pc, CT_COMPARE)))
{
break;
}
@ -1357,7 +1427,7 @@ static void check_template(chunk_t *start, bool in_type_cast)
{
break;
}
auto brace_open = chunk_get_next_ncnl(pc);
auto brace_open = chunk_get_next_ncnnl(pc);
auto brace_close = chunk_skip_to_match(brace_open);
set_chunk_parent(brace_open, CT_BRACED_INIT_LIST);
@ -1410,9 +1480,10 @@ static void check_template(chunk_t *start, bool in_type_cast)
if (chunk_is_token(end, CT_ANGLE_CLOSE))
{
pc = chunk_get_next_ncnl(end, scope_e::PREPROC);
pc = chunk_get_next_ncnnl(end, scope_e::PREPROC);
if (pc == nullptr || pc->type != CT_NUMBER)
if ( pc == nullptr
|| pc->type != CT_NUMBER)
{
LOG_FMT(LTEMPL, "%s(%d): Template detected\n", __func__, __LINE__);
LOG_FMT(LTEMPL, "%s(%d): from orig_line %zu, orig_col %zu\n",
@ -1429,7 +1500,7 @@ static void check_template(chunk_t *start, bool in_type_cast)
}
}
LOG_FMT(LTEMPL, "%s(%d): - Not a template: end = %s\n",
__func__, __LINE__, (end != NULL) ? get_token_name(end->type) : "<null>");
__func__, __LINE__, (end != nullptr) ? get_token_name(end->type) : "<null>");
set_chunk_type(start, CT_COMPARE);
} // check_template
@ -1457,11 +1528,12 @@ static void check_template_arg(chunk_t *start, chunk_t *end)
while (pc != end)
{
chunk_t *next = chunk_get_next_ncnl(pc, scope_e::PREPROC);
chunk_t *next = chunk_get_next_ncnnl(pc, scope_e::PREPROC);
// a test "if (next == nullptr)" is not necessary
chunk_flags_set(pc, PCF_IN_TEMPLATE);
if (chunk_is_token(pc, CT_DECLTYPE) || chunk_is_token(pc, CT_SIZEOF))
if ( chunk_is_token(pc, CT_DECLTYPE)
|| chunk_is_token(pc, CT_SIZEOF))
{
expressionIsNumeric = true;
break;
@ -1489,7 +1561,7 @@ static void check_template_arg(chunk_t *start, chunk_t *end)
while (pc != end)
{
chunk_t *next = chunk_get_next_ncnl(pc, scope_e::PREPROC);
chunk_t *next = chunk_get_next_ncnnl(pc, scope_e::PREPROC);
// a test "if (next == nullptr)" is not necessary
chunk_flags_set(pc, PCF_IN_TEMPLATE);
@ -1510,9 +1582,9 @@ static void check_template_args(chunk_t *start, chunk_t *end)
// Scan for commas
chunk_t *pc;
for (pc = chunk_get_next_ncnl(start, scope_e::PREPROC);
for (pc = chunk_get_next_ncnnl(start, scope_e::PREPROC);
pc != nullptr && pc != end;
pc = chunk_get_next_ncnl(pc, scope_e::PREPROC))
pc = chunk_get_next_ncnnl(pc, scope_e::PREPROC))
{
switch (pc->type)
{
@ -1533,7 +1605,8 @@ static void check_template_args(chunk_t *start, chunk_t *end)
case CT_ANGLE_CLOSE:
if (!tokens.empty() && tokens.back() == CT_ANGLE_OPEN)
if ( !tokens.empty()
&& tokens.back() == CT_ANGLE_OPEN)
{
tokens.pop_back();
}
@ -1541,7 +1614,8 @@ static void check_template_args(chunk_t *start, chunk_t *end)
case CT_PAREN_CLOSE:
if (!tokens.empty() && tokens.back() == CT_PAREN_OPEN)
if ( !tokens.empty()
&& tokens.back() == CT_PAREN_OPEN)
{
tokens.pop_back();
}
@ -1563,7 +1637,7 @@ static void cleanup_objc_property(chunk_t *start)
chunk_t *open_paren = chunk_get_next_type(start, CT_PAREN_OPEN, start->level);
if (!open_paren)
if (open_paren == nullptr)
{
LOG_FMT(LTEMPL, "%s(%d): Property is not followed by openning paren\n", __func__, __LINE__);
return;
@ -1572,18 +1646,18 @@ static void cleanup_objc_property(chunk_t *start)
chunk_t *tmp = chunk_get_next_type(start, CT_PAREN_CLOSE, start->level);
if (tmp != NULL)
if (tmp != nullptr)
{
set_chunk_parent(tmp, start->type);
tmp = chunk_get_next_ncnl(tmp);
tmp = chunk_get_next_ncnnl(tmp);
if (tmp != NULL)
if (tmp != nullptr)
{
chunk_flags_set(tmp, PCF_STMT_START | PCF_EXPR_START);
tmp = chunk_get_next_type(tmp, CT_SEMICOLON, start->level);
if (tmp != NULL)
if (tmp != nullptr)
{
set_chunk_parent(tmp, start->type);
}
@ -1600,18 +1674,21 @@ static void mark_selectors_in_property_with_open_paren(chunk_t *open_paren)
chunk_t *tmp = open_paren;
while (tmp && tmp->type != CT_PAREN_CLOSE)
while ( tmp != nullptr
&& tmp->type != CT_PAREN_CLOSE)
{
if ( chunk_is_token(tmp, CT_WORD)
&& (chunk_is_str(tmp, "setter", 6) || chunk_is_str(tmp, "getter", 6)))
&& ( chunk_is_str(tmp, "setter", 6)
|| chunk_is_str(tmp, "getter", 6)))
{
tmp = tmp->next;
while ( tmp
while ( tmp != nullptr
&& tmp->type != CT_COMMA
&& tmp->type != CT_PAREN_CLOSE)
{
if (chunk_is_token(tmp, CT_WORD) || chunk_is_str(tmp, ":", 1))
if ( chunk_is_token(tmp, CT_WORD)
|| chunk_is_str(tmp, ":", 1))
{
set_chunk_type(tmp, CT_OC_SEL_NAME);
}
@ -1632,10 +1709,13 @@ static void mark_attributes_in_property_with_open_paren(chunk_t *open_paren)
chunk_t *tmp = open_paren;
while (tmp && tmp->type != CT_PAREN_CLOSE)
while ( tmp != nullptr
&& tmp->type != CT_PAREN_CLOSE)
{
if ( (chunk_is_token(tmp, CT_COMMA) || chunk_is_token(tmp, CT_PAREN_OPEN))
&& (chunk_is_token(tmp->next, CT_WORD) || chunk_is_token(tmp->next, CT_TYPE)))
if ( ( chunk_is_token(tmp, CT_COMMA)
|| chunk_is_token(tmp, CT_PAREN_OPEN))
&& ( chunk_is_token(tmp->next, CT_WORD)
|| chunk_is_token(tmp->next, CT_TYPE)))
{
set_chunk_type(tmp->next, CT_OC_PROPERTY_ATTR);
}

@ -8,20 +8,26 @@
* @author Ben Gardner
* @license GPL v2+
*/
#ifndef UNC_CTYPE_H_INCLUDED
#define UNC_CTYPE_H_INCLUDED
#include "options.h"
#include <cctype>
#include <cctype> // to get std::tolower
// TODO: better avoid inline and move implementation to cpp file
//! Truncate anything except EOF (-1) to 0-255
//! Test anything EOF (-1) to 0-255
static inline int unc_fix_ctype(int ch)
{
return((ch == -1) ? -1 : (ch & 0xff));
if ( ch >= -1
&& ch <= 255)
{
return(ch);
}
return(0); // Issue #3025
}

@ -533,7 +533,9 @@ void unc_text::append(int ch)
{
m_logtext.pop_back();
if (ch < 0x80 && ch != '\n' && ch != '\r')
if ( ch < 0x80
&& ch != '\n'
&& ch != '\r')
{
m_logtext.push_back(ch);
}
@ -595,7 +597,10 @@ bool unc_text::startswith(const char *text, size_t idx) const
{
const auto orig_idx = idx;
for ( ; idx < size() && *text; idx++, text++)
for ( ;
( idx < size()
&& *text);
idx++, text++)
{
if (*text != m_chars[idx])
{
@ -603,7 +608,8 @@ bool unc_text::startswith(const char *text, size_t idx) const
}
}
return(idx != orig_idx && (*text == 0));
return( idx != orig_idx
&& (*text == 0));
}
@ -612,7 +618,10 @@ bool unc_text::startswith(const unc_text &text, size_t idx) const
size_t si = 0;
const auto orig_idx = idx;
for ( ; idx < size() && si < text.size(); idx++, si++)
for ( ;
( idx < size()
&& si < text.size());
idx++, si++)
{
if (text.m_chars[si] != m_chars[idx])
{
@ -620,7 +629,8 @@ bool unc_text::startswith(const unc_text &text, size_t idx) const
}
}
return(idx != orig_idx && (si == text.size()));
return( idx != orig_idx
&& (si == text.size()));
}

@ -3,7 +3,7 @@
* This file contains lot of tools for debugging
*
* @author Guy Maurel
* October 2015- 2020
* October 2015- 2021
* @license GPL v2+
*/
@ -11,7 +11,6 @@
#include "args.h"
#include "output.h"
#include "uncrustify.h"
/*
@ -109,8 +108,9 @@ void prot_the_line_pc(chunk_t *pc_sub, const char *func_name, int theLine, unsig
{
LOG_FMT(LGUY, "text() '%s', ", pc->text());
}
LOG_FMT(LGUY, " column is %zu, type is %s, parent_type is %s, orig_col is %zu,",
pc->column, get_token_name(pc->type), get_token_name(get_chunk_parent_type(pc)), pc->orig_col);
LOG_FMT(LGUY, " column is %zu, pp_level is %zu, type is %s, parent_type is %s, orig_col is %zu,",
pc->column, pc->pp_level, get_token_name(pc->type),
get_token_name(get_chunk_parent_type(pc)), pc->orig_col);
if (chunk_is_token(pc, CT_IGNORED))
{
@ -121,13 +121,79 @@ void prot_the_line_pc(chunk_t *pc_sub, const char *func_name, int theLine, unsig
LOG_FMT(LGUY, " pc->flags: ");
log_pcf_flags(LGUY, pc->flags);
}
//LOG_FMT(LALAGAIN, " align.right_align is %s\n", pc->align.right_align ? "TRUE" : "FALSE");
if (pc->tracking != nullptr)
{
LOG_FMT(LGUY, " Tracking info are: \n");
LOG_FMT(LGUY, " number of track(s) %zu\n", pc->tracking->size());
for (size_t track = 0; track < pc->tracking->size(); track++)
{
track_list *A = pc->tracking;
Track_nr B = A->at(track);
size_t Bfirst = B.first;
char *Bsecond = B.second;
LOG_FMT(LGUY, " %zu, tracking number is %zu\n", track, Bfirst);
LOG_FMT(LGUY, " %zu, rule is %s\n", track, Bsecond);
}
}
}
}
}
LOG_FMT(LGUY, "\n");
} // prot_the_line
} // prot_the_line_pc
void prot_all_lines(const char *func_name, int theLine)
{
counter++;
tokenCounter = 0;
size_t lineNumber = 1;
LOG_FMT(LGUY, "Prot_all_lines:(%s:%d)(%zu)\n", func_name, theLine, counter);
for (chunk_t *pc = chunk_get_head(); pc != nullptr; pc = pc->next)
{
tokenCounter++;
LOG_FMT(LGUY, " orig_line is %zu,%zu, pp_level is %zu, ", lineNumber, tokenCounter, pc->pp_level);
if (chunk_is_token(pc, CT_VBRACE_OPEN))
{
LOG_FMT(LGUY, "<VBRACE_OPEN>, ");
}
else if (chunk_is_token(pc, CT_NEWLINE))
{
LOG_FMT(LGUY, "<NL>(nl_count is %zu), ", pc->nl_count);
tokenCounter = 0;
lineNumber = lineNumber + pc->nl_count;
}
else if (chunk_is_token(pc, CT_VBRACE_CLOSE))
{
LOG_FMT(LGUY, "<CT_VBRACE_CLOSE>, ");
}
else if (chunk_is_token(pc, CT_VBRACE_OPEN))
{
LOG_FMT(LGUY, "<CT_VBRACE_OPEN>, ");
}
else if (chunk_is_token(pc, CT_SPACE))
{
LOG_FMT(LGUY, "<CT_SPACE>, ");
}
else if (chunk_is_token(pc, CT_IGNORED))
{
LOG_FMT(LGUY, "<IGNORED> ");
}
else
{
LOG_FMT(LGUY, "text() '%s', ", pc->text());
}
LOG_FMT(LGUY, " column is %zu, type is %s\n",
pc->column, get_token_name(pc->type));
}
} // prot_all_lines
void prot_the_source(int theLine)
@ -152,7 +218,8 @@ void examine_Data(const char *func_name, int theLine, int what)
for (pc = chunk_get_head(); pc != nullptr; pc = pc->next)
{
if (chunk_is_token(pc, CT_SQUARE_CLOSE) || chunk_is_token(pc, CT_TSQUARE))
if ( chunk_is_token(pc, CT_SQUARE_CLOSE)
|| chunk_is_token(pc, CT_TSQUARE))
{
LOG_FMT(LGUY, "\n");
LOG_FMT(LGUY, "1:(%d),", theLine);

@ -2,16 +2,14 @@
* @file unc_tools.h
*
* @author Guy Maurel
* October 2015, 2016, 2017, 2018, 2019
* October 2015, 2016, 2017, 2018, 2019, 2020, 2021
* @license GPL v2+
*/
#ifndef UNC_TOOLS_H_INCLUDED
#define UNC_TOOLS_H_INCLUDED
#include "chunk_list.h"
#include "prototypes.h"
#include "uncrustify_types.h"
#if defined DEBUG
#define PROT_THE_LINE prot_the_line(__func__, __LINE__, 0, 0);
@ -26,6 +24,9 @@ void prot_the_line(const char *func_name, int theLine, unsigned int actual_line,
void prot_the_line_pc(chunk_t *pc_sub, const char *func_name, int theLine, unsigned int actual_line, size_t partNumber);
void prot_all_lines(const char *func_name, int theLine);
void prot_the_source(int theLine);

@ -18,7 +18,6 @@
#include "backup.h"
#include "brace_cleanup.h"
#include "braces.h"
#include "chunk_list.h"
#include "combine.h"
#include "compat.h"
#include "detect.h"
@ -26,41 +25,26 @@
#include "indent.h"
#include "keywords.h"
#include "lang_pawn.h"
#include "language_tools.h"
#include "log_levels.h"
#include "log_rules.h"
#include "logger.h"
#include "md5.h"
#include "newlines.h"
#include "options.h"
#include "output.h"
#include "parens.h"
#include "pcf_flags.h"
#include "prototypes.h"
#include "parent_for_pp.h"
#include "remove_extra_returns.h"
#include "semicolons.h"
#include "sorting.h"
#include "space.h"
#include "token_enum.h"
#include "token_names.h"
#include "tokenize.h"
#include "tokenize_cleanup.h"
#include "unc_ctype.h"
#include "unc_tools.h"
#include "uncrustify_types.h"
#include "uncrustify_version.h"
#include "unicode.h"
#include "universalindentgui.h"
#include "width.h"
#include <cerrno>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fcntl.h>
#include <map>
#include <vector>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@ -90,6 +74,7 @@
#define NODISCARD
#endif
constexpr static auto LCURRENT = LUNC;
using namespace std;
using namespace uncrustify;
@ -201,7 +186,8 @@ const char *path_basename(const char *path)
path++;
// Check both slash types to support Linux and Windows
if ((ch == '/') || (ch == '\\'))
if ( (ch == '/')
|| (ch == '\\'))
{
last_path = path;
}
@ -300,13 +286,13 @@ void usage(const char *argv0)
" --set <option>=<value> : Sets a new value to a config option.\n"
"\n"
"Debug Options:\n"
" -p FILE : Dump debug info into FILE, or to stdout if FILE is set to '-'.\n"
" Must be used in combination with '-f FILE'.\n"
" --debug-csv-format : Dump debug info to file in csv-delimited format.\n"
" Must be used in combination with '-p FILE', where FILE is not set to '-'\n"
" -L SEV : Set the log severity (see log_levels.h; note 'A' = 'all')\n"
" -s : Show the log severity in the logs.\n"
" --decode : Decode remaining args (chunk flags) and exit.\n"
" -p FILE : Dump debug info into FILE, or to stdout if FILE is set to '-'.\n"
" Must be used in combination with '-f FILE'\n"
" -L SEV : Set the log severity (see log_levels.h; note 'A' = 'all')\n"
" -s : Show the log severity in the logs.\n"
" --decode : Decode remaining args (chunk flags) and exit.\n"
" --tracking_space FILE : Prepare tracking informations for debugging.\n"
" Cannot be used with the -o option'\n"
"\n"
"Usage Examples\n"
"cat foo.d | uncrustify -q -c my.cfg -l d\n"
@ -457,7 +443,8 @@ int main(int argc, char *argv[])
Args arg(argc, argv);
if (arg.Present("--version") || arg.Present("-v"))
if ( arg.Present("--version")
|| arg.Present("-v"))
{
version_exit();
}
@ -555,7 +542,8 @@ int main(int argc, char *argv[])
if ( ((parsed_file = arg.Param("--parsed")) != nullptr)
|| ((parsed_file = arg.Param("-p")) != nullptr))
{
if (parsed_file[0] == '-' && !parsed_file[1])
if ( parsed_file[0] == '-'
&& !parsed_file[1])
{
LOG_FMT(LNOTE, "Will print parsed data to stdout\n");
}
@ -566,7 +554,8 @@ int main(int argc, char *argv[])
}
// Enable log severities
if (arg.Present("-s") || arg.Present("--show"))
if ( arg.Present("-s")
|| arg.Present("--show"))
{
log_show_sev(true);
}
@ -584,10 +573,12 @@ int main(int argc, char *argv[])
{
add_keyword(p_arg, CT_TYPE);
}
bool arg_l_is_set = false;
// Check for a language override
if ((p_arg = arg.Param("-l")) != nullptr)
{
arg_l_is_set = true;
cpd.lang_flags = language_flags_from_name(p_arg);
if (cpd.lang_flags == 0)
@ -653,19 +644,23 @@ int main(int argc, char *argv[])
// Grab the output override
const char *output_file = arg.Param("-o");
// for debugging tracking
cpd.html_file = arg.Param("--tracking_space");
LOG_FMT(LDATA, "%s\n", UNCRUSTIFY_VERSION);
LOG_FMT(LDATA, "config_file = %s\n", cfg_file.c_str());
LOG_FMT(LDATA, "output_file = %s\n", (output_file != NULL) ? output_file : "null");
LOG_FMT(LDATA, "source_file = %s\n", (source_file != NULL) ? source_file : "null");
LOG_FMT(LDATA, "source_list = %s\n", (source_list != NULL) ? source_list : "null");
LOG_FMT(LDATA, "tracking = %s\n", (cpd.html_file != NULL) ? cpd.html_file : "null");
LOG_FMT(LDATA, "prefix = %s\n", (prefix != NULL) ? prefix : "null");
LOG_FMT(LDATA, "suffix = %s\n", (suffix != NULL) ? suffix : "null");
LOG_FMT(LDATA, "assume = %s\n", (assume != NULL) ? assume : "null");
LOG_FMT(LDATA, "replace = %d\n", replace);
LOG_FMT(LDATA, "no_backup = %d\n", no_backup);
LOG_FMT(LDATA, "detect = %d\n", detect);
LOG_FMT(LDATA, "check = %d\n", cpd.do_check);
LOG_FMT(LDATA, "if_changed = %d\n", cpd.if_changed);
LOG_FMT(LDATA, "replace = %s\n", replace ? "true" : "false");
LOG_FMT(LDATA, "no_backup = %s\n", no_backup ? "true" : "false");
LOG_FMT(LDATA, "detect = %s\n", detect ? "true" : "false");
LOG_FMT(LDATA, "check = %s\n", cpd.do_check ? "true" : "false");
LOG_FMT(LDATA, "if_changed = %s\n", cpd.if_changed ? "true" : "false");
if ( cpd.do_check
&& ( output_file
@ -687,13 +682,15 @@ int main(int argc, char *argv[])
{
if (replace)
{
if (prefix != nullptr || suffix != nullptr)
if ( prefix != nullptr
|| suffix != nullptr)
{
usage_error("Cannot use --replace with --prefix or --suffix");
return(EX_NOINPUT);
}
if (source_file != nullptr || output_file != nullptr)
if ( source_file != nullptr
|| output_file != nullptr)
{
usage_error("Cannot use --replace with -f or -o");
return(EX_NOINPUT);
@ -701,7 +698,8 @@ int main(int argc, char *argv[])
}
else if (!no_backup)
{
if (prefix == nullptr && suffix == nullptr)
if ( prefix == nullptr
&& suffix == nullptr)
{
suffix = ".uncrustify";
}
@ -713,7 +711,8 @@ int main(int argc, char *argv[])
* It is optional for "--universalindent", "--parsed" and "--detect", but
* required for everything else.
*/
if (!cfg_file.empty() && cfg_file[0] != '-')
if ( !cfg_file.empty()
&& cfg_file[0] != '-')
{
cpd.filename = cfg_file;
@ -829,7 +828,8 @@ int main(int argc, char *argv[])
{
file_mem fm;
if (source_file == nullptr || source_list != nullptr)
if ( source_file == nullptr
|| source_list != nullptr)
{
fprintf(stderr, "The --detect option requires a single input file\n");
log_flush(true);
@ -837,7 +837,8 @@ int main(int argc, char *argv[])
}
// Do some simple language detection based on the filename extension
if (!cpd.lang_forced || cpd.lang_flags == 0)
if ( !cpd.lang_forced
|| cpd.lang_flags == 0)
{
cpd.lang_flags = language_flags_from_filename(source_file);
}
@ -861,7 +862,8 @@ int main(int argc, char *argv[])
return(EXIT_SUCCESS);
}
if (update_config || update_config_wd)
if ( update_config
|| update_config_wd)
{
// TODO: complain if file-processing related options are present
if (auto error = redir_stdout(output_file))
@ -876,7 +878,8 @@ int main(int argc, char *argv[])
* Everything beyond this point aside from dumping the parse tree is silly
* without a config file, so complain and bail if we don't have one.
*/
if (cfg_file.empty() && !parsed_file)
if ( cfg_file.empty()
&& !parsed_file)
{
usage_error("Specify the config file with '-c file' or set UNCRUSTIFY_CONFIG");
return(EX_IOERR);
@ -888,7 +891,8 @@ int main(int argc, char *argv[])
p_arg = arg.Unused(idx);
// Check args - for multifile options
if (source_list != nullptr || p_arg != nullptr)
if ( source_list != nullptr
|| p_arg != nullptr)
{
if (source_file != nullptr)
{
@ -905,16 +909,27 @@ int main(int argc, char *argv[])
// This relies on cpd.filename being the config file name
load_header_files();
if (cpd.do_check || cpd.if_changed)
if ( cpd.do_check
|| cpd.if_changed)
{
cpd.bout = new deque<UINT8>();
}
idx = 1;
if ( source_file == nullptr
&& source_list == nullptr
&& p_arg == nullptr)
&& arg.Unused(idx) == nullptr)
{
// no input specified, so use stdin
if (!arg_l_is_set) // Issue #3064
{
if (assume == nullptr)
{
LOG_FMT(LERR, "If reading from stdin, you should specify the language using -l\n");
LOG_FMT(LERR, "or specify a filename using --assume for automatic language detection.\n");
return(EXIT_FAILURE);
}
}
if (cpd.lang_flags == 0)
{
if (assume != nullptr)
@ -998,7 +1013,8 @@ int main(int argc, char *argv[])
return(EXIT_FAILURE);
}
if (cpd.do_check && cpd.check_fail_cnt != 0)
if ( cpd.do_check
&& cpd.check_fail_cnt != 0)
{
return(EXIT_FAILURE);
}
@ -1010,7 +1026,7 @@ static void process_source_list(const char *source_list,
const char *prefix, const char *suffix,
bool no_backup, bool keep_mtime)
{
int from_stdin = strcmp(source_list, "-") == 0;
bool from_stdin = strcmp(source_list, "-") == 0;
FILE *p_file = from_stdin ? stdin : fopen(source_list, "r");
if (p_file == nullptr)
@ -1029,13 +1045,15 @@ static void process_source_list(const char *source_list,
char *fname = linebuf;
int len = strlen(fname);
while (len > 0 && unc_isspace(*fname))
while ( len > 0
&& unc_isspace(*fname))
{
fname++;
len--;
}
while (len > 0 && unc_isspace(fname[len - 1]))
while ( len > 0
&& unc_isspace(fname[len - 1]))
{
len--;
}
@ -1104,13 +1122,15 @@ static void make_folders(const string &filename)
for (int idx = 0; outname[idx] != 0; idx++)
{
if ((outname[idx] == '/') || (outname[idx] == '\\'))
if ( (outname[idx] == '/')
|| (outname[idx] == '\\'))
{
outname[idx] = PATH_SEP;
}
// search until end of subpath is found
if (idx > last_idx && (outname[idx] == PATH_SEP))
if ( idx > last_idx
&& (outname[idx] == PATH_SEP))
{
outname[idx] = 0; // mark the end of the subpath
@ -1118,12 +1138,15 @@ static void make_folders(const string &filename)
// and not a Windows drive letter
if ( (strcmp(&outname[last_idx], ".") != 0)
&& (strcmp(&outname[last_idx], "..") != 0)
&& (!(last_idx == 0 && idx == 2 && outname[1] == ':')))
&& (!( last_idx == 0
&& idx == 2
&& outname[1] == ':')))
{
int status; // Coverity CID 75999
status = mkdir(outname, 0750);
if (status != 0 && errno != EEXIST)
if ( status != 0
&& errno != EEXIST)
{
LOG_FMT(LERR, "%s: Unable to create %s: %s (%d)\n",
__func__, outname, strerror(errno), errno);
@ -1273,6 +1296,13 @@ int load_header_files()
retval |= load_mem_file_config(options::cmt_insert_oc_msg_header(),
cpd.oc_msg_hdr);
}
log_rule_B("cmt_reflow_fold_regex_file");
if (!options::cmt_reflow_fold_regex_file().empty())
{
retval |= load_mem_file_config(options::cmt_reflow_fold_regex_file(),
cpd.reflow_fold_regex);
}
return(retval);
} // load_header_files
@ -1326,7 +1356,8 @@ static bool file_content_matches(const string &filename1, const string &filename
memset(buf1, 0, sizeof(buf1));
memset(buf2, 0, sizeof(buf2));
while (len1 >= 0 && len2 >= 0)
while ( len1 >= 0
&& len2 >= 0)
{
if (len1 == 0)
{
@ -1338,7 +1369,8 @@ static bool file_content_matches(const string &filename1, const string &filename
len2 = read(fd2, buf2, sizeof(buf2));
}
if (len1 <= 0 || len2 <= 0)
if ( len1 <= 0
|| len2 <= 0)
{
break; // reached end of either files
// TODO: what is if one file is longer than the other, do we miss that ?
@ -1355,7 +1387,8 @@ static bool file_content_matches(const string &filename1, const string &filename
close(fd1);
close(fd2);
return(len1 == 0 && len2 == 0);
return( len1 == 0
&& len2 == 0);
} // file_content_matches
@ -1411,13 +1444,14 @@ static bool bout_content_matches(const file_mem &fm, bool report_status)
}
}
if (is_same && report_status)
if ( is_same
&& report_status)
{
fprintf(stdout, "PASS: %s (%u bytes)\n",
cpd.filename.c_str(), static_cast<int>(fm.raw.size()));
}
return(is_same);
}
} // bout_content_matches
static void do_source_file(const char *filename_in,
@ -1433,7 +1467,8 @@ static void do_source_file(const char *filename_in,
string filename_tmp;
// Do some simple language detection based on the filename extension
if (!cpd.lang_forced || cpd.lang_flags == 0)
if ( !cpd.lang_forced
|| cpd.lang_flags == 0)
{
cpd.lang_flags = language_flags_from_filename(filename_in);
}
@ -1543,7 +1578,8 @@ static void do_source_file(const char *filename_in,
if (filename_tmp != filename_out)
{
// We need to compare and then do a rename (but avoid redundant test when if_changed set)
if (!cpd.if_changed && file_content_matches(filename_tmp, filename_out))
if ( !cpd.if_changed
&& file_content_matches(filename_tmp, filename_out))
{
// No change - remove tmp file
UNUSED(unlink(filename_tmp.c_str()));
@ -1596,13 +1632,15 @@ static void add_file_footer()
chunk_t *pc = chunk_get_tail();
// Back up if the file ends with a newline
if (pc != nullptr && chunk_is_newline(pc))
if ( pc != nullptr
&& chunk_is_newline(pc))
{
pc = chunk_get_prev(pc);
}
if ( pc != nullptr
&& (!chunk_is_comment(pc) || !chunk_is_newline(chunk_get_prev(pc))))
&& ( !chunk_is_comment(pc)
|| !chunk_is_newline(chunk_get_prev(pc))))
{
pc = chunk_get_tail();
@ -1623,7 +1661,7 @@ static void add_func_header(c_token_t type, file_mem &fm)
chunk_t *tmp;
bool do_insert;
for (pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next_ncnlnp(pc))
for (pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next_ncnnlnp(pc))
{
if (pc->type != type)
{
@ -1651,7 +1689,8 @@ static void add_func_header(c_token_t type, file_mem &fm)
{
ref = ref->next;
if (chunk_is_token(ref, CT_SEMICOLON) && ref->level == pc->level)
if ( chunk_is_token(ref, CT_SEMICOLON)
&& ref->level == pc->level)
{
continue;
}
@ -1666,7 +1705,8 @@ static void add_func_header(c_token_t type, file_mem &fm)
{
int found_brace = 0; // Set if a close brace is found before a newline
while (ref->type != CT_NEWLINE && (ref = ref->next)) // TODO: is the assignment of ref wanted here?, better move it to the loop
while ( ref->type != CT_NEWLINE
&& (ref = ref->next)) // TODO: is the assignment of ref wanted here?, better move it to the loop
{
if (chunk_is_token(ref, CT_BRACE_CLOSE))
{
@ -1691,7 +1731,8 @@ static void add_func_header(c_token_t type, file_mem &fm)
while ((ref = chunk_get_prev(ref)) != nullptr)
{
// Bail if we change level or find an access specifier colon
if (ref->level != pc->level || chunk_is_token(ref, CT_ACCESS_COLON))
if ( ref->level != pc->level
|| chunk_is_token(ref, CT_ACCESS_COLON))
{
do_insert = true;
break;
@ -1709,7 +1750,8 @@ static void add_func_header(c_token_t type, file_mem &fm)
{
tmp = chunk_get_prev_type(ref, CT_PREPROC, ref->level);
if (tmp != nullptr && get_chunk_parent_type(tmp) == CT_PP_IF)
if ( tmp != nullptr
&& get_chunk_parent_type(tmp) == CT_PP_IF)
{
tmp = chunk_get_prev_nnl(tmp);
@ -1724,7 +1766,8 @@ static void add_func_header(c_token_t type, file_mem &fm)
}
// Ignore 'right' comments
if (chunk_is_comment(ref) && chunk_is_newline(chunk_get_prev(ref)))
if ( chunk_is_comment(ref)
&& chunk_is_newline(chunk_get_prev(ref)))
{
break;
}
@ -1739,10 +1782,21 @@ static void add_func_header(c_token_t type, file_mem &fm)
}
}
if (do_insert)
if ( ref == nullptr
&& !chunk_is_comment(chunk_get_head())
&& get_chunk_parent_type(chunk_get_head()) == type)
{
/**
* In addition to testing for preceding semicolons, closing braces, etc.,
* we need to also account for the possibility that the function declaration
* or definition occurs at the very beginning of the file
*/
tokenize(fm.data, chunk_get_head());
}
else if (do_insert)
{
// Insert between after and ref
chunk_t *after = chunk_get_next_ncnl(ref);
chunk_t *after = chunk_get_next_ncnnl(ref);
tokenize(fm.data, after);
for (tmp = chunk_get_next(ref); tmp != after; tmp = chunk_get_next(tmp))
@ -1761,7 +1815,7 @@ static void add_msg_header(c_token_t type, file_mem &fm)
chunk_t *tmp;
bool do_insert;
for (pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next_ncnlnp(pc))
for (pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next_ncnnlnp(pc))
{
if (pc->type != type)
{
@ -1779,7 +1833,8 @@ static void add_msg_header(c_token_t type, file_mem &fm)
{
// ignore the CT_TYPE token that is the result type
if ( ref->level != pc->level
&& (chunk_is_token(ref, CT_TYPE) || chunk_is_token(ref, CT_PTR_TYPE)))
&& ( chunk_is_token(ref, CT_TYPE)
|| chunk_is_token(ref, CT_PTR_TYPE)))
{
continue;
}
@ -1796,7 +1851,8 @@ static void add_msg_header(c_token_t type, file_mem &fm)
{
tmp = chunk_get_prev_type(ref, CT_PREPROC, ref->level);
if (tmp != nullptr && get_chunk_parent_type(tmp) == CT_PP_IF)
if ( tmp != nullptr
&& get_chunk_parent_type(tmp) == CT_PP_IF)
{
tmp = chunk_get_prev_nnl(tmp);
@ -1811,14 +1867,16 @@ static void add_msg_header(c_token_t type, file_mem &fm)
}
if ( ref->level == pc->level
&& (ref->flags.test(PCF_IN_PREPROC) || chunk_is_token(ref, CT_OC_SCOPE)))
&& ( ref->flags.test(PCF_IN_PREPROC)
|| chunk_is_token(ref, CT_OC_SCOPE)))
{
ref = chunk_get_prev(ref);
if (ref != nullptr)
{
// Ignore 'right' comments
if (chunk_is_newline(ref) && chunk_is_comment(chunk_get_prev(ref)))
if ( chunk_is_newline(ref)
&& chunk_is_comment(chunk_get_prev(ref)))
{
break;
}
@ -1831,7 +1889,7 @@ static void add_msg_header(c_token_t type, file_mem &fm)
if (do_insert)
{
// Insert between after and ref
chunk_t *after = chunk_get_next_ncnl(ref);
chunk_t *after = chunk_get_next_ncnnl(ref);
tokenize(fm.data, after);
for (tmp = chunk_get_next(ref); tmp != after; tmp = chunk_get_next(tmp))
@ -1916,7 +1974,8 @@ void uncrustify_file(const file_mem &fm, FILE *pfout,
log_rule_B("utf8_byte");
if ( options::utf8_force()
|| ((cpd.enc == char_encoding_e::e_BYTE) && options::utf8_byte()))
|| ( (cpd.enc == char_encoding_e::e_BYTE)
&& options::utf8_byte()))
{
cpd.enc = char_encoding_e::e_UTF8;
}
@ -2002,6 +2061,7 @@ void uncrustify_file(const file_mem &fm, FILE *pfout,
{
add_msg_header(CT_OC_MSG_DECL, cpd.oc_msg_hdr);
}
do_parent_for_pp();
do_braces(); // Change virtual braces into real braces...
// Scrub extra semicolons
@ -2081,7 +2141,8 @@ void uncrustify_file(const file_mem &fm, FILE *pfout,
log_rule_B("pos_comma");
log_rule_B("pos_enum_comma");
if (options::pos_comma() != TP_IGNORE || options::pos_enum_comma() != TP_IGNORE)
if ( options::pos_comma() != TP_IGNORE
|| options::pos_enum_comma() != TP_IGNORE)
{
newlines_chunk_pos(CT_COMMA, options::pos_comma());
}
@ -2124,7 +2185,8 @@ void uncrustify_file(const file_mem &fm, FILE *pfout,
newlines_functions_remove_extra_blank_lines();
newlines_cleanup_dup();
first = false;
} while (old_changes != cpd.changes && cpd.pass_count-- > 0);
} while ( old_changes != cpd.changes
&& cpd.pass_count-- > 0);
mark_comments();
@ -2138,7 +2200,8 @@ void uncrustify_file(const file_mem &fm, FILE *pfout,
// Scrub certain added semicolons
log_rule_B("mod_pawn_semicolon");
if (language_is_set(LANG_PAWN) && options::mod_pawn_semicolon())
if ( language_is_set(LANG_PAWN)
&& options::mod_pawn_semicolon())
{
pawn_scrub_vsemi();
}
@ -2210,7 +2273,7 @@ void uncrustify_file(const file_mem &fm, FILE *pfout,
{
if (cpd.changes > options::debug_max_number_of_loops()) // Issue #2432
{
LOG_FMT(LNEWLINE, "%s(%d): too many loop. Make a report, please.\n",
LOG_FMT(LNEWLINE, "%s(%d): too many loops. Make a report, please.\n",
__func__, __LINE__);
log_flush(true);
exit(EX_SOFTWARE);
@ -2218,11 +2281,14 @@ void uncrustify_file(const file_mem &fm, FILE *pfout,
}
do_code_width();
if (old_changes != cpd.changes && first)
if ( old_changes != cpd.changes
&& first)
{
// retry line breaks caused by splitting 1-liners
newlines_cleanup_braces(false);
newlines_insert_blank_lines();
newlines_functions_remove_extra_blank_lines();
newlines_remove_disallowed();
first = false;
}
}
@ -2237,8 +2303,22 @@ void uncrustify_file(const file_mem &fm, FILE *pfout,
{
align_backslash_newline();
}
// Now render it all to the output file
output_text(pfout);
// which output is to be done?
if (cpd.html_file == nullptr)
{
// Now render it all to the output file
output_text(pfout);
}
else
{
// create the tracking file
FILE *t_file;
t_file = fopen(cpd.html_file, "wb");
output_text(t_file);
fclose(t_file);
exit(EX_OK);
}
}
// Special hook for dumping parsed data for debugging
@ -2246,7 +2326,8 @@ void uncrustify_file(const file_mem &fm, FILE *pfout,
{
FILE *p_file;
if (parsed_file[0] == '-' && !parsed_file[1])
if ( parsed_file[0] == '-'
&& !parsed_file[1])
{
p_file = stdout;
}
@ -2279,7 +2360,8 @@ void uncrustify_file(const file_mem &fm, FILE *pfout,
}
}
if (cpd.do_check && !bout_content_matches(fm, true))
if ( cpd.do_check
&& !bout_content_matches(fm, true))
{
cpd.check_fail_cnt++;
}
@ -2335,7 +2417,8 @@ const char *get_token_name(c_token_t token)
c_token_t find_token_name(const char *text)
{
if (text != nullptr && (*text != 0))
if ( text != nullptr
&& (*text != 0))
{
for (int idx = 1; idx < static_cast<int> ARRAY_SIZE(token_names); idx++)
{
@ -2355,7 +2438,8 @@ static bool ends_with(const char *filename, const char *tag, bool case_sensitive
int len2 = strlen(tag);
return( len2 <= len1
&& ( (case_sensitive && (strcmp(&filename[len1 - len2], tag) == 0))
&& ( ( case_sensitive
&& (strcmp(&filename[len1 - len2], tag) == 0))
|| ( !case_sensitive
&& (strcasecmp(&filename[len1 - len2], tag) == 0))));
}

@ -9,9 +9,6 @@
#ifndef UNCRUSTIFY_H_INCLUDED
#define UNCRUSTIFY_H_INCLUDED
#include "base_types.h"
#include "log_levels.h"
#include "token_enum.h"
#include "uncrustify_types.h"
#include <stdio.h>

@ -677,10 +677,10 @@ EMSCRIPTEN_BINDINGS(MainModule)
.value("STRING", option_type_e::STRING);
enum_<iarf_e>("IARF")
.value("IGNORE", iarf_e::IGNORE)
.value("ADD", iarf_e::ADD)
.value("REMOVE", iarf_e::REMOVE)
.value("FORCE", iarf_e::FORCE);
.value("IGNORE", IARF_IGNORE)
.value("ADD", IARF_ADD)
.value("REMOVE", IARF_REMOVE)
.value("FORCE", IARF_FORCE);
enum_<line_end_e>("LineEnd")
.value("LF", line_end_e::LF)

@ -10,11 +10,6 @@
#ifndef UNCRUSTIFY_TYPES_H_INCLUDED
#define UNCRUSTIFY_TYPES_H_INCLUDED
#include "base_types.h"
#include "enum_flags.h"
#include "log_levels.h"
#include "logger.h"
#include "option_enum.h"
#include "options.h"
#include "pcf_flags.h"
#include "token_enum.h" // c_token_t
@ -22,9 +17,6 @@
#include "uncrustify_limits.h"
#include <assert.h>
#include <cstdio>
#include <deque>
#include <vector>
#ifdef HAVE_UTIME_H
#include <utime.h>
@ -129,6 +121,10 @@ struct align_ptr_t
};
// for debugging purpose only
typedef std::pair<size_t, char *> Track_nr; // track for "trackNumber" and "rule"
typedef std::vector<Track_nr> track_list; // liste for many tracks
// This is the main type of this program
struct chunk_t
{
@ -159,8 +155,10 @@ struct chunk_t
nl_column = 0;
level = 0;
brace_level = 0;
pp_level = 0;
pp_level = 999; // use a big value to find some errors
after_tab = false;
// for debugging purpose only
tracking = nullptr;
str.clear();
}
@ -178,6 +176,43 @@ struct chunk_t
return(str.c_str());
}
// Issue #2984, fill up, if necessary, a copie of the first chars of the text() string
const char *elided_text(char *for_the_copy)
{
const char *test_it = text();
size_t test_it_length = strlen(test_it);
size_t truncate_value = uncrustify::options::debug_truncate();
if (truncate_value != 0)
{
if (test_it_length > truncate_value)
{
memset(for_the_copy, 0, 1000);
if (test_it_length < truncate_value + 30)
{
strncpy(for_the_copy, test_it, truncate_value - 30);
for_the_copy[truncate_value - 30] = 0;
}
else
{
strncpy(for_the_copy, test_it, truncate_value);
for_the_copy[truncate_value] = 0;
}
char *message = strcat(for_the_copy, " ... <The string is truncated>");
return(message);
}
else
{
return(test_it);
}
}
return(test_it);
}
chunk_t *next; //! pointer to next chunk in list
chunk_t *prev; //! pointer to previous chunk in list
chunk_t *parent; //! pointer to parent chunk(not always set)
@ -197,11 +232,15 @@ struct chunk_t
* column used to indent with tabs */
size_t nl_count; //! number of newlines in CT_NEWLINE
size_t nl_column; //! column of the subsequent newline entries(all of them should have the same column)
size_t level; //! nest level in {, (, or [
size_t level; /** nest level in {, (, or [
* only to help vim command } */
size_t brace_level; //! nest level in braces only
size_t pp_level; //! nest level in preprocessor
bool after_tab; //! whether this token was after a tab
unc_text str; //! the token text
// for debugging purpose only
track_list *tracking;
};
@ -308,6 +347,7 @@ struct cp_data_t
file_mem func_hdr; // for cmt_insert_func_header
file_mem oc_msg_hdr; // for cmt_insert_oc_msg_header
file_mem class_hdr; // for cmt_insert_class_header
file_mem reflow_fold_regex; // for cmt_reflow_fold_regex_file
size_t lang_flags; //! defines the language of the source input
bool lang_forced; //! overwrites automatic language detection
@ -350,6 +390,7 @@ struct cp_data_t
const char *phase_name;
const char *dumped_file;
const char *html_file = nullptr; // for debugging purpose only
};
extern cp_data_t cpd; // TODO: can we avoid this external variable?

@ -8,14 +8,6 @@
#include "unicode.h"
#include "prototypes.h"
#include "unc_ctype.h"
#include "uncrustify.h"
#include "uncrustify_types.h"
#include <cstdlib>
#include <cstring>
using namespace std;
@ -218,7 +210,8 @@ static bool decode_utf8(const vector<UINT8> &in_data, deque<int> &out_data)
return(false);
}
while (cnt-- > 0 && idx < in_data.size())
while ( cnt-- > 0
&& idx < in_data.size())
{
int tmp = in_data[idx++];
@ -279,11 +272,13 @@ static bool decode_utf16(const vector<UINT8> &in_data, deque<int> &out_data, cha
}
size_t idx = 2;
if ((in_data[0] == 0xfe) && (in_data[1] == 0xff))
if ( (in_data[0] == 0xfe)
&& (in_data[1] == 0xff))
{
enc = char_encoding_e::e_UTF16_BE;
}
else if ((in_data[0] == 0xff) && (in_data[1] == 0xfe))
else if ( (in_data[0] == 0xff)
&& (in_data[1] == 0xfe))
{
enc = char_encoding_e::e_UTF16_LE;
}
@ -337,7 +332,8 @@ static bool decode_utf16(const vector<UINT8> &in_data, deque<int> &out_data, cha
ch += 0x10000;
out_data.push_back(ch);
}
else if ( (ch >= 0 && ch < 0xD800)
else if ( ( ch >= 0
&& ch < 0xD800)
|| ch >= 0xE000)
{
out_data.push_back(ch);
@ -358,13 +354,15 @@ static bool decode_bom(const vector<UINT8> &in_data, char_encoding_e &enc)
if (in_data.size() >= 2)
{
if ((in_data[0] == 0xfe) && (in_data[1] == 0xff))
if ( (in_data[0] == 0xfe)
&& (in_data[1] == 0xff))
{
enc = char_encoding_e::e_UTF16_BE;
return(true);
}
if ((in_data[0] == 0xff) && (in_data[1] == 0xfe))
if ( (in_data[0] == 0xff)
&& (in_data[1] == 0xfe))
{
enc = char_encoding_e::e_UTF16_LE;
return(true);
@ -469,8 +467,10 @@ static void write_utf8(int ch)
static void write_utf16(int ch, bool be)
{
// U+0000 to U+D7FF and U+E000 to U+FFFF
if ( (ch >= 0 && ch < 0xD800)
|| (ch >= 0xE000 && ch < 0x10000))
if ( ( ch >= 0
&& ch < 0xD800)
|| ( ch >= 0xE000
&& ch < 0x10000))
{
if (be)
{
@ -483,7 +483,8 @@ static void write_utf16(int ch, bool be)
write_byte(ch >> 8);
}
}
else if (ch >= 0x10000 && ch < 0x110000)
else if ( ch >= 0x10000
&& ch < 0x110000)
{
int v1 = ch - 0x10000;
int w1 = 0xD800 + (v1 >> 10);

@ -9,7 +9,6 @@
#ifndef UNICODE_H_INCLUDED
#define UNICODE_H_INCLUDED
#include "unc_text.h"
#include "uncrustify_types.h"

@ -16,10 +16,11 @@
#include "uncrustify.h"
#include "uncrustify_version.h"
#include <cstdio>
#include <vector>
#include <cstdio>
constexpr static auto LCURRENT = LOTHER;
using namespace std;
@ -201,7 +202,8 @@ void print_universal_indent_cfg(FILE *pfile)
// Output the description which may contain forbidden chars, skipping
// the last character which is always an extra newline
while (*tmp != 0 && *(tmp + 1) != 0)
while ( *tmp != 0
&& *(tmp + 1) != 0)
{
switch (*tmp)
{

@ -8,16 +8,12 @@
#include "width.h"
#include "chunk_list.h"
#include "error_types.h"
#include "indent.h"
#include "log_rules.h"
#include "newlines.h"
#include "prototypes.h"
#include "uncrustify.h"
#include "uncrustify_types.h"
#include <cstdlib>
constexpr static auto LCURRENT = LSPLIT;
using namespace uncrustify;
@ -145,7 +141,8 @@ static void split_before_chunk(chunk_t *pc)
LOG_FUNC_ENTRY();
LOG_FMT(LSPLIT, "%s(%d): text() '%s'\n", __func__, __LINE__, pc->text());
if (!chunk_is_newline(pc) && !chunk_is_newline(chunk_get_prev(pc)))
if ( !chunk_is_newline(pc)
&& !chunk_is_newline(chunk_get_prev(pc)))
{
newline_add_before(pc);
// reindent needs to include the indent_continue value and was off by one
@ -252,7 +249,8 @@ static void try_split_here(cw_entry &ent, chunk_t *pc)
chunk_t *prev = chunk_get_prev(pc);
if ( prev == nullptr
|| (chunk_is_newline(prev) && chunk_is_not_token(pc, CT_STRING)))
|| ( chunk_is_newline(prev)
&& chunk_is_not_token(pc, CT_STRING)))
{
if (prev != nullptr)
{
@ -292,7 +290,8 @@ static void try_split_here(cw_entry &ent, chunk_t *pc)
// keep common groupings unless ls_code_width
log_rule_B("ls_code_width");
if (!options::ls_code_width() && pc_pri >= 20)
if ( !options::ls_code_width()
&& pc_pri >= 20)
{
LOG_FMT(LSPLIT, "%s(%d): keep common groupings unless ls_code_width, return\n", __func__, __LINE__);
return;
@ -304,7 +303,8 @@ static void try_split_here(cw_entry &ent, chunk_t *pc)
{
chunk_t *next = chunk_get_next(pc);
if (chunk_is_not_token(next, CT_WORD) && (get_split_pri(next->type) != 25))
if ( chunk_is_not_token(next, CT_WORD)
&& (get_split_pri(next->type) != 25))
{
LOG_FMT(LSPLIT, "%s(%d): don't break after last term of a qualified type, return\n", __func__, __LINE__);
return;
@ -314,14 +314,16 @@ static void try_split_here(cw_entry &ent, chunk_t *pc)
// Check levels first
bool change = false;
if (ent.pc == nullptr || pc->level < ent.pc->level)
if ( ent.pc == nullptr
|| pc->level < ent.pc->level)
{
LOG_FMT(LSPLIT, "%s(%d):\n", __func__, __LINE__);
change = true;
}
else
{
if (pc->level >= ent.pc->level && pc_pri < ent.pri)
if ( pc->level >= ent.pc->level
&& pc_pri < ent.pri)
{
LOG_FMT(LSPLIT, "%s(%d):\n", __func__, __LINE__);
change = true;
@ -424,7 +426,8 @@ static bool split_line(chunk_t *start)
chunk_t *pc = start;
chunk_t *prev;
while (((pc = chunk_get_prev(pc)) != nullptr) && !chunk_is_newline(pc))
while ( ((pc = chunk_get_prev(pc)) != nullptr)
&& !chunk_is_newline(pc))
{
LOG_FMT(LSPLIT, "%s(%d): at %s, orig_line is %zu, orig_col is %zu\n",
__func__, __LINE__, pc->text(), pc->orig_line, pc->orig_col);
@ -436,7 +439,8 @@ static bool split_line(chunk_t *start)
// break at maximum line length
log_rule_B("ls_code_width");
if (ent.pc != nullptr && (options::ls_code_width()))
if ( ent.pc != nullptr
&& (options::ls_code_width()))
{
break;
}
@ -589,7 +593,8 @@ static void split_for_stmt(chunk_t *start)
pc = start;
if (chunk_is_token(pc, CT_SEMICOLON) && get_chunk_parent_type(pc) == CT_FOR)
if ( chunk_is_token(pc, CT_SEMICOLON)
&& get_chunk_parent_type(pc) == CT_FOR)
{
st[count++] = pc;
}
@ -599,7 +604,8 @@ static void split_for_stmt(chunk_t *start)
&& ((pc = chunk_get_prev(pc)) != nullptr)
&& pc->flags.test(PCF_IN_SPAREN))
{
if (chunk_is_token(pc, CT_SEMICOLON) && get_chunk_parent_type(pc) == CT_FOR)
if ( chunk_is_token(pc, CT_SEMICOLON)
&& get_chunk_parent_type(pc) == CT_FOR)
{
st[count++] = pc;
}
@ -611,7 +617,8 @@ static void split_for_stmt(chunk_t *start)
&& ((pc = chunk_get_next(pc)) != nullptr)
&& pc->flags.test(PCF_IN_SPAREN))
{
if (chunk_is_token(pc, CT_SEMICOLON) && get_chunk_parent_type(pc) == CT_FOR)
if ( chunk_is_token(pc, CT_SEMICOLON)
&& get_chunk_parent_type(pc) == CT_FOR)
{
st[count++] = pc;
}
@ -624,7 +631,8 @@ static void split_for_stmt(chunk_t *start)
split_before_chunk(chunk_get_next(st[count]));
}
if (!is_past_width(start) || nl_cnt > 0)
if ( !is_past_width(start)
|| nl_cnt > 0)
{
return;
}
@ -633,7 +641,8 @@ static void split_for_stmt(chunk_t *start)
while ((pc = chunk_get_next(pc)) != start)
{
if (chunk_is_token(pc, CT_COMMA) && (pc->level == (open_paren->level + 1)))
if ( chunk_is_token(pc, CT_COMMA)
&& (pc->level == (open_paren->level + 1)))
{
split_before_chunk(chunk_get_next(pc));
@ -648,7 +657,8 @@ static void split_for_stmt(chunk_t *start)
while ((pc = chunk_get_next(pc)) != start)
{
if (chunk_is_token(pc, CT_ASSIGN) && (pc->level == (open_paren->level + 1)))
if ( chunk_is_token(pc, CT_ASSIGN)
&& (pc->level == (open_paren->level + 1)))
{
split_before_chunk(chunk_get_next(pc));
@ -677,7 +687,8 @@ static void split_fcn_params_full(chunk_t *start)
LOG_FMT(LSPLIT, "%s(%d): %s, orig_col is %zu, level is %zu\n",
__func__, __LINE__, fpo->text(), fpo->orig_col, fpo->level);
if (chunk_is_token(fpo, CT_FPAREN_OPEN) && (fpo->level == start->level - 1))
if ( chunk_is_token(fpo, CT_FPAREN_OPEN)
&& (fpo->level == start->level - 1))
{
break; // opening parenthesis found. Issue #1020
}
@ -685,14 +696,15 @@ static void split_fcn_params_full(chunk_t *start)
// Now break after every comma
chunk_t *pc = fpo;
while ((pc = chunk_get_next_ncnl(pc)) != nullptr)
while ((pc = chunk_get_next_ncnnl(pc)) != nullptr)
{
if (pc->level <= fpo->level)
{
break;
}
if ((pc->level == (fpo->level + 1)) && chunk_is_token(pc, CT_COMMA))
if ( (pc->level == (fpo->level + 1))
&& chunk_is_token(pc, CT_COMMA))
{
split_before_chunk(chunk_get_next(pc));
}
@ -703,7 +715,8 @@ static void split_fcn_params_full(chunk_t *start)
static void split_fcn_params(chunk_t *start)
{
LOG_FUNC_ENTRY();
LOG_FMT(LSPLIT, "%s(%d): '%s'\n", __func__, __LINE__, start->text());
LOG_FMT(LSPLIT, "%s(%d): start->text() is '%s', orig_line is %zu, orig_col is %zu\n",
__func__, __LINE__, start->text(), start->orig_line, start->orig_col);
chunk_t *fpo = start;
if (!chunk_is_token(start, CT_FPAREN_OPEN))
@ -719,7 +732,7 @@ static void split_fcn_params(chunk_t *start)
__func__, __LINE__, fpo->text(), fpo->orig_col, fpo->level);
}
}
chunk_t *pc = chunk_get_next_ncnl(fpo);
chunk_t *pc = chunk_get_next_ncnnl(fpo);
size_t min_col = pc->column;
log_rule_B("code_width");
@ -755,7 +768,8 @@ static void split_fcn_params(chunk_t *start)
LOG_FMT(LSPLIT, "%s(%d): last_col is %d\n",
__func__, __LINE__, last_col);
if (chunk_is_token(pc, CT_COMMA) || chunk_is_token(pc, CT_FPAREN_CLOSE))
if ( chunk_is_token(pc, CT_COMMA)
|| chunk_is_token(pc, CT_FPAREN_CLOSE))
{
if (cur_width == 0)
{
@ -782,22 +796,26 @@ static void split_fcn_params(chunk_t *start)
// back up until the prev is a comma
chunk_t *prev = pc;
LOG_FMT(LSPLIT, " %s(%d): back up until the prev is a comma\n", __func__, __LINE__);
LOG_FMT(LSPLIT, "%s(%d): back up until the prev is a comma, begin is '%s', level is %zu\n",
__func__, __LINE__, prev->text(), prev->level);
while ((prev = chunk_get_prev(prev)) != nullptr)
{
LOG_FMT(LSPLIT, "%s(%d): pc '%s', pc->level is %zu, prev '%s', prev->type is %s\n",
__func__, __LINE__, pc->text(), pc->level, prev->text(), get_token_name(prev->type));
LOG_FMT(LSPLIT, "%s(%d): prev->text() is '%s', prev->orig_line is %zu, prev->orig_col is %zu\n",
__func__, __LINE__, prev->text(), prev->orig_line, prev->orig_col);
LOG_FMT(LSPLIT, "%s(%d): prev->level is %zu, prev '%s', prev->type is %s\n",
__func__, __LINE__, prev->level, prev->text(), get_token_name(prev->type));
if (chunk_is_newline(prev) || chunk_is_token(prev, CT_COMMA))
if ( chunk_is_newline(prev)
|| chunk_is_token(prev, CT_COMMA))
{
LOG_FMT(LSPLIT, "%s(%d): found at %zu\n",
__func__, __LINE__, prev->orig_col);
break;
}
LOG_FMT(LSPLIT, "%s(%d): last_col is %d\n",
__func__, __LINE__, last_col);
last_col -= pc->len();
LOG_FMT(LSPLIT, "%s(%d): last_col is %d, prev->len() is %zu\n",
__func__, __LINE__, last_col, prev->len());
last_col -= prev->len();
LOG_FMT(LSPLIT, "%s(%d): last_col is %d\n",
__func__, __LINE__, last_col);
@ -837,7 +855,8 @@ static void split_fcn_params(chunk_t *start)
}
}
if (prev != nullptr && !chunk_is_newline(prev))
if ( prev != nullptr
&& !chunk_is_newline(prev))
{
LOG_FMT(LSPLIT, "%s(%d): -- ended on %s --\n",
__func__, __LINE__, get_token_name(prev->type));
@ -864,13 +883,15 @@ static void split_template(chunk_t *start)
{
LOG_FMT(LSPLIT, " %s(%d): prev '%s'\n", __func__, __LINE__, prev->text());
if (chunk_is_newline(prev) || chunk_is_token(prev, CT_COMMA))
if ( chunk_is_newline(prev)
|| chunk_is_token(prev, CT_COMMA))
{
break;
}
}
if (prev != nullptr && !chunk_is_newline(prev))
if ( prev != nullptr
&& !chunk_is_newline(prev))
{
LOG_FMT(LSPLIT, " %s(%d):", __func__, __LINE__);
LOG_FMT(LSPLIT, " -- ended on %s --\n", get_token_name(prev->type));

@ -71,6 +71,7 @@ add_test(
NAME cli_options
COMMAND ${PYTHON_EXECUTABLE}
test_cli_options.py
--config $<CONFIG>
--build ${uncrustify_BINARY_DIR}
--diff
${_configs}
@ -80,6 +81,7 @@ add_test(
add_custom_target(update-cli-options
COMMAND ${PYTHON_EXECUTABLE}
test_cli_options.py
--config $<CONFIG>
--build ${uncrustify_BINARY_DIR}
--apply
DEPENDS uncrustify

@ -80,6 +80,7 @@
00120 sp_cmt_cpp_start-r.cfg c/sp_cmt_cpp_start.c
00121 sp_cmt_cpp_start-a.cfg c/sp_cmt_cpp_start.c
00122 sp_cmt_cpp_start_force.cfg c/sp_cmt_cpp_start.c
00123 cmt_reflow.cfg c/cmt_reflow.c
00130 ben_070.cfg c/minus-minus.c
00135 nepenthes.cfg c/br_cmt.c
@ -205,6 +206,7 @@
00631 nl_assign1.cfg c/nl_assign.c
00632 nl_assign2.cfg c/nl_assign.c
00633 nl_assign1.cfg c/bug_3156.c
# function def newlines
00701 func-def-1.cfg c/function-def.c
@ -296,6 +298,7 @@
02320 nl_create_one_liner.cfg c/nl_create_one_liner.c
02325 sort_imports.cfg c/sort_include.c
02330 leave_one_liners.cfg c/one_liners.c
# some embedded sql stuff

@ -0,0 +1,4 @@
indent_with_tabs = 0
indent_columns = 3
sp_arith = force
sp_assign = force

@ -86,7 +86,7 @@ public:
} c31, *c32 = nullptr, *c33[] = { nullptr, nullptr }, c34{ 0, 1, 2}, * const c35(nullptr), c16(0, 1, 2);
// class/struct [macros/attributes ...] type x, ...
class __attribute__((__deprecated__)) API_EXPORT ALIGNAS(4) c3 c41, *c42 = nullptr, *c43[] = { nullptr, nullptr }, c44{ 0, 1, 2}, * const c45(nullptr), c46(0, 1, 2);
class __attribute__((__deprecated__)) API_EXPORT ALIGNAS(4) c3 c41, *c42 = c32 ? c32 : nullptr, *c43[] = { nullptr, nullptr }, c44{ 0, 1, 2}, * const c45(nullptr), c46(0, 1, 2);
// class/struct [macros/attributes ...] type : bases ... { } x, ...
class ALIGNAS(4) API_EXPORT __attribute__((__deprecated__))

@ -0,0 +1,11 @@
{
a = b + 111-55;
}
template<typename...A, int...B>
struct foo1:foo1<A..., (sizeof...(A)+B)...>
{
foo1() {
int x = sizeof...(A);
bool b = x > 1;
}
};

@ -0,0 +1,4 @@
// 1 6789A123456789B123456789c123456789d123456789 123456789 123456789 123
// 2 6789A123456789B123456789c123456789
// 3 6789A123456789B123456789c12345678
// 4 6789A123456789B123456789c1234567

@ -0,0 +1,237 @@
Newline loop start: 0
log_rule(newlines_cleanup_braces : rule is 'nl_struct_brace'
log_rule(newlines_struct_union : rule is 'nl_define_macro'
log_rule(newlines_cleanup_braces : rule is 'nl_ds_struct_enum_cmt'
log_rule(newlines_cleanup_braces : rule is 'nl_brace_brace'
log_rule(newlines_cleanup_braces : rule is 'nl_type_brace_init_lst_open'
log_rule(newlines_cleanup_braces : rule is 'nl_type_brace_init_lst_close'
log_rule(newlines_brace_pair : rule is 'nl_define_macro'
log_rule(newlines_brace_pair : rule is 'nl_create_func_def_one_liner'
log_rule(collapse_empty_body : rule is 'nl_collapse_empty_body'
log_rule(newlines_brace_pair : rule is 'eat_blanks_after_open_brace'
log_rule(newline_def_blk : rule is 'nl_var_def_blk_end'
log_rule(newline_def_blk : rule is 'nl_var_def_blk_end'
log_rule(newline_def_blk : rule is 'nl_var_def_blk_start'
log_rule(newline_def_blk : rule is 'nl_var_def_blk_start'
newline_add_between : start->text() is ';', type is SEMICOLON, orig_line is 14, orig_col is 24
newline_add_between : and end->text() is '}', orig_line is 15, orig_col is 1
[CallStack]
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_start'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_start'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_start_single'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_start_single'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_start_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_start_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_args'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_args'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_args_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_args_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_end'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_end'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_end_single'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_end_single'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_end_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_end_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_empty'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_empty'
log_rule(newlines_cleanup_braces : rule is 'nl_func_type_name'
log_rule(newlines_cleanup_braces : rule is 'nl_func_type_name_class'
log_rule(newlines_cleanup_braces : rule is 'nl_func_class_scope'
log_rule(newlines_cleanup_braces : rule is 'nl_func_scope_name'
log_rule(newlines_cleanup_braces : rule is 'nl_func_proto_type_name'
log_rule(newlines_cleanup_braces : rule is 'nl_func_paren'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_paren'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_paren_empty'
log_rule(newlines_cleanup_braces : rule is 'nl_func_paren_empty'
log_rule(newlines_cleanup_braces : rule is 'nl_func_call_args'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_start'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_start'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_start_single'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_start_single'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_start_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_start_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_args'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_args'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_args_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_args_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_end'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_end'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_end_single'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_end_single'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_end_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_end_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_empty'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_empty'
log_rule(newlines_cleanup_braces : rule is 'nl_func_type_name'
log_rule(newlines_cleanup_braces : rule is 'nl_func_type_name_class'
log_rule(newlines_cleanup_braces : rule is 'nl_func_class_scope'
log_rule(newlines_cleanup_braces : rule is 'nl_func_scope_name'
log_rule(newlines_cleanup_braces : rule is 'nl_func_proto_type_name'
log_rule(newlines_cleanup_braces : rule is 'nl_func_paren'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_paren'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_paren_empty'
log_rule(newlines_cleanup_braces : rule is 'nl_func_paren_empty'
log_rule(newlines_cleanup_braces : rule is 'nl_func_call_args'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_start'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_start'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_start_single'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_start_single'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_start_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_start_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_args'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_args'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_args_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_args_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_end'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_end'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_end_single'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_end_single'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_end_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_end_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_empty'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_empty'
log_rule(newlines_cleanup_braces : rule is 'nl_func_type_name'
log_rule(newlines_cleanup_braces : rule is 'nl_func_type_name_class'
log_rule(newlines_cleanup_braces : rule is 'nl_func_class_scope'
log_rule(newlines_cleanup_braces : rule is 'nl_func_scope_name'
log_rule(newlines_cleanup_braces : rule is 'nl_func_proto_type_name'
log_rule(newlines_cleanup_braces : rule is 'nl_func_paren'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_paren'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_paren_empty'
log_rule(newlines_cleanup_braces : rule is 'nl_func_paren_empty'
log_rule(newlines_cleanup_braces : rule is 'nl_func_call_args'
log_rule(newlines_cleanup_braces : rule is 'nl_before_opening_brace_func_class_def'
log_rule(newlines_cleanup_braces : rule is 'nl_brace_brace'
log_rule(newlines_cleanup_braces : rule is 'nl_type_brace_init_lst_open'
log_rule(newlines_cleanup_braces : rule is 'nl_type_brace_init_lst_close'
log_rule(newlines_brace_pair : rule is 'nl_define_macro'
log_rule(newlines_brace_pair : rule is 'nl_create_func_def_one_liner'
log_rule(newlines_brace_pair : rule is 'nl_fdef_brace_cond'
log_rule(newlines_brace_pair : rule is 'nl_fdef_brace'
log_rule(collapse_empty_body : rule is 'nl_collapse_empty_body'
log_rule(newlines_brace_pair : rule is 'eat_blanks_after_open_brace'
newline_add_between : start->text() is '{', type is BRACE_OPEN, orig_line is 6, orig_col is 1
newline_add_between : and end->text() is '}', orig_line is 7, orig_col is 1
[CallStack]
newline_add_between : start->text() is '{', type is BRACE_OPEN, orig_line is 6, orig_col is 1
newline_add_between : and end->text() is '}', orig_line is 7, orig_col is 1
[CallStack]
log_rule(newlines_cleanup_braces : rule is 'nl_brace_brace'
log_rule(newlines_cleanup_braces : rule is 'nl_brace_square'
log_rule(newlines_cleanup_braces : rule is 'nl_brace_fparen'
log_rule(newlines_cleanup_braces : rule is 'nl_type_brace_init_lst_close'
log_rule(newlines_cleanup_braces : rule is 'eat_blanks_before_close_brace'
log_rule(newlines_cleanup_braces : rule is 'nl_brace_struct_var'
log_rule(newlines_cleanup_braces : rule is 'nl_after_brace_close'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_start'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_start'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_start_single'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_start_single'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_start_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_start_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_args'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_args'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_args_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_args_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_end'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_end'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_end_single'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_end_single'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_end_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_end_multi_line'
log_rule(newlines_cleanup_braces : rule is 'nl_func_decl_empty'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_empty'
log_rule(newlines_cleanup_braces : rule is 'nl_func_type_name'
log_rule(newlines_cleanup_braces : rule is 'nl_func_type_name_class'
log_rule(newlines_cleanup_braces : rule is 'nl_func_class_scope'
log_rule(newlines_cleanup_braces : rule is 'nl_func_scope_name'
log_rule(newlines_cleanup_braces : rule is 'nl_func_proto_type_name'
log_rule(newlines_cleanup_braces : rule is 'nl_func_paren'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_paren'
log_rule(newlines_cleanup_braces : rule is 'nl_func_def_paren_empty'
log_rule(newlines_cleanup_braces : rule is 'nl_func_paren_empty'
log_rule(newlines_cleanup_braces : rule is 'nl_func_call_args'
log_rule(newlines_cleanup_braces : rule is 'nl_before_opening_brace_func_class_def'
log_rule(newlines_cleanup_braces : rule is 'nl_brace_brace'
log_rule(newlines_cleanup_braces : rule is 'nl_type_brace_init_lst_open'
log_rule(newlines_cleanup_braces : rule is 'nl_type_brace_init_lst_close'
log_rule(newlines_brace_pair : rule is 'nl_define_macro'
log_rule(newlines_brace_pair : rule is 'nl_create_func_def_one_liner'
log_rule(newlines_brace_pair : rule is 'nl_fdef_brace_cond'
log_rule(newlines_brace_pair : rule is 'nl_fdef_brace'
log_rule(collapse_empty_body : rule is 'nl_collapse_empty_body'
log_rule(newlines_brace_pair : rule is 'eat_blanks_after_open_brace'
newline_add_between : start->text() is '{', type is BRACE_OPEN, orig_line is 10, orig_col is 1
newline_add_between : and end->text() is '}', orig_line is 11, orig_col is 1
[CallStack]
newline_add_between : start->text() is '{', type is BRACE_OPEN, orig_line is 10, orig_col is 1
newline_add_between : and end->text() is '}', orig_line is 11, orig_col is 1
[CallStack]
log_rule(newlines_cleanup_braces : rule is 'nl_brace_brace'
log_rule(newlines_cleanup_braces : rule is 'nl_brace_square'
log_rule(newlines_cleanup_braces : rule is 'nl_brace_fparen'
log_rule(newlines_cleanup_braces : rule is 'nl_type_brace_init_lst_close'
log_rule(newlines_cleanup_braces : rule is 'eat_blanks_before_close_brace'
log_rule(newlines_cleanup_braces : rule is 'nl_brace_struct_var'
log_rule(newlines_cleanup_braces : rule is 'nl_after_brace_close'
log_rule(newlines_cleanup_braces : rule is 'nl_after_semicolon'
log_rule(newlines_cleanup_braces : rule is 'nl_after_semicolon'
log_rule(newlines_cleanup_braces : rule is 'nl_brace_brace'
log_rule(newlines_cleanup_braces : rule is 'nl_brace_square'
log_rule(newlines_cleanup_braces : rule is 'nl_brace_fparen'
log_rule(newlines_cleanup_braces : rule is 'nl_type_brace_init_lst_close'
log_rule(newlines_cleanup_braces : rule is 'eat_blanks_before_close_brace'
log_rule(newlines_cleanup_braces : rule is 'nl_brace_struct_var'
log_rule(newlines_cleanup_braces : rule is 'nl_after_semicolon'
log_rule(newline_def_blk : rule is 'nl_var_def_blk_end'
log_rule(newline_def_blk : rule is 'nl_var_def_blk_end'
log_rule(newline_def_blk : rule is 'nl_var_def_blk_start'
log_rule(newline_def_blk : rule is 'nl_var_def_blk_start'
log_rule(newlines_func_pre_blank_lines : rule is 'nl_before_func_class_def'
log_rule(newlines_func_pre_blank_lines : rule is 'nl_before_func_class_proto'
log_rule(newlines_func_pre_blank_lines : rule is 'nl_before_func_body_def'
log_rule(newlines_func_pre_blank_lines : rule is 'nl_before_func_body_proto'
log_rule(newlines_func_pre_blank_lines : rule is 'nl_before_func_class_def'
log_rule(newlines_func_pre_blank_lines : rule is 'nl_before_func_class_proto'
log_rule(newlines_func_pre_blank_lines : rule is 'nl_before_func_body_def'
log_rule(newlines_func_pre_blank_lines : rule is 'nl_before_func_body_proto'
log_rule(newlines_class_colon_pos : rule is 'pos_class_colon'
log_rule(newlines_class_colon_pos : rule is 'nl_class_colon'
log_rule(newlines_class_colon_pos : rule is 'nl_class_init_args'
log_rule(newlines_class_colon_pos : rule is 'pos_class_comma'
log_rule(newlines_class_colon_pos : rule is 'align_constr_value_span'
log_rule(newlines_class_colon_pos : rule is 'pos_constr_colon'
log_rule(newlines_class_colon_pos : rule is 'nl_constr_colon'
log_rule(newlines_class_colon_pos : rule is 'nl_constr_init_args'
log_rule(newlines_class_colon_pos : rule is 'pos_constr_comma'
log_rule(newlines_class_colon_pos : rule is 'align_constr_value_span'
log_rule(can_increase_nl : rule is 'nl_start_of_file'
log_rule(can_increase_nl : rule is 'nl_end_of_file'
log_rule(can_increase_nl : rule is 'nl_start_of_file'
log_rule(can_increase_nl : rule is 'nl_end_of_file'
log_rule(can_increase_nl : rule is 'nl_start_of_file'
log_rule(can_increase_nl : rule is 'nl_end_of_file'
log_rule(can_increase_nl : rule is 'nl_start_of_file'
log_rule(can_increase_nl : rule is 'nl_end_of_file'
log_rule(can_increase_nl : rule is 'nl_start_of_file'
log_rule(can_increase_nl : rule is 'nl_end_of_file'
log_rule(can_increase_nl : rule is 'nl_start_of_file'
log_rule(can_increase_nl : rule is 'nl_end_of_file'
log_rule(can_increase_nl : rule is 'nl_start_of_file'
log_rule(can_increase_nl : rule is 'nl_end_of_file'
log_rule(can_increase_nl : rule is 'nl_start_of_file'
log_rule(can_increase_nl : rule is 'nl_end_of_file'
log_rule(can_increase_nl : rule is 'nl_start_of_file'
log_rule(can_increase_nl : rule is 'nl_end_of_file'
log_rule(can_increase_nl : rule is 'nl_start_of_file'
log_rule(can_increase_nl : rule is 'nl_end_of_file'
log_rule(can_increase_nl : rule is 'nl_start_of_file'
log_rule(can_increase_nl : rule is 'nl_end_of_file'
log_rule(can_increase_nl : rule is 'nl_start_of_file'
log_rule(can_increase_nl : rule is 'nl_end_of_file'
log_rule(can_increase_nl : rule is 'nl_start_of_file'
log_rule(can_increase_nl : rule is 'nl_end_of_file'
log_rule(do_blank_lines : rule is 'nl_after_class'
log_rule(do_blank_lines : rule is 'nl_after_struct'
log_rule(newlines_functions_remove_extra_blank_lines : rule is 'nl_max_blank_in_func'
newlines_functions_remove_extra_blank_lines : nl_max_blank_in_func is zero

@ -1,186 +1,371 @@
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(parse_next : rule is 'disable_processing_nl_cont'
log_rule(tokenize : rule is 'newlines'
brace_cleanup : orig_line is 1, orig_col is 1, text() is 'struct'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 1, orig_col is 1, type is STRUCT, tos is 0, TOS.type is EOF, TOS.stage is NONE, []
parse_cleanup : orig_line is 1, type is STRUCT, text() is 'struct'
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
parse_cleanup : frm.stmt_count is 1, frm.expr_count is 1
brace_cleanup : orig_line is 1, orig_col is 8, text() is 'TelegramIndex'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 1, orig_col is 8, type is TYPE, tos is 0, TOS.type is EOF, TOS.stage is NONE, []
parse_cleanup : orig_line is 1, type is TYPE, text() is 'TelegramIndex'
parse_cleanup : frm.stmt_count is 1, frm.expr_count is 1
parse_cleanup : frm.stmt_count is 2, frm.expr_count is 2
brace_cleanup : orig_line is 1, orig_col is 21, text() is ''
brace_cleanup : pp_level is 0
brace_cleanup : orig_line is 2, orig_col is 1, text() is '{'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 2, orig_col is 1, type is BRACE_OPEN, tos is 0, TOS.type is EOF, TOS.stage is NONE, []
parse_cleanup : orig_line is 2, type is BRACE_OPEN, text() is '{'
parse_cleanup : frm.stmt_count is 2, frm.expr_count is 2
parse_cleanup : frm.stmt_count is 3, frm.expr_count is 3
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
brace_cleanup : orig_line is 2, orig_col is 2, text() is ''
brace_cleanup : pp_level is 0
brace_cleanup : orig_line is 3, orig_col is 1, text() is 'TelegramIndex'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 3, orig_col is 1, type is WORD, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 3, type is WORD, text() is 'TelegramIndex'
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
parse_cleanup : frm.stmt_count is 1, frm.expr_count is 1
brace_cleanup : orig_line is 3, orig_col is 14, text() is '('
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 3, orig_col is 14, type is PAREN_OPEN, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 3, type is PAREN_OPEN, text() is '('
parse_cleanup : frm.stmt_count is 1, frm.expr_count is 1
parse_cleanup : frm.stmt_count is 2, frm.expr_count is 2
brace_cleanup : orig_line is 3, orig_col is 15, text() is 'const'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 3, orig_col is 15, type is QUALIFIER, tos is 2, TOS.type is PAREN_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 3, type is QUALIFIER, text() is 'const'
parse_cleanup : frm.stmt_count is 2, frm.expr_count is 0
parse_cleanup : frm.stmt_count is 3, frm.expr_count is 1
brace_cleanup : orig_line is 3, orig_col is 21, text() is 'char'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 3, orig_col is 21, type is TYPE, tos is 2, TOS.type is PAREN_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 3, type is TYPE, text() is 'char'
parse_cleanup : frm.stmt_count is 3, frm.expr_count is 1
parse_cleanup : frm.stmt_count is 4, frm.expr_count is 2
brace_cleanup : orig_line is 3, orig_col is 25, text() is '*'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 3, orig_col is 25, type is PTR_TYPE, tos is 2, TOS.type is PAREN_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 3, type is PTR_TYPE, text() is '*'
parse_cleanup : frm.stmt_count is 4, frm.expr_count is 2
parse_cleanup : frm.stmt_count is 5, frm.expr_count is 3
brace_cleanup : orig_line is 3, orig_col is 27, text() is 'pN'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 3, orig_col is 27, type is WORD, tos is 2, TOS.type is PAREN_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 3, type is WORD, text() is 'pN'
parse_cleanup : frm.stmt_count is 5, frm.expr_count is 3
parse_cleanup : frm.stmt_count is 6, frm.expr_count is 4
brace_cleanup : orig_line is 3, orig_col is 29, text() is ','
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 3, orig_col is 29, type is COMMA, tos is 2, TOS.type is PAREN_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 3, type is COMMA, text() is ','
parse_cleanup : frm.stmt_count is 6, frm.expr_count is 4
parse_cleanup : frm.stmt_count is 7, frm.expr_count is 5
brace_cleanup : orig_line is 3, orig_col is 31, text() is 'unsigned'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 3, orig_col is 31, type is TYPE, tos is 2, TOS.type is PAREN_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 3, type is TYPE, text() is 'unsigned'
parse_cleanup : frm.stmt_count is 7, frm.expr_count is 0
parse_cleanup : frm.stmt_count is 8, frm.expr_count is 1
brace_cleanup : orig_line is 3, orig_col is 40, text() is 'long'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 3, orig_col is 40, type is TYPE, tos is 2, TOS.type is PAREN_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 3, type is TYPE, text() is 'long'
parse_cleanup : frm.stmt_count is 8, frm.expr_count is 1
parse_cleanup : frm.stmt_count is 9, frm.expr_count is 2
brace_cleanup : orig_line is 3, orig_col is 45, text() is 'nI'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 3, orig_col is 45, type is WORD, tos is 2, TOS.type is PAREN_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 3, type is WORD, text() is 'nI'
parse_cleanup : frm.stmt_count is 9, frm.expr_count is 2
parse_cleanup : frm.stmt_count is 10, frm.expr_count is 3
brace_cleanup : orig_line is 3, orig_col is 47, text() is ')'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 3, orig_col is 47, type is PAREN_CLOSE, tos is 2, TOS.type is PAREN_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 3, type is PAREN_CLOSE, text() is ')'
parse_cleanup : frm.stmt_count is 10, frm.expr_count is 3
parse_cleanup : frm.stmt_count is 11, frm.expr_count is 4
brace_cleanup : orig_line is 3, orig_col is 49, text() is ':'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 3, orig_col is 49, type is COLON, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 3, type is COLON, text() is ':'
parse_cleanup : frm.stmt_count is 11, frm.expr_count is 4
parse_cleanup : frm.stmt_count is 12, frm.expr_count is 5
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
brace_cleanup : orig_line is 3, orig_col is 50, text() is ''
brace_cleanup : pp_level is 0
brace_cleanup : orig_line is 4, orig_col is 1, text() is 'pTelName'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 4, orig_col is 1, type is WORD, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 4, type is WORD, text() is 'pTelName'
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
parse_cleanup : frm.stmt_count is 1, frm.expr_count is 1
brace_cleanup : orig_line is 4, orig_col is 9, text() is '('
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 4, orig_col is 9, type is PAREN_OPEN, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 4, type is PAREN_OPEN, text() is '('
parse_cleanup : frm.stmt_count is 1, frm.expr_count is 1
parse_cleanup : frm.stmt_count is 2, frm.expr_count is 2
brace_cleanup : orig_line is 4, orig_col is 10, text() is 'pN'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 4, orig_col is 10, type is WORD, tos is 2, TOS.type is PAREN_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 4, type is WORD, text() is 'pN'
parse_cleanup : frm.stmt_count is 2, frm.expr_count is 0
parse_cleanup : frm.stmt_count is 3, frm.expr_count is 1
brace_cleanup : orig_line is 4, orig_col is 12, text() is ')'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 4, orig_col is 12, type is PAREN_CLOSE, tos is 2, TOS.type is PAREN_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 4, type is PAREN_CLOSE, text() is ')'
parse_cleanup : frm.stmt_count is 3, frm.expr_count is 1
parse_cleanup : frm.stmt_count is 4, frm.expr_count is 2
brace_cleanup : orig_line is 4, orig_col is 13, text() is ','
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 4, orig_col is 13, type is COMMA, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 4, type is COMMA, text() is ','
parse_cleanup : frm.stmt_count is 4, frm.expr_count is 2
parse_cleanup : frm.stmt_count is 5, frm.expr_count is 3
brace_cleanup : orig_line is 4, orig_col is 14, text() is ''
brace_cleanup : pp_level is 0
brace_cleanup : orig_line is 5, orig_col is 1, text() is 'nTelIndex'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 5, orig_col is 1, type is WORD, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 5, type is WORD, text() is 'nTelIndex'
parse_cleanup : frm.stmt_count is 5, frm.expr_count is 0
parse_cleanup : frm.stmt_count is 6, frm.expr_count is 1
brace_cleanup : orig_line is 5, orig_col is 10, text() is '('
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 5, orig_col is 10, type is PAREN_OPEN, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 5, type is PAREN_OPEN, text() is '('
parse_cleanup : frm.stmt_count is 6, frm.expr_count is 1
parse_cleanup : frm.stmt_count is 7, frm.expr_count is 2
brace_cleanup : orig_line is 5, orig_col is 11, text() is 'n'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 5, orig_col is 11, type is WORD, tos is 2, TOS.type is PAREN_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 5, type is WORD, text() is 'n'
parse_cleanup : frm.stmt_count is 7, frm.expr_count is 0
parse_cleanup : frm.stmt_count is 8, frm.expr_count is 1
brace_cleanup : orig_line is 5, orig_col is 12, text() is ')'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 5, orig_col is 12, type is PAREN_CLOSE, tos is 2, TOS.type is PAREN_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 5, type is PAREN_CLOSE, text() is ')'
parse_cleanup : frm.stmt_count is 8, frm.expr_count is 1
parse_cleanup : frm.stmt_count is 9, frm.expr_count is 2
brace_cleanup : orig_line is 5, orig_col is 13, text() is ''
brace_cleanup : pp_level is 0
brace_cleanup : orig_line is 6, orig_col is 1, text() is '{'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 6, orig_col is 1, type is BRACE_OPEN, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 6, type is BRACE_OPEN, text() is '{'
parse_cleanup : frm.stmt_count is 9, frm.expr_count is 2
parse_cleanup : frm.stmt_count is 10, frm.expr_count is 3
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
brace_cleanup : orig_line is 6, orig_col is 2, text() is ''
brace_cleanup : pp_level is 0
brace_cleanup : orig_line is 7, orig_col is 1, text() is '}'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 7, orig_col is 1, type is BRACE_CLOSE, tos is 2, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 7, type is BRACE_CLOSE, text() is '}'
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
parse_cleanup : frm.stmt_count is 1, frm.expr_count is 1
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
brace_cleanup : orig_line is 7, orig_col is 2, text() is ''
brace_cleanup : pp_level is 0
brace_cleanup : orig_line is 9, orig_col is 1, text() is '~'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 9, orig_col is 1, type is INV, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 9, type is INV, text() is '~'
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
parse_cleanup : frm.stmt_count is 1, frm.expr_count is 1
brace_cleanup : orig_line is 9, orig_col is 2, text() is 'TelegramIndex'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 9, orig_col is 2, type is WORD, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 9, type is WORD, text() is 'TelegramIndex'
parse_cleanup : frm.stmt_count is 1, frm.expr_count is 0
parse_cleanup : frm.stmt_count is 2, frm.expr_count is 1
brace_cleanup : orig_line is 9, orig_col is 15, text() is '('
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 9, orig_col is 15, type is PAREN_OPEN, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 9, type is PAREN_OPEN, text() is '('
parse_cleanup : frm.stmt_count is 2, frm.expr_count is 1
parse_cleanup : frm.stmt_count is 3, frm.expr_count is 2
brace_cleanup : orig_line is 9, orig_col is 16, text() is ')'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 9, orig_col is 16, type is PAREN_CLOSE, tos is 2, TOS.type is PAREN_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 9, type is PAREN_CLOSE, text() is ')'
parse_cleanup : frm.stmt_count is 3, frm.expr_count is 0
parse_cleanup : frm.stmt_count is 4, frm.expr_count is 1
brace_cleanup : orig_line is 9, orig_col is 17, text() is ''
brace_cleanup : pp_level is 0
brace_cleanup : orig_line is 10, orig_col is 1, text() is '{'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 10, orig_col is 1, type is BRACE_OPEN, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 10, type is BRACE_OPEN, text() is '{'
parse_cleanup : frm.stmt_count is 4, frm.expr_count is 1
parse_cleanup : frm.stmt_count is 5, frm.expr_count is 2
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
brace_cleanup : orig_line is 10, orig_col is 2, text() is ''
brace_cleanup : pp_level is 0
brace_cleanup : orig_line is 11, orig_col is 1, text() is '}'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 11, orig_col is 1, type is BRACE_CLOSE, tos is 2, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 11, type is BRACE_CLOSE, text() is '}'
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
parse_cleanup : frm.stmt_count is 1, frm.expr_count is 1
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
brace_cleanup : orig_line is 11, orig_col is 2, text() is ''
brace_cleanup : pp_level is 0
brace_cleanup : orig_line is 13, orig_col is 1, text() is 'const'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 13, orig_col is 1, type is QUALIFIER, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 13, type is QUALIFIER, text() is 'const'
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
parse_cleanup : frm.stmt_count is 1, frm.expr_count is 1
brace_cleanup : orig_line is 13, orig_col is 7, text() is 'char'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 13, orig_col is 7, type is TYPE, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 13, type is TYPE, text() is 'char'
parse_cleanup : frm.stmt_count is 1, frm.expr_count is 1
parse_cleanup : frm.stmt_count is 2, frm.expr_count is 2
brace_cleanup : orig_line is 13, orig_col is 11, text() is '*'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 13, orig_col is 11, type is PTR_TYPE, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 13, type is PTR_TYPE, text() is '*'
parse_cleanup : frm.stmt_count is 2, frm.expr_count is 2
parse_cleanup : frm.stmt_count is 3, frm.expr_count is 3
brace_cleanup : orig_line is 13, orig_col is 13, text() is 'const'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 13, orig_col is 13, type is QUALIFIER, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 13, type is QUALIFIER, text() is 'const'
parse_cleanup : frm.stmt_count is 3, frm.expr_count is 3
parse_cleanup : frm.stmt_count is 4, frm.expr_count is 4
brace_cleanup : orig_line is 13, orig_col is 19, text() is 'pTelName'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 13, orig_col is 19, type is WORD, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 13, type is WORD, text() is 'pTelName'
parse_cleanup : frm.stmt_count is 4, frm.expr_count is 4
parse_cleanup : frm.stmt_count is 5, frm.expr_count is 5
brace_cleanup : orig_line is 13, orig_col is 27, text() is ';'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 13, orig_col is 27, type is SEMICOLON, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 13, type is SEMICOLON, text() is ';'
parse_cleanup : frm.stmt_count is 5, frm.expr_count is 5
parse_cleanup : frm.stmt_count is 6, frm.expr_count is 6
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
brace_cleanup : orig_line is 13, orig_col is 28, text() is ''
brace_cleanup : pp_level is 0
brace_cleanup : orig_line is 14, orig_col is 1, text() is 'unsigned'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 14, orig_col is 1, type is TYPE, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 14, type is TYPE, text() is 'unsigned'
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
parse_cleanup : frm.stmt_count is 1, frm.expr_count is 1
brace_cleanup : orig_line is 14, orig_col is 10, text() is 'long'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 14, orig_col is 10, type is TYPE, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 14, type is TYPE, text() is 'long'
parse_cleanup : frm.stmt_count is 1, frm.expr_count is 1
parse_cleanup : frm.stmt_count is 2, frm.expr_count is 2
brace_cleanup : orig_line is 14, orig_col is 15, text() is 'nTelIndex'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 14, orig_col is 15, type is WORD, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 14, type is WORD, text() is 'nTelIndex'
parse_cleanup : frm.stmt_count is 2, frm.expr_count is 2
parse_cleanup : frm.stmt_count is 3, frm.expr_count is 3
brace_cleanup : orig_line is 14, orig_col is 24, text() is ';'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 14, orig_col is 24, type is SEMICOLON, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 14, type is SEMICOLON, text() is ';'
parse_cleanup : frm.stmt_count is 3, frm.expr_count is 3
parse_cleanup : frm.stmt_count is 4, frm.expr_count is 4
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
brace_cleanup : orig_line is 14, orig_col is 25, text() is ''
brace_cleanup : pp_level is 0
brace_cleanup : orig_line is 15, orig_col is 1, text() is '}'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 15, orig_col is 1, type is BRACE_CLOSE, tos is 1, TOS.type is BRACE_OPEN, TOS.stage is NONE, []
parse_cleanup : orig_line is 15, type is BRACE_CLOSE, text() is '}'
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
parse_cleanup : frm.stmt_count is 1, frm.expr_count is 1
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
brace_cleanup : orig_line is 15, orig_col is 2, text() is ';'
brace_cleanup : pp_level is 0
parse_cleanup : orig_line is 15, orig_col is 2, type is SEMICOLON, tos is 0, TOS.type is EOF, TOS.stage is NONE, []
parse_cleanup : orig_line is 15, type is SEMICOLON, text() is ';'
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
parse_cleanup : frm.stmt_count is 1, frm.expr_count is 1
parse_cleanup : frm.stmt_count is 0, frm.expr_count is 0
brace_cleanup : orig_line is 15, orig_col is 3, text() is ''
brace_cleanup : pp_level is 0
log_rule(enum_cleanup : rule is 'mod_enum_last_comma'

@ -331,7 +331,7 @@ indent_text : orig_line is 3, orig_col is 1, column is 9, for 'TelegramIndex'
[]
indent_text : frm.pse_tos is 1, ...indent_tmp is 9
indent_text : frm.pse_tos is 1, ...indent_tmp is 9
reindent_line : orig_line is 3, orig_col is 9, on 'TelegramIndex' [FUNC_CLASS_DEF/NONE] => 9
reindent_line : orig_line is 3, orig_col is 1, on 'TelegramIndex' [FUNC_CLASS_DEF/NONE] => 9
[CallStack]
indent_text : orig_line is 3, orig_col is 14, column is 22, for '('
[]
@ -392,7 +392,7 @@ indent_text : orig_line is 4, orig_col is 1, column is 17, for 'pTelName'
[]
indent_text : frm.pse_tos is 2, ...indent_tmp is 17
indent_text : frm.pse_tos is 2, ...indent_tmp is 17
reindent_line : orig_line is 4, orig_col is 17, on 'pTelName' [FUNC_CTOR_VAR/NONE] => 17
reindent_line : orig_line is 4, orig_col is 1, on 'pTelName' [FUNC_CTOR_VAR/NONE] => 17
[CallStack]
indent_text : orig_line is 4, orig_col is 9, column is 25, for '('
[]
@ -423,7 +423,7 @@ indent_text : orig_line is 5, orig_col is 1, column is 17, for 'nTelIndex'
[]
indent_text : frm.pse_tos is 2, ...indent_tmp is 17
indent_text : frm.pse_tos is 2, ...indent_tmp is 17
reindent_line : orig_line is 5, orig_col is 17, on 'nTelIndex' [FUNC_CTOR_VAR/NONE] => 17
reindent_line : orig_line is 5, orig_col is 1, on 'nTelIndex' [FUNC_CTOR_VAR/NONE] => 17
[CallStack]
indent_text : orig_line is 5, orig_col is 10, column is 26, for '('
[]
@ -454,7 +454,7 @@ indent_text : frm.pse_tos is 1, ...indent_tmp is 9
indent_text : frm.pse_tos is 2, ... indent is 17
indent_text : orig_line is 6, orig_col is 1, text() is '{', parent_type is FUNC_CLASS_DEF
indent_text : frm.pse_tos is 2, ...indent_tmp is 17
reindent_line : orig_line is 6, orig_col is 9, on '{' [BRACE_OPEN/FUNC_CLASS_DEF] => 9
reindent_line : orig_line is 6, orig_col is 1, on '{' [BRACE_OPEN/FUNC_CLASS_DEF] => 9
[CallStack]
indent_text : orig_line is 6, <Newline>
indent_text : frm.pse_tos is 2, ...indent_tmp is 17
@ -466,7 +466,7 @@ indent_text : orig_line is 7, orig_col is 1, column is 9, for '}'
indent_text : frm.pse_tos is 2, ...indent_tmp is 17
indent_text : frm.pse_tos is 2, ...indent_tmp is 17
indent_text : pc->orig_line is 7, orig_col is 1, text() is '}', type is BRACE_CLOSE
reindent_line : orig_line is 7, orig_col is 9, on '}' [BRACE_CLOSE/FUNC_CLASS_DEF] => 9
reindent_line : orig_line is 7, orig_col is 1, on '}' [BRACE_CLOSE/FUNC_CLASS_DEF] => 9
[CallStack]
indent_text : orig_line is 7, <Newline>
indent_text : frm.pse_tos is 1, ...indent_tmp is 9
@ -477,7 +477,7 @@ indent_text : orig_line is 9, orig_col is 1, column is 9, for '~'
[]
indent_text : frm.pse_tos is 1, ...indent_tmp is 9
indent_text : frm.pse_tos is 1, ...indent_tmp is 9
reindent_line : orig_line is 9, orig_col is 9, on '~' [DESTRUCTOR/FUNC_CLASS_DEF] => 9
reindent_line : orig_line is 9, orig_col is 1, on '~' [DESTRUCTOR/FUNC_CLASS_DEF] => 9
[CallStack]
indent_text : orig_line is 9, orig_col is 2, column is 10, for 'TelegramIndex'
[]
@ -507,7 +507,7 @@ indent_text : frm.pse_tos is 1, ...indent_tmp is 9
indent_text : frm.pse_tos is 2, ... indent is 17
indent_text : orig_line is 10, orig_col is 1, text() is '{', parent_type is FUNC_CLASS_DEF
indent_text : frm.pse_tos is 2, ...indent_tmp is 17
reindent_line : orig_line is 10, orig_col is 9, on '{' [BRACE_OPEN/FUNC_CLASS_DEF] => 9
reindent_line : orig_line is 10, orig_col is 1, on '{' [BRACE_OPEN/FUNC_CLASS_DEF] => 9
[CallStack]
indent_text : orig_line is 10, <Newline>
indent_text : frm.pse_tos is 2, ...indent_tmp is 17
@ -519,7 +519,7 @@ indent_text : orig_line is 11, orig_col is 1, column is 9, for '}'
indent_text : frm.pse_tos is 2, ...indent_tmp is 17
indent_text : frm.pse_tos is 2, ...indent_tmp is 17
indent_text : pc->orig_line is 11, orig_col is 1, text() is '}', type is BRACE_CLOSE
reindent_line : orig_line is 11, orig_col is 9, on '}' [BRACE_CLOSE/FUNC_CLASS_DEF] => 9
reindent_line : orig_line is 11, orig_col is 1, on '}' [BRACE_CLOSE/FUNC_CLASS_DEF] => 9
[CallStack]
indent_text : orig_line is 11, <Newline>
indent_text : frm.pse_tos is 1, ...indent_tmp is 9
@ -530,7 +530,7 @@ indent_text : orig_line is 13, orig_col is 1, column is 9, for 'const'
[]
indent_text : frm.pse_tos is 1, ...indent_tmp is 9
indent_text : frm.pse_tos is 1, ...indent_tmp is 9
reindent_line : orig_line is 13, orig_col is 9, on 'const' [QUALIFIER/NONE] => 9
reindent_line : orig_line is 13, orig_col is 1, on 'const' [QUALIFIER/NONE] => 9
[CallStack]
indent_text : orig_line is 13, orig_col is 7, column is 15, for 'char'
[]
@ -561,7 +561,7 @@ indent_text : orig_line is 14, orig_col is 1, column is 9, for 'unsigned'
[]
indent_text : frm.pse_tos is 1, ...indent_tmp is 9
indent_text : frm.pse_tos is 1, ...indent_tmp is 9
reindent_line : orig_line is 14, orig_col is 9, on 'unsigned' [TYPE/NONE] => 9
reindent_line : orig_line is 14, orig_col is 1, on 'unsigned' [TYPE/NONE] => 9
[CallStack]
indent_text : orig_line is 14, orig_col is 10, column is 18, for 'long'
[]

@ -0,0 +1,741 @@
space_text : orig_line is 1, orig_col is 1, 'struct' type is STRUCT
space_text : back-to-back words need a space: pc->text() 'struct', next->text() 'TelegramIndex'
space_text : orig_line is 1, orig_col is 1, pc-text() 'struct', type is STRUCT
do_space : orig_line is 1, orig_col is 1, first->text() 'struct', type is STRUCT
do_space : first->orig_line is 1, first->orig_col is 1, first->text() is 'struct', [STRUCT/NONE] <===>
second->orig_line is 1, second->orig_col is 8, second->text() is 'TelegramIndex', [TYPE/STRUCT] : rule ADD from add_space_table[ ]
ensure_force_space : <force between 'struct' and 'TelegramIndex'> rule = ADD @ 1 => 8
space_text : orig_line is 1, orig_col is 8, 'TelegramIndex' type is TYPE
space_text : orig_line is 1, orig_col is 8, pc-text() 'TelegramIndex', type is TYPE
do_space : orig_line is 1, orig_col is 8, first->text() 'TelegramIndex', type is TYPE
rule = REMOVE @ 0 => 21
space_text : orig_line is 1, orig_col is 21, <Newline>, nl is 1
space_text : orig_line is 2, orig_col is 1, '{' type is BRACE_OPEN
space_text : orig_line is 2, orig_col is 1, pc-text() '{', type is BRACE_OPEN
do_space : orig_line is 2, orig_col is 1, first->text() '{', type is BRACE_OPEN
rule = REMOVE @ 0 => 2
space_text : orig_line is 2, orig_col is 2, <Newline>, nl is 1
space_text : orig_line is 3, orig_col is 1, 'TelegramIndex' type is FUNC_CLASS_DEF
space_text : orig_line is 3, orig_col is 1, pc-text() 'TelegramIndex', type is FUNC_CLASS_DEF
do_space : orig_line is 3, orig_col is 1, first->text() 'TelegramIndex', type is FUNC_CLASS_DEF
do_space : first->orig_line is 3, first->orig_col is 1, first->text() is 'TelegramIndex', [FUNC_CLASS_DEF/NONE] <===>
second->orig_line is 3, second->orig_col is 14, second->text() is '(', [FPAREN_OPEN/FUNC_CLASS_DEF] : rule sp_func_class_paren[ ]
rule = IGNORE @ 0 => 14
space_text : orig_line is 3, orig_col is 14, '(' type is FPAREN_OPEN
space_text : orig_line is 3, orig_col is 14, pc-text() '(', type is FPAREN_OPEN
do_space : orig_line is 3, orig_col is 14, first->text() '(', type is FPAREN_OPEN
do_space : first->orig_line is 3, first->orig_col is 14, first->text() is '(', [FPAREN_OPEN/FUNC_CLASS_DEF] <===>
second->orig_line is 3, second->orig_col is 15, second->text() is 'const', [QUALIFIER/NONE] : rule sp_inside_fparen[ ]
rule = IGNORE @ 0 => 15
space_text : orig_line is 3, orig_col is 15, 'const' type is QUALIFIER
space_text : back-to-back words need a space: pc->text() 'const', next->text() 'char'
space_text : orig_line is 3, orig_col is 15, pc-text() 'const', type is QUALIFIER
do_space : orig_line is 3, orig_col is 15, first->text() 'const', type is QUALIFIER
do_space : first->orig_line is 3, first->orig_col is 15, first->text() is 'const', [QUALIFIER/NONE] <===>
second->orig_line is 3, second->orig_col is 21, second->text() is 'char', [TYPE/NONE] : rule sp_after_type[ ]
ensure_force_space : <force between 'const' and 'char'> rule = FORCE @ 1 => 21
space_text : orig_line is 3, orig_col is 21, 'char' type is TYPE
space_text : orig_line is 3, orig_col is 21, pc-text() 'char', type is TYPE
do_space : orig_line is 3, orig_col is 21, first->text() 'char', type is TYPE
do_space : first->orig_line is 3, first->orig_col is 21, first->text() is 'char', [TYPE/NONE] <===>
second->orig_line is 3, second->orig_col is 25, second->text() is '*', [PTR_TYPE/NONE] : rule IGNORE[ ]
rule = IGNORE @ 0 => 25
space_text : orig_line is 3, orig_col is 25, '*' type is PTR_TYPE
space_text : orig_line is 3, orig_col is 25, pc-text() '*', type is PTR_TYPE
do_space : orig_line is 3, orig_col is 25, first->text() '*', type is PTR_TYPE
do_space : first->orig_line is 3, first->orig_col is 25, first->text() is '*', [PTR_TYPE/NONE] <===>
second->orig_line is 3, second->orig_col is 27, second->text() is 'pN', [WORD/NONE] : rule IGNORE[ ]
rule = IGNORE @ 1 => 27
space_text : orig_line is 3, orig_col is 27, 'pN' type is WORD
space_text : orig_line is 3, orig_col is 27, pc-text() 'pN', type is WORD
do_space : orig_line is 3, orig_col is 27, first->text() 'pN', type is WORD
do_space : first->orig_line is 3, first->orig_col is 27, first->text() is 'pN', [WORD/NONE] <===>
second->orig_line is 3, second->orig_col is 29, second->text() is ',', [COMMA/NONE] : rule sp_before_comma[ ]
rule = REMOVE @ 0 => 29
space_text : orig_line is 3, orig_col is 29, ',' type is COMMA
space_text : orig_line is 3, orig_col is 29, pc-text() ',', type is COMMA
do_space : orig_line is 3, orig_col is 29, first->text() ',', type is COMMA
do_space : first->orig_line is 3, first->orig_col is 29, first->text() is ',', [COMMA/NONE] <===>
second->orig_line is 3, second->orig_col is 31, second->text() is 'unsigned', [TYPE/NONE] : rule sp_after_comma[ ]
rule = IGNORE @ 1 => 31
space_text : orig_line is 3, orig_col is 31, 'unsigned' type is TYPE
space_text : back-to-back words need a space: pc->text() 'unsigned', next->text() 'long'
space_text : orig_line is 3, orig_col is 31, pc-text() 'unsigned', type is TYPE
do_space : orig_line is 3, orig_col is 31, first->text() 'unsigned', type is TYPE
do_space : first->orig_line is 3, first->orig_col is 31, first->text() is 'unsigned', [TYPE/NONE] <===>
second->orig_line is 3, second->orig_col is 40, second->text() is 'long', [TYPE/NONE] : rule sp_after_type[ ]
ensure_force_space : <force between 'unsigned' and 'long'> rule = FORCE @ 1 => 40
space_text : orig_line is 3, orig_col is 40, 'long' type is TYPE
space_text : back-to-back words need a space: pc->text() 'long', next->text() 'nI'
space_text : orig_line is 3, orig_col is 40, pc-text() 'long', type is TYPE
do_space : orig_line is 3, orig_col is 40, first->text() 'long', type is TYPE
do_space : first->orig_line is 3, first->orig_col is 40, first->text() is 'long', [TYPE/NONE] <===>
second->orig_line is 3, second->orig_col is 45, second->text() is 'nI', [WORD/NONE] : rule sp_after_type[ ]
ensure_force_space : <force between 'long' and 'nI'> rule = FORCE @ 1 => 45
space_text : orig_line is 3, orig_col is 45, 'nI' type is WORD
space_text : orig_line is 3, orig_col is 45, pc-text() 'nI', type is WORD
do_space : orig_line is 3, orig_col is 45, first->text() 'nI', type is WORD
do_space : first->orig_line is 3, first->orig_col is 45, first->text() is 'nI', [WORD/NONE] <===>
second->orig_line is 3, second->orig_col is 47, second->text() is ')', [FPAREN_CLOSE/FUNC_CLASS_DEF] : rule sp_inside_fparen[ ]
rule = IGNORE @ 0 => 47
space_text : orig_line is 3, orig_col is 47, ')' type is FPAREN_CLOSE
space_text : orig_line is 3, orig_col is 47, pc-text() ')', type is FPAREN_CLOSE
do_space : orig_line is 3, orig_col is 47, first->text() ')', type is FPAREN_CLOSE
do_space : first->orig_line is 3, first->orig_col is 47, first->text() is ')', [FPAREN_CLOSE/FUNC_CLASS_DEF] <===>
second->orig_line is 3, second->orig_col is 49, second->text() is ':', [CONSTR_COLON/NONE] : rule ADD from add_space_table[ ]
rule = ADD @ 1 => 49
space_text : orig_line is 3, orig_col is 49, ':' type is CONSTR_COLON
space_text : orig_line is 3, orig_col is 49, pc-text() ':', type is CONSTR_COLON
do_space : orig_line is 3, orig_col is 49, first->text() ':', type is CONSTR_COLON
rule = REMOVE @ 0 => 50
space_text : orig_line is 3, orig_col is 50, <Newline>, nl is 1
space_text : orig_line is 4, orig_col is 1, 'pTelName' type is FUNC_CTOR_VAR
space_text : orig_line is 4, orig_col is 1, pc-text() 'pTelName', type is FUNC_CTOR_VAR
do_space : orig_line is 4, orig_col is 1, first->text() 'pTelName', type is FUNC_CTOR_VAR
do_space : first->orig_line is 4, first->orig_col is 1, first->text() is 'pTelName', [FUNC_CTOR_VAR/NONE] <===>
second->orig_line is 4, second->orig_col is 9, second->text() is '(', [FPAREN_OPEN/FUNC_CTOR_VAR] : rule sp_func_call_paren[ ]
rule = IGNORE @ 0 => 9
space_text : orig_line is 4, orig_col is 9, '(' type is FPAREN_OPEN
space_text : orig_line is 4, orig_col is 9, pc-text() '(', type is FPAREN_OPEN
do_space : orig_line is 4, orig_col is 9, first->text() '(', type is FPAREN_OPEN
do_space : first->orig_line is 4, first->orig_col is 9, first->text() is '(', [FPAREN_OPEN/FUNC_CTOR_VAR] <===>
second->orig_line is 4, second->orig_col is 10, second->text() is 'pN', [WORD/NONE] : rule sp_inside_fparen[ ]
rule = IGNORE @ 0 => 10
space_text : orig_line is 4, orig_col is 10, 'pN' type is WORD
space_text : orig_line is 4, orig_col is 10, pc-text() 'pN', type is WORD
do_space : orig_line is 4, orig_col is 10, first->text() 'pN', type is WORD
do_space : first->orig_line is 4, first->orig_col is 10, first->text() is 'pN', [WORD/NONE] <===>
second->orig_line is 4, second->orig_col is 12, second->text() is ')', [FPAREN_CLOSE/FUNC_CTOR_VAR] : rule sp_inside_fparen[ ]
rule = IGNORE @ 0 => 12
space_text : orig_line is 4, orig_col is 12, ')' type is FPAREN_CLOSE
space_text : orig_line is 4, orig_col is 12, pc-text() ')', type is FPAREN_CLOSE
do_space : orig_line is 4, orig_col is 12, first->text() ')', type is FPAREN_CLOSE
do_space : first->orig_line is 4, first->orig_col is 12, first->text() is ')', [FPAREN_CLOSE/FUNC_CTOR_VAR] <===>
second->orig_line is 4, second->orig_col is 13, second->text() is ',', [COMMA/NONE] : rule sp_before_comma[ ]
rule = REMOVE @ 0 => 13
space_text : orig_line is 4, orig_col is 13, ',' type is COMMA
space_text : orig_line is 4, orig_col is 13, pc-text() ',', type is COMMA
do_space : orig_line is 4, orig_col is 13, first->text() ',', type is COMMA
rule = REMOVE @ 0 => 14
space_text : orig_line is 4, orig_col is 14, <Newline>, nl is 1
space_text : orig_line is 5, orig_col is 1, 'nTelIndex' type is FUNC_CTOR_VAR
space_text : orig_line is 5, orig_col is 1, pc-text() 'nTelIndex', type is FUNC_CTOR_VAR
do_space : orig_line is 5, orig_col is 1, first->text() 'nTelIndex', type is FUNC_CTOR_VAR
do_space : first->orig_line is 5, first->orig_col is 1, first->text() is 'nTelIndex', [FUNC_CTOR_VAR/NONE] <===>
second->orig_line is 5, second->orig_col is 10, second->text() is '(', [FPAREN_OPEN/FUNC_CTOR_VAR] : rule sp_func_call_paren[ ]
rule = IGNORE @ 0 => 10
space_text : orig_line is 5, orig_col is 10, '(' type is FPAREN_OPEN
space_text : orig_line is 5, orig_col is 10, pc-text() '(', type is FPAREN_OPEN
do_space : orig_line is 5, orig_col is 10, first->text() '(', type is FPAREN_OPEN
do_space : first->orig_line is 5, first->orig_col is 10, first->text() is '(', [FPAREN_OPEN/FUNC_CTOR_VAR] <===>
second->orig_line is 5, second->orig_col is 11, second->text() is 'n', [WORD/NONE] : rule sp_inside_fparen[ ]
rule = IGNORE @ 0 => 11
space_text : orig_line is 5, orig_col is 11, 'n' type is WORD
space_text : orig_line is 5, orig_col is 11, pc-text() 'n', type is WORD
do_space : orig_line is 5, orig_col is 11, first->text() 'n', type is WORD
do_space : first->orig_line is 5, first->orig_col is 11, first->text() is 'n', [WORD/NONE] <===>
second->orig_line is 5, second->orig_col is 12, second->text() is ')', [FPAREN_CLOSE/FUNC_CTOR_VAR] : rule sp_inside_fparen[ ]
rule = IGNORE @ 0 => 12
space_text : orig_line is 5, orig_col is 12, ')' type is FPAREN_CLOSE
space_text : orig_line is 5, orig_col is 12, pc-text() ')', type is FPAREN_CLOSE
do_space : orig_line is 5, orig_col is 12, first->text() ')', type is FPAREN_CLOSE
rule = REMOVE @ 0 => 13
space_text : orig_line is 5, orig_col is 13, <Newline>, nl is 1
space_text : orig_line is 6, orig_col is 1, '{' type is BRACE_OPEN
space_text : orig_line is 6, orig_col is 1, pc-text() '{', type is BRACE_OPEN
do_space : orig_line is 6, orig_col is 1, first->text() '{', type is BRACE_OPEN
rule = REMOVE @ 0 => 2
space_text : orig_line is 6, orig_col is 2, <Newline>, nl is 1
space_text : orig_line is 7, orig_col is 1, '}' type is BRACE_CLOSE
space_text : orig_line is 7, orig_col is 1, pc-text() '}', type is BRACE_CLOSE
do_space : orig_line is 7, orig_col is 1, first->text() '}', type is BRACE_CLOSE
rule = REMOVE @ 0 => 2
space_text : orig_line is 7, orig_col is 2, <Newline>, nl is 2
space_text : orig_line is 9, orig_col is 1, '~' type is DESTRUCTOR
space_text : orig_line is 9, orig_col is 1, pc-text() '~', type is DESTRUCTOR
do_space : orig_line is 9, orig_col is 1, first->text() '~', type is DESTRUCTOR
do_space : first->orig_line is 9, first->orig_col is 1, first->text() is '~', [DESTRUCTOR/FUNC_CLASS_DEF] <===>
second->orig_line is 9, second->orig_col is 2, second->text() is 'TelegramIndex', [FUNC_CLASS_DEF/DESTRUCTOR] : rule REMOVE[ ]
rule = REMOVE @ 0 => 2
space_text : orig_line is 9, orig_col is 2, 'TelegramIndex' type is FUNC_CLASS_DEF
space_text : orig_line is 9, orig_col is 2, pc-text() 'TelegramIndex', type is FUNC_CLASS_DEF
do_space : orig_line is 9, orig_col is 2, first->text() 'TelegramIndex', type is FUNC_CLASS_DEF
do_space : first->orig_line is 9, first->orig_col is 2, first->text() is 'TelegramIndex', [FUNC_CLASS_DEF/DESTRUCTOR] <===>
second->orig_line is 9, second->orig_col is 15, second->text() is '(', [FPAREN_OPEN/FUNC_CLASS_DEF] : rule sp_func_class_paren[ ]
rule = IGNORE @ 0 => 15
space_text : orig_line is 9, orig_col is 15, '(' type is FPAREN_OPEN
space_text : orig_line is 9, orig_col is 15, pc-text() '(', type is FPAREN_OPEN
do_space : orig_line is 9, orig_col is 15, first->text() '(', type is FPAREN_OPEN
do_space : first->orig_line is 9, first->orig_col is 15, first->text() is '(', [FPAREN_OPEN/FUNC_CLASS_DEF] <===>
second->orig_line is 9, second->orig_col is 16, second->text() is ')', [FPAREN_CLOSE/FUNC_CLASS_DEF] : rule sp_inside_fparens[ ]
rule = IGNORE @ 0 => 16
space_text : orig_line is 9, orig_col is 16, ')' type is FPAREN_CLOSE
space_text : orig_line is 9, orig_col is 16, pc-text() ')', type is FPAREN_CLOSE
do_space : orig_line is 9, orig_col is 16, first->text() ')', type is FPAREN_CLOSE
rule = REMOVE @ 0 => 17
space_text : orig_line is 9, orig_col is 17, <Newline>, nl is 1
space_text : orig_line is 10, orig_col is 1, '{' type is BRACE_OPEN
space_text : orig_line is 10, orig_col is 1, pc-text() '{', type is BRACE_OPEN
do_space : orig_line is 10, orig_col is 1, first->text() '{', type is BRACE_OPEN
rule = REMOVE @ 0 => 2
space_text : orig_line is 10, orig_col is 2, <Newline>, nl is 1
space_text : orig_line is 11, orig_col is 1, '}' type is BRACE_CLOSE
space_text : orig_line is 11, orig_col is 1, pc-text() '}', type is BRACE_CLOSE
do_space : orig_line is 11, orig_col is 1, first->text() '}', type is BRACE_CLOSE
rule = REMOVE @ 0 => 2
space_text : orig_line is 11, orig_col is 2, <Newline>, nl is 2
space_text : orig_line is 13, orig_col is 1, 'const' type is QUALIFIER
space_text : back-to-back words need a space: pc->text() 'const', next->text() 'char'
space_text : orig_line is 13, orig_col is 1, pc-text() 'const', type is QUALIFIER
do_space : orig_line is 13, orig_col is 1, first->text() 'const', type is QUALIFIER
do_space : first->orig_line is 13, first->orig_col is 1, first->text() is 'const', [QUALIFIER/NONE] <===>
second->orig_line is 13, second->orig_col is 7, second->text() is 'char', [TYPE/NONE] : rule sp_after_type[ ]
ensure_force_space : <force between 'const' and 'char'> rule = FORCE @ 1 => 7
space_text : orig_line is 13, orig_col is 7, 'char' type is TYPE
space_text : orig_line is 13, orig_col is 7, pc-text() 'char', type is TYPE
do_space : orig_line is 13, orig_col is 7, first->text() 'char', type is TYPE
do_space : first->orig_line is 13, first->orig_col is 7, first->text() is 'char', [TYPE/NONE] <===>
second->orig_line is 13, second->orig_col is 11, second->text() is '*', [PTR_TYPE/NONE] : rule IGNORE[ ]
rule = IGNORE @ 0 => 11
space_text : orig_line is 13, orig_col is 11, '*' type is PTR_TYPE
space_text : orig_line is 13, orig_col is 11, pc-text() '*', type is PTR_TYPE
do_space : orig_line is 13, orig_col is 11, first->text() '*', type is PTR_TYPE
do_space : first->orig_line is 13, first->orig_col is 11, first->text() is '*', [PTR_TYPE/NONE] <===>
second->orig_line is 13, second->orig_col is 13, second->text() is 'const', [QUALIFIER/NONE] : rule IGNORE[ ]
rule = IGNORE @ 1 => 13
space_text : orig_line is 13, orig_col is 13, 'const' type is QUALIFIER
space_text : back-to-back words need a space: pc->text() 'const', next->text() 'pTelName'
space_text : orig_line is 13, orig_col is 13, pc-text() 'const', type is QUALIFIER
do_space : orig_line is 13, orig_col is 13, first->text() 'const', type is QUALIFIER
do_space : first->orig_line is 13, first->orig_col is 13, first->text() is 'const', [QUALIFIER/NONE] <===>
second->orig_line is 13, second->orig_col is 19, second->text() is 'pTelName', [WORD/NONE] : rule sp_after_type[ ]
ensure_force_space : <force between 'const' and 'pTelName'> rule = FORCE @ 1 => 19
space_text : orig_line is 13, orig_col is 19, 'pTelName' type is WORD
space_text : orig_line is 13, orig_col is 19, pc-text() 'pTelName', type is WORD
do_space : orig_line is 13, orig_col is 19, first->text() 'pTelName', type is WORD
do_space : first->orig_line is 13, first->orig_col is 19, first->text() is 'pTelName', [WORD/NONE] <===>
second->orig_line is 13, second->orig_col is 27, second->text() is ';', [SEMICOLON/NONE] : rule sp_before_semi[ ]
rule = REMOVE @ 0 => 27
space_text : orig_line is 13, orig_col is 27, ';' type is SEMICOLON
space_text : orig_line is 13, orig_col is 27, pc-text() ';', type is SEMICOLON
do_space : orig_line is 13, orig_col is 27, first->text() ';', type is SEMICOLON
rule = REMOVE @ 0 => 28
space_text : orig_line is 13, orig_col is 28, <Newline>, nl is 1
space_text : orig_line is 14, orig_col is 1, 'unsigned' type is TYPE
space_text : back-to-back words need a space: pc->text() 'unsigned', next->text() 'long'
space_text : orig_line is 14, orig_col is 1, pc-text() 'unsigned', type is TYPE
do_space : orig_line is 14, orig_col is 1, first->text() 'unsigned', type is TYPE
do_space : first->orig_line is 14, first->orig_col is 1, first->text() is 'unsigned', [TYPE/NONE] <===>
second->orig_line is 14, second->orig_col is 10, second->text() is 'long', [TYPE/NONE] : rule sp_after_type[ ]
ensure_force_space : <force between 'unsigned' and 'long'> rule = FORCE @ 1 => 10
space_text : orig_line is 14, orig_col is 10, 'long' type is TYPE
space_text : back-to-back words need a space: pc->text() 'long', next->text() 'nTelIndex'
space_text : orig_line is 14, orig_col is 10, pc-text() 'long', type is TYPE
do_space : orig_line is 14, orig_col is 10, first->text() 'long', type is TYPE
do_space : first->orig_line is 14, first->orig_col is 10, first->text() is 'long', [TYPE/NONE] <===>
second->orig_line is 14, second->orig_col is 15, second->text() is 'nTelIndex', [WORD/NONE] : rule sp_after_type[ ]
ensure_force_space : <force between 'long' and 'nTelIndex'> rule = FORCE @ 1 => 15
space_text : orig_line is 14, orig_col is 15, 'nTelIndex' type is WORD
space_text : orig_line is 14, orig_col is 15, pc-text() 'nTelIndex', type is WORD
do_space : orig_line is 14, orig_col is 15, first->text() 'nTelIndex', type is WORD
do_space : first->orig_line is 14, first->orig_col is 15, first->text() is 'nTelIndex', [WORD/NONE] <===>
second->orig_line is 14, second->orig_col is 24, second->text() is ';', [SEMICOLON/NONE] : rule sp_before_semi[ ]
rule = REMOVE @ 0 => 24
space_text : orig_line is 14, orig_col is 24, ';' type is SEMICOLON
space_text : orig_line is 14, orig_col is 24, pc-text() ';', type is SEMICOLON
do_space : orig_line is 14, orig_col is 24, first->text() ';', type is SEMICOLON
rule = REMOVE @ 0 => 25
space_text : orig_line is 14, orig_col is 25, <Newline>, nl is 1
space_text : orig_line is 15, orig_col is 1, '}' type is BRACE_CLOSE
space_text : orig_line is 15, orig_col is 1, pc-text() '}', type is BRACE_CLOSE
do_space : orig_line is 15, orig_col is 1, first->text() '}', type is BRACE_CLOSE
do_space : first->orig_line is 15, first->orig_col is 1, first->text() is '}', [BRACE_CLOSE/STRUCT] <===>
second->orig_line is 15, second->orig_col is 2, second->text() is ';', [SEMICOLON/STRUCT] : rule sp_before_semi[ ]
rule = REMOVE @ 0 => 2
space_text : orig_line is 15, orig_col is 2, ';' type is SEMICOLON
space_text : orig_line is 15, orig_col is 2, pc-text() ';', type is SEMICOLON
do_space : orig_line is 15, orig_col is 2, first->text() ';', type is SEMICOLON
rule = REMOVE @ 0 => 3
space_text : orig_line is 15, orig_col is 3, <Newline>, nl is 2
space_col_align : first->orig_line is 3, orig_col is 1, [FUNC_CLASS_DEF/NONE], text() 'TelegramIndex' <==>
space_col_align : second->orig_line is 3, orig_col is 14 [FPAREN_OPEN/FUNC_CLASS_DEF], text() '(', [CallStack]
do_space : orig_line is 3, orig_col is 1, first->text() 'TelegramIndex', type is FUNC_CLASS_DEF
do_space : first->orig_line is 3, first->orig_col is 1, first->text() is 'TelegramIndex', [FUNC_CLASS_DEF/NONE] <===>
second->orig_line is 3, second->orig_col is 14, second->text() is '(', [FPAREN_OPEN/FUNC_CLASS_DEF] : rule sp_func_class_paren[ ]
space_col_align : av is ignore
space_col_align : len is 13
space_col_align : => coldiff is 13
space_col_align : => av is IGNORE
space_col_align : => first->orig_line is 3
space_col_align : => second->orig_line is 3
space_col_align : => first->text() is 'TelegramIndex'
space_col_align : => second->text() is '('
space_col_align : => first->orig_col is 1
space_col_align : => second->orig_col is 14
space_col_align : => first->len() is 13
space_col_align : => coldiff is 13
space_col_align : first->orig_line is 3, orig_col is 14, [FPAREN_OPEN/FUNC_CLASS_DEF], text() '(' <==>
space_col_align : second->orig_line is 3, orig_col is 15 [QUALIFIER/NONE], text() 'const', [CallStack]
do_space : orig_line is 3, orig_col is 14, first->text() '(', type is FPAREN_OPEN
do_space : first->orig_line is 3, first->orig_col is 14, first->text() is '(', [FPAREN_OPEN/FUNC_CLASS_DEF] <===>
second->orig_line is 3, second->orig_col is 15, second->text() is 'const', [QUALIFIER/NONE] : rule sp_inside_fparen[ ]
space_col_align : av is ignore
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is IGNORE
space_col_align : => first->orig_line is 3
space_col_align : => second->orig_line is 3
space_col_align : => first->text() is '('
space_col_align : => second->text() is 'const'
space_col_align : => first->orig_col is 14
space_col_align : => second->orig_col is 15
space_col_align : => first->len() is 1
space_col_align : => coldiff is 1
space_col_align : first->orig_line is 3, orig_col is 15, [QUALIFIER/NONE], text() 'const' <==>
space_col_align : second->orig_line is 3, orig_col is 21 [TYPE/NONE], text() 'char', [CallStack]
do_space : orig_line is 3, orig_col is 15, first->text() 'const', type is QUALIFIER
do_space : first->orig_line is 3, first->orig_col is 15, first->text() is 'const', [QUALIFIER/NONE] <===>
second->orig_line is 3, second->orig_col is 21, second->text() is 'char', [TYPE/NONE] : rule sp_after_type[ ]
ensure_force_space : <force between 'const' and 'char'>space_col_align : av is force
space_col_align : len is 5
space_col_align : => coldiff is 5
space_col_align : => av is FORCE
space_col_align : => coldiff is 6
space_col_align : first->orig_line is 3, orig_col is 21, [TYPE/NONE], text() 'char' <==>
space_col_align : second->orig_line is 3, orig_col is 25 [PTR_TYPE/NONE], text() '*', [CallStack]
do_space : orig_line is 3, orig_col is 21, first->text() 'char', type is TYPE
do_space : first->orig_line is 3, first->orig_col is 21, first->text() is 'char', [TYPE/NONE] <===>
second->orig_line is 3, second->orig_col is 25, second->text() is '*', [PTR_TYPE/NONE] : rule IGNORE[ ]
space_col_align : av is ignore
space_col_align : len is 4
space_col_align : => coldiff is 4
space_col_align : => av is IGNORE
space_col_align : => first->orig_line is 3
space_col_align : => second->orig_line is 3
space_col_align : => first->text() is 'char'
space_col_align : => second->text() is '*'
space_col_align : => first->orig_col is 21
space_col_align : => second->orig_col is 25
space_col_align : => first->len() is 4
space_col_align : => coldiff is 4
space_col_align : first->orig_line is 3, orig_col is 25, [PTR_TYPE/NONE], text() '*' <==>
space_col_align : second->orig_line is 3, orig_col is 27 [WORD/NONE], text() 'pN', [CallStack]
do_space : orig_line is 3, orig_col is 25, first->text() '*', type is PTR_TYPE
do_space : first->orig_line is 3, first->orig_col is 25, first->text() is '*', [PTR_TYPE/NONE] <===>
second->orig_line is 3, second->orig_col is 27, second->text() is 'pN', [WORD/NONE] : rule IGNORE[ ]
space_col_align : av is ignore
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is IGNORE
space_col_align : => first->orig_line is 3
space_col_align : => second->orig_line is 3
space_col_align : => first->text() is '*'
space_col_align : => second->text() is 'pN'
space_col_align : => first->orig_col is 25
space_col_align : => second->orig_col is 27
space_col_align : => first->len() is 1
space_col_align : => coldiff is 2
space_col_align : first->orig_line is 3, orig_col is 27, [WORD/NONE], text() 'pN' <==>
space_col_align : second->orig_line is 3, orig_col is 29 [COMMA/NONE], text() ',', [CallStack]
do_space : orig_line is 3, orig_col is 27, first->text() 'pN', type is WORD
do_space : first->orig_line is 3, first->orig_col is 27, first->text() is 'pN', [WORD/NONE] <===>
second->orig_line is 3, second->orig_col is 29, second->text() is ',', [COMMA/NONE] : rule sp_before_comma[ ]
space_col_align : av is remove
space_col_align : len is 2
space_col_align : => coldiff is 2
space_col_align : => av is REMOVE
space_col_align : => coldiff is 2
space_col_align : first->orig_line is 3, orig_col is 29, [COMMA/NONE], text() ',' <==>
space_col_align : second->orig_line is 3, orig_col is 31 [TYPE/NONE], text() 'unsigned', [CallStack]
do_space : orig_line is 3, orig_col is 29, first->text() ',', type is COMMA
do_space : first->orig_line is 3, first->orig_col is 29, first->text() is ',', [COMMA/NONE] <===>
second->orig_line is 3, second->orig_col is 31, second->text() is 'unsigned', [TYPE/NONE] : rule sp_after_comma[ ]
space_col_align : av is ignore
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is IGNORE
space_col_align : => first->orig_line is 3
space_col_align : => second->orig_line is 3
space_col_align : => first->text() is ','
space_col_align : => second->text() is 'unsigned'
space_col_align : => first->orig_col is 29
space_col_align : => second->orig_col is 31
space_col_align : => first->len() is 1
space_col_align : => coldiff is 2
space_col_align : first->orig_line is 3, orig_col is 31, [TYPE/NONE], text() 'unsigned' <==>
space_col_align : second->orig_line is 3, orig_col is 40 [TYPE/NONE], text() 'long', [CallStack]
do_space : orig_line is 3, orig_col is 31, first->text() 'unsigned', type is TYPE
do_space : first->orig_line is 3, first->orig_col is 31, first->text() is 'unsigned', [TYPE/NONE] <===>
second->orig_line is 3, second->orig_col is 40, second->text() is 'long', [TYPE/NONE] : rule sp_after_type[ ]
ensure_force_space : <force between 'unsigned' and 'long'>space_col_align : av is force
space_col_align : len is 8
space_col_align : => coldiff is 8
space_col_align : => av is FORCE
space_col_align : => coldiff is 9
space_col_align : first->orig_line is 3, orig_col is 40, [TYPE/NONE], text() 'long' <==>
space_col_align : second->orig_line is 3, orig_col is 45 [WORD/NONE], text() 'nI', [CallStack]
do_space : orig_line is 3, orig_col is 40, first->text() 'long', type is TYPE
do_space : first->orig_line is 3, first->orig_col is 40, first->text() is 'long', [TYPE/NONE] <===>
second->orig_line is 3, second->orig_col is 45, second->text() is 'nI', [WORD/NONE] : rule sp_after_type[ ]
ensure_force_space : <force between 'long' and 'nI'>space_col_align : av is force
space_col_align : len is 4
space_col_align : => coldiff is 4
space_col_align : => av is FORCE
space_col_align : => coldiff is 5
space_col_align : first->orig_line is 3, orig_col is 45, [WORD/NONE], text() 'nI' <==>
space_col_align : second->orig_line is 3, orig_col is 47 [FPAREN_CLOSE/FUNC_CLASS_DEF], text() ')', [CallStack]
do_space : orig_line is 3, orig_col is 45, first->text() 'nI', type is WORD
do_space : first->orig_line is 3, first->orig_col is 45, first->text() is 'nI', [WORD/NONE] <===>
second->orig_line is 3, second->orig_col is 47, second->text() is ')', [FPAREN_CLOSE/FUNC_CLASS_DEF] : rule sp_inside_fparen[ ]
space_col_align : av is ignore
space_col_align : len is 2
space_col_align : => coldiff is 2
space_col_align : => av is IGNORE
space_col_align : => first->orig_line is 3
space_col_align : => second->orig_line is 3
space_col_align : => first->text() is 'nI'
space_col_align : => second->text() is ')'
space_col_align : => first->orig_col is 45
space_col_align : => second->orig_col is 47
space_col_align : => first->len() is 2
space_col_align : => coldiff is 2
space_col_align : first->orig_line is 3, orig_col is 47, [FPAREN_CLOSE/FUNC_CLASS_DEF], text() ')' <==>
space_col_align : second->orig_line is 3, orig_col is 49 [CONSTR_COLON/NONE], text() ':', [CallStack]
do_space : orig_line is 3, orig_col is 47, first->text() ')', type is FPAREN_CLOSE
do_space : first->orig_line is 3, first->orig_col is 47, first->text() is ')', [FPAREN_CLOSE/FUNC_CLASS_DEF] <===>
second->orig_line is 3, second->orig_col is 49, second->text() is ':', [CONSTR_COLON/NONE] : rule ADD from add_space_table[ ]
space_col_align : av is add
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is ADD
space_col_align : => coldiff is 2
space_col_align : first->orig_line is 3, orig_col is 49, [CONSTR_COLON/NONE], text() ':' <==>
space_col_align : second->orig_line is 3, orig_col is 50 [NEWLINE/NONE], text() '', [CallStack]
do_space : orig_line is 3, orig_col is 49, first->text() ':', type is CONSTR_COLON
space_col_align : av is remove
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is REMOVE
space_col_align : => coldiff is 1
space_col_align : first->orig_line is 4, orig_col is 1, [FUNC_CTOR_VAR/NONE], text() 'pTelName' <==>
space_col_align : second->orig_line is 4, orig_col is 9 [FPAREN_OPEN/FUNC_CTOR_VAR], text() '(', [CallStack]
do_space : orig_line is 4, orig_col is 1, first->text() 'pTelName', type is FUNC_CTOR_VAR
do_space : first->orig_line is 4, first->orig_col is 1, first->text() is 'pTelName', [FUNC_CTOR_VAR/NONE] <===>
second->orig_line is 4, second->orig_col is 9, second->text() is '(', [FPAREN_OPEN/FUNC_CTOR_VAR] : rule sp_func_call_paren[ ]
space_col_align : av is ignore
space_col_align : len is 8
space_col_align : => coldiff is 8
space_col_align : => av is IGNORE
space_col_align : => first->orig_line is 4
space_col_align : => second->orig_line is 4
space_col_align : => first->text() is 'pTelName'
space_col_align : => second->text() is '('
space_col_align : => first->orig_col is 1
space_col_align : => second->orig_col is 9
space_col_align : => first->len() is 8
space_col_align : => coldiff is 8
space_col_align : first->orig_line is 4, orig_col is 9, [FPAREN_OPEN/FUNC_CTOR_VAR], text() '(' <==>
space_col_align : second->orig_line is 4, orig_col is 10 [WORD/NONE], text() 'pN', [CallStack]
do_space : orig_line is 4, orig_col is 9, first->text() '(', type is FPAREN_OPEN
do_space : first->orig_line is 4, first->orig_col is 9, first->text() is '(', [FPAREN_OPEN/FUNC_CTOR_VAR] <===>
second->orig_line is 4, second->orig_col is 10, second->text() is 'pN', [WORD/NONE] : rule sp_inside_fparen[ ]
space_col_align : av is ignore
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is IGNORE
space_col_align : => first->orig_line is 4
space_col_align : => second->orig_line is 4
space_col_align : => first->text() is '('
space_col_align : => second->text() is 'pN'
space_col_align : => first->orig_col is 9
space_col_align : => second->orig_col is 10
space_col_align : => first->len() is 1
space_col_align : => coldiff is 1
space_col_align : first->orig_line is 4, orig_col is 10, [WORD/NONE], text() 'pN' <==>
space_col_align : second->orig_line is 4, orig_col is 12 [FPAREN_CLOSE/FUNC_CTOR_VAR], text() ')', [CallStack]
do_space : orig_line is 4, orig_col is 10, first->text() 'pN', type is WORD
do_space : first->orig_line is 4, first->orig_col is 10, first->text() is 'pN', [WORD/NONE] <===>
second->orig_line is 4, second->orig_col is 12, second->text() is ')', [FPAREN_CLOSE/FUNC_CTOR_VAR] : rule sp_inside_fparen[ ]
space_col_align : av is ignore
space_col_align : len is 2
space_col_align : => coldiff is 2
space_col_align : => av is IGNORE
space_col_align : => first->orig_line is 4
space_col_align : => second->orig_line is 4
space_col_align : => first->text() is 'pN'
space_col_align : => second->text() is ')'
space_col_align : => first->orig_col is 10
space_col_align : => second->orig_col is 12
space_col_align : => first->len() is 2
space_col_align : => coldiff is 2
space_col_align : first->orig_line is 4, orig_col is 12, [FPAREN_CLOSE/FUNC_CTOR_VAR], text() ')' <==>
space_col_align : second->orig_line is 4, orig_col is 13 [COMMA/NONE], text() ',', [CallStack]
do_space : orig_line is 4, orig_col is 12, first->text() ')', type is FPAREN_CLOSE
do_space : first->orig_line is 4, first->orig_col is 12, first->text() is ')', [FPAREN_CLOSE/FUNC_CTOR_VAR] <===>
second->orig_line is 4, second->orig_col is 13, second->text() is ',', [COMMA/NONE] : rule sp_before_comma[ ]
space_col_align : av is remove
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is REMOVE
space_col_align : => coldiff is 1
space_col_align : first->orig_line is 4, orig_col is 13, [COMMA/NONE], text() ',' <==>
space_col_align : second->orig_line is 4, orig_col is 14 [NEWLINE/NONE], text() '', [CallStack]
do_space : orig_line is 4, orig_col is 13, first->text() ',', type is COMMA
space_col_align : av is remove
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is REMOVE
space_col_align : => coldiff is 1
space_col_align : first->orig_line is 5, orig_col is 1, [FUNC_CTOR_VAR/NONE], text() 'nTelIndex' <==>
space_col_align : second->orig_line is 5, orig_col is 10 [FPAREN_OPEN/FUNC_CTOR_VAR], text() '(', [CallStack]
do_space : orig_line is 5, orig_col is 1, first->text() 'nTelIndex', type is FUNC_CTOR_VAR
do_space : first->orig_line is 5, first->orig_col is 1, first->text() is 'nTelIndex', [FUNC_CTOR_VAR/NONE] <===>
second->orig_line is 5, second->orig_col is 10, second->text() is '(', [FPAREN_OPEN/FUNC_CTOR_VAR] : rule sp_func_call_paren[ ]
space_col_align : av is ignore
space_col_align : len is 9
space_col_align : => coldiff is 9
space_col_align : => av is IGNORE
space_col_align : => first->orig_line is 5
space_col_align : => second->orig_line is 5
space_col_align : => first->text() is 'nTelIndex'
space_col_align : => second->text() is '('
space_col_align : => first->orig_col is 1
space_col_align : => second->orig_col is 10
space_col_align : => first->len() is 9
space_col_align : => coldiff is 9
space_col_align : first->orig_line is 5, orig_col is 10, [FPAREN_OPEN/FUNC_CTOR_VAR], text() '(' <==>
space_col_align : second->orig_line is 5, orig_col is 11 [WORD/NONE], text() 'n', [CallStack]
do_space : orig_line is 5, orig_col is 10, first->text() '(', type is FPAREN_OPEN
do_space : first->orig_line is 5, first->orig_col is 10, first->text() is '(', [FPAREN_OPEN/FUNC_CTOR_VAR] <===>
second->orig_line is 5, second->orig_col is 11, second->text() is 'n', [WORD/NONE] : rule sp_inside_fparen[ ]
space_col_align : av is ignore
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is IGNORE
space_col_align : => first->orig_line is 5
space_col_align : => second->orig_line is 5
space_col_align : => first->text() is '('
space_col_align : => second->text() is 'n'
space_col_align : => first->orig_col is 10
space_col_align : => second->orig_col is 11
space_col_align : => first->len() is 1
space_col_align : => coldiff is 1
space_col_align : first->orig_line is 5, orig_col is 11, [WORD/NONE], text() 'n' <==>
space_col_align : second->orig_line is 5, orig_col is 12 [FPAREN_CLOSE/FUNC_CTOR_VAR], text() ')', [CallStack]
do_space : orig_line is 5, orig_col is 11, first->text() 'n', type is WORD
do_space : first->orig_line is 5, first->orig_col is 11, first->text() is 'n', [WORD/NONE] <===>
second->orig_line is 5, second->orig_col is 12, second->text() is ')', [FPAREN_CLOSE/FUNC_CTOR_VAR] : rule sp_inside_fparen[ ]
space_col_align : av is ignore
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is IGNORE
space_col_align : => first->orig_line is 5
space_col_align : => second->orig_line is 5
space_col_align : => first->text() is 'n'
space_col_align : => second->text() is ')'
space_col_align : => first->orig_col is 11
space_col_align : => second->orig_col is 12
space_col_align : => first->len() is 1
space_col_align : => coldiff is 1
space_col_align : first->orig_line is 5, orig_col is 12, [FPAREN_CLOSE/FUNC_CTOR_VAR], text() ')' <==>
space_col_align : second->orig_line is 5, orig_col is 13 [NEWLINE/NONE], text() '', [CallStack]
do_space : orig_line is 5, orig_col is 12, first->text() ')', type is FPAREN_CLOSE
space_col_align : av is remove
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is REMOVE
space_col_align : => coldiff is 1
space_col_align : first->orig_line is 6, orig_col is 1, [BRACE_OPEN/FUNC_CLASS_DEF], text() '{' <==>
space_col_align : second->orig_line is 6, orig_col is 2 [NEWLINE/NONE], text() '', [CallStack]
do_space : orig_line is 6, orig_col is 1, first->text() '{', type is BRACE_OPEN
space_col_align : av is remove
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is REMOVE
space_col_align : => coldiff is 1
space_col_align : first->orig_line is 7, orig_col is 1, [BRACE_CLOSE/FUNC_CLASS_DEF], text() '}' <==>
space_col_align : second->orig_line is 7, orig_col is 2 [NEWLINE/NONE], text() '', [CallStack]
do_space : orig_line is 7, orig_col is 1, first->text() '}', type is BRACE_CLOSE
space_col_align : av is remove
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is REMOVE
space_col_align : => coldiff is 1
space_col_align : first->orig_line is 9, orig_col is 1, [DESTRUCTOR/FUNC_CLASS_DEF], text() '~' <==>
space_col_align : second->orig_line is 9, orig_col is 2 [FUNC_CLASS_DEF/DESTRUCTOR], text() 'TelegramIndex', [CallStack]
do_space : orig_line is 9, orig_col is 1, first->text() '~', type is DESTRUCTOR
do_space : first->orig_line is 9, first->orig_col is 1, first->text() is '~', [DESTRUCTOR/FUNC_CLASS_DEF] <===>
second->orig_line is 9, second->orig_col is 2, second->text() is 'TelegramIndex', [FUNC_CLASS_DEF/DESTRUCTOR] : rule REMOVE[ ]
space_col_align : av is remove
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is REMOVE
space_col_align : => coldiff is 1
space_col_align : first->orig_line is 9, orig_col is 2, [FUNC_CLASS_DEF/DESTRUCTOR], text() 'TelegramIndex' <==>
space_col_align : second->orig_line is 9, orig_col is 15 [FPAREN_OPEN/FUNC_CLASS_DEF], text() '(', [CallStack]
do_space : orig_line is 9, orig_col is 2, first->text() 'TelegramIndex', type is FUNC_CLASS_DEF
do_space : first->orig_line is 9, first->orig_col is 2, first->text() is 'TelegramIndex', [FUNC_CLASS_DEF/DESTRUCTOR] <===>
second->orig_line is 9, second->orig_col is 15, second->text() is '(', [FPAREN_OPEN/FUNC_CLASS_DEF] : rule sp_func_class_paren[ ]
space_col_align : av is ignore
space_col_align : len is 13
space_col_align : => coldiff is 13
space_col_align : => av is IGNORE
space_col_align : => first->orig_line is 9
space_col_align : => second->orig_line is 9
space_col_align : => first->text() is 'TelegramIndex'
space_col_align : => second->text() is '('
space_col_align : => first->orig_col is 2
space_col_align : => second->orig_col is 15
space_col_align : => first->len() is 13
space_col_align : => coldiff is 13
space_col_align : first->orig_line is 9, orig_col is 15, [FPAREN_OPEN/FUNC_CLASS_DEF], text() '(' <==>
space_col_align : second->orig_line is 9, orig_col is 16 [FPAREN_CLOSE/FUNC_CLASS_DEF], text() ')', [CallStack]
do_space : orig_line is 9, orig_col is 15, first->text() '(', type is FPAREN_OPEN
do_space : first->orig_line is 9, first->orig_col is 15, first->text() is '(', [FPAREN_OPEN/FUNC_CLASS_DEF] <===>
second->orig_line is 9, second->orig_col is 16, second->text() is ')', [FPAREN_CLOSE/FUNC_CLASS_DEF] : rule sp_inside_fparens[ ]
space_col_align : av is ignore
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is IGNORE
space_col_align : => first->orig_line is 9
space_col_align : => second->orig_line is 9
space_col_align : => first->text() is '('
space_col_align : => second->text() is ')'
space_col_align : => first->orig_col is 15
space_col_align : => second->orig_col is 16
space_col_align : => first->len() is 1
space_col_align : => coldiff is 1
space_col_align : first->orig_line is 9, orig_col is 16, [FPAREN_CLOSE/FUNC_CLASS_DEF], text() ')' <==>
space_col_align : second->orig_line is 9, orig_col is 17 [NEWLINE/NONE], text() '', [CallStack]
do_space : orig_line is 9, orig_col is 16, first->text() ')', type is FPAREN_CLOSE
space_col_align : av is remove
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is REMOVE
space_col_align : => coldiff is 1
space_col_align : first->orig_line is 10, orig_col is 1, [BRACE_OPEN/FUNC_CLASS_DEF], text() '{' <==>
space_col_align : second->orig_line is 10, orig_col is 2 [NEWLINE/NONE], text() '', [CallStack]
do_space : orig_line is 10, orig_col is 1, first->text() '{', type is BRACE_OPEN
space_col_align : av is remove
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is REMOVE
space_col_align : => coldiff is 1
space_col_align : first->orig_line is 11, orig_col is 1, [BRACE_CLOSE/FUNC_CLASS_DEF], text() '}' <==>
space_col_align : second->orig_line is 11, orig_col is 2 [NEWLINE/NONE], text() '', [CallStack]
do_space : orig_line is 11, orig_col is 1, first->text() '}', type is BRACE_CLOSE
space_col_align : av is remove
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is REMOVE
space_col_align : => coldiff is 1
space_col_align : first->orig_line is 13, orig_col is 1, [QUALIFIER/NONE], text() 'const' <==>
space_col_align : second->orig_line is 13, orig_col is 7 [TYPE/NONE], text() 'char', [CallStack]
do_space : orig_line is 13, orig_col is 1, first->text() 'const', type is QUALIFIER
do_space : first->orig_line is 13, first->orig_col is 1, first->text() is 'const', [QUALIFIER/NONE] <===>
second->orig_line is 13, second->orig_col is 7, second->text() is 'char', [TYPE/NONE] : rule sp_after_type[ ]
ensure_force_space : <force between 'const' and 'char'>space_col_align : av is force
space_col_align : len is 5
space_col_align : => coldiff is 5
space_col_align : => av is FORCE
space_col_align : => coldiff is 6
space_col_align : first->orig_line is 13, orig_col is 7, [TYPE/NONE], text() 'char' <==>
space_col_align : second->orig_line is 13, orig_col is 11 [PTR_TYPE/NONE], text() '*', [CallStack]
do_space : orig_line is 13, orig_col is 7, first->text() 'char', type is TYPE
do_space : first->orig_line is 13, first->orig_col is 7, first->text() is 'char', [TYPE/NONE] <===>
second->orig_line is 13, second->orig_col is 11, second->text() is '*', [PTR_TYPE/NONE] : rule IGNORE[ ]
space_col_align : av is ignore
space_col_align : len is 4
space_col_align : => coldiff is 4
space_col_align : => av is IGNORE
space_col_align : => first->orig_line is 13
space_col_align : => second->orig_line is 13
space_col_align : => first->text() is 'char'
space_col_align : => second->text() is '*'
space_col_align : => first->orig_col is 7
space_col_align : => second->orig_col is 11
space_col_align : => first->len() is 4
space_col_align : => coldiff is 4
space_col_align : first->orig_line is 13, orig_col is 11, [PTR_TYPE/NONE], text() '*' <==>
space_col_align : second->orig_line is 13, orig_col is 13 [QUALIFIER/NONE], text() 'const', [CallStack]
do_space : orig_line is 13, orig_col is 11, first->text() '*', type is PTR_TYPE
do_space : first->orig_line is 13, first->orig_col is 11, first->text() is '*', [PTR_TYPE/NONE] <===>
second->orig_line is 13, second->orig_col is 13, second->text() is 'const', [QUALIFIER/NONE] : rule IGNORE[ ]
space_col_align : av is ignore
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is IGNORE
space_col_align : => first->orig_line is 13
space_col_align : => second->orig_line is 13
space_col_align : => first->text() is '*'
space_col_align : => second->text() is 'const'
space_col_align : => first->orig_col is 11
space_col_align : => second->orig_col is 13
space_col_align : => first->len() is 1
space_col_align : => coldiff is 2
space_col_align : first->orig_line is 13, orig_col is 13, [QUALIFIER/NONE], text() 'const' <==>
space_col_align : second->orig_line is 13, orig_col is 19 [WORD/NONE], text() 'pTelName', [CallStack]
do_space : orig_line is 13, orig_col is 13, first->text() 'const', type is QUALIFIER
do_space : first->orig_line is 13, first->orig_col is 13, first->text() is 'const', [QUALIFIER/NONE] <===>
second->orig_line is 13, second->orig_col is 19, second->text() is 'pTelName', [WORD/NONE] : rule sp_after_type[ ]
ensure_force_space : <force between 'const' and 'pTelName'>space_col_align : av is force
space_col_align : len is 5
space_col_align : => coldiff is 5
space_col_align : => av is FORCE
space_col_align : => coldiff is 6
space_col_align : first->orig_line is 13, orig_col is 19, [WORD/NONE], text() 'pTelName' <==>
space_col_align : second->orig_line is 13, orig_col is 27 [SEMICOLON/NONE], text() ';', [CallStack]
do_space : orig_line is 13, orig_col is 19, first->text() 'pTelName', type is WORD
do_space : first->orig_line is 13, first->orig_col is 19, first->text() is 'pTelName', [WORD/NONE] <===>
second->orig_line is 13, second->orig_col is 27, second->text() is ';', [SEMICOLON/NONE] : rule sp_before_semi[ ]
space_col_align : av is remove
space_col_align : len is 8
space_col_align : => coldiff is 8
space_col_align : => av is REMOVE
space_col_align : => coldiff is 8
space_col_align : first->orig_line is 13, orig_col is 27, [SEMICOLON/NONE], text() ';' <==>
space_col_align : second->orig_line is 13, orig_col is 28 [NEWLINE/NONE], text() '', [CallStack]
do_space : orig_line is 13, orig_col is 27, first->text() ';', type is SEMICOLON
space_col_align : av is remove
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is REMOVE
space_col_align : => coldiff is 1
space_col_align : first->orig_line is 14, orig_col is 1, [TYPE/NONE], text() 'unsigned' <==>
space_col_align : second->orig_line is 14, orig_col is 10 [TYPE/NONE], text() 'long', [CallStack]
do_space : orig_line is 14, orig_col is 1, first->text() 'unsigned', type is TYPE
do_space : first->orig_line is 14, first->orig_col is 1, first->text() is 'unsigned', [TYPE/NONE] <===>
second->orig_line is 14, second->orig_col is 10, second->text() is 'long', [TYPE/NONE] : rule sp_after_type[ ]
ensure_force_space : <force between 'unsigned' and 'long'>space_col_align : av is force
space_col_align : len is 8
space_col_align : => coldiff is 8
space_col_align : => av is FORCE
space_col_align : => coldiff is 9
space_col_align : first->orig_line is 14, orig_col is 10, [TYPE/NONE], text() 'long' <==>
space_col_align : second->orig_line is 14, orig_col is 15 [WORD/NONE], text() 'nTelIndex', [CallStack]
do_space : orig_line is 14, orig_col is 10, first->text() 'long', type is TYPE
do_space : first->orig_line is 14, first->orig_col is 10, first->text() is 'long', [TYPE/NONE] <===>
second->orig_line is 14, second->orig_col is 15, second->text() is 'nTelIndex', [WORD/NONE] : rule sp_after_type[ ]
ensure_force_space : <force between 'long' and 'nTelIndex'>space_col_align : av is force
space_col_align : len is 4
space_col_align : => coldiff is 4
space_col_align : => av is FORCE
space_col_align : => coldiff is 5
space_col_align : first->orig_line is 14, orig_col is 15, [WORD/NONE], text() 'nTelIndex' <==>
space_col_align : second->orig_line is 14, orig_col is 24 [SEMICOLON/NONE], text() ';', [CallStack]
do_space : orig_line is 14, orig_col is 15, first->text() 'nTelIndex', type is WORD
do_space : first->orig_line is 14, first->orig_col is 15, first->text() is 'nTelIndex', [WORD/NONE] <===>
second->orig_line is 14, second->orig_col is 24, second->text() is ';', [SEMICOLON/NONE] : rule sp_before_semi[ ]
space_col_align : av is remove
space_col_align : len is 9
space_col_align : => coldiff is 9
space_col_align : => av is REMOVE
space_col_align : => coldiff is 9
space_col_align : first->orig_line is 14, orig_col is 24, [SEMICOLON/NONE], text() ';' <==>
space_col_align : second->orig_line is 14, orig_col is 25 [NEWLINE/NONE], text() '', [CallStack]
do_space : orig_line is 14, orig_col is 24, first->text() ';', type is SEMICOLON
space_col_align : av is remove
space_col_align : len is 1
space_col_align : => coldiff is 1
space_col_align : => av is REMOVE
space_col_align : => coldiff is 1

@ -162,7 +162,11 @@ tokenize_cleanup : orig_line is 3, orig_col is 25, pc->text() '*'
pc->type is STAR, pc->parent_type is NONE => *type is PTR_TYPE, *parent_type is NONE
tokenize_cleanup : orig_line is 13, orig_col is 11, pc->text() '*'
pc->type is STAR, pc->parent_type is NONE => *type is PTR_TYPE, *parent_type is NONE
mark_class_ctor : orig_line is 3, orig_col is 1, pc->text() 'TelegramIndex'
try_find_end_chunk : orig_line is 1, orig_col is 8, pc->text() 'TelegramIndex'
pc->type is TYPE, pc->parent_type is NONE => *type is WORD, *parent_type is NONE
make_type : orig_line is 1, orig_col is 8, pc->text() 'TelegramIndex'
pc->type is WORD, pc->parent_type is NONE => *type is TYPE, *parent_type is NONE
mark_constructors : orig_line is 3, orig_col is 1, pc->text() 'TelegramIndex'
pc->type is WORD, pc->parent_type is NONE => *type is FUNC_CLASS_DEF, *parent_type is NONE
flag_parens : orig_line is 3, orig_col is 14, pc->text() '('
pc->type is PAREN_OPEN, pc->parent_type is NONE => *type is FPAREN_OPEN, *parent_type is NONE
@ -182,7 +186,7 @@ flag_parens : orig_line is 5, orig_col is 10, pc->text() '('
pc->type is PAREN_OPEN, pc->parent_type is NONE => *type is FPAREN_OPEN, *parent_type is NONE
flag_parens : orig_line is 5, orig_col is 12, pc->text() ')'
pc->type is PAREN_CLOSE, pc->parent_type is NONE => *type is FPAREN_CLOSE, *parent_type is NONE
mark_class_ctor : orig_line is 9, orig_col is 2, pc->text() 'TelegramIndex'
mark_constructors : orig_line is 9, orig_col is 2, pc->text() 'TelegramIndex'
pc->type is WORD, pc->parent_type is NONE => *type is FUNC_CLASS_DEF, *parent_type is NONE
mark_cpp_constructor : orig_line is 9, orig_col is 1, pc->text() '~'
pc->type is INV, pc->parent_type is NONE => *type is DESTRUCTOR, *parent_type is NONE

@ -0,0 +1,23 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Uncrustify: where do the Spaces options work</title>
</head>
<body lang="en-US">
<p>
</p>
<pre>
{
a<a title="1,sp_assign"><font color="red">M</font></a>=<a title="2,69,sp_assign"><font color="red">M</font></a>b<a title="3,70,75,sp_arith"><font color="red">M</font></a>+<a title="4,71,76,80,sp_arith"><font color="red">M</font></a>111<a title="5,72,77,81,84,sp_arith"><font color="red">M</font></a>-<a title="6,73,78,82,85,87,sp_arith"><font color="red">M</font></a>55<a title="7,74,79,83,86,88,89,sp_before_semi"><font color="red">M</font></a>;
}
template<a title="8,sp_before_angle"><font color="red">M</font></a>&lt;<a title="9,90,sp_inside_angle"><font color="red">M</font></a>typename<a title="10,91,96,ADD from add_space_table"><font color="red">M</font></a>... A<a title="11,92,97,101,sp_before_comma"><font color="red">M</font></a>,<a title="12,93,98,102,105,sp_after_comma"><font color="red">M</font></a>int<a title="13,94,99,103,106,108,sp_type_ellipsis"><font color="red">M</font></a>... B<a title="14,95,100,104,107,109,110,sp_inside_angle"><font color="red">M</font></a>&gt;
struct<a title="15,ADD from add_space_table"><font color="red">M</font></a>foo1<a title="16,111,sp_after_type"><font color="red">M</font></a>:<a title="17,112,128,ADD from add_space_table"><font color="red">M</font></a>foo1<a title="18,113,129,144,sp_before_angle"><font color="red">M</font></a>&lt;<a title="19,114,130,145,159,sp_inside_angle"><font color="red">M</font></a>A<a title="20,115,131,146,160,173,sp_type_ellipsis"><font color="red">M</font></a>...<a title="21,116,132,147,161,174,186,sp_before_comma"><font color="red">M</font></a>,<a title="22,117,133,148,162,175,187,198,sp_after_comma"><font color="red">M</font></a>(<a title="23,118,134,149,163,176,188,199,209,sp_inside_paren"><font color="red">M</font></a>sizeof<a title="24,119,135,150,164,177,189,200,210,219,sp_sizeof_ellipsis"><font color="red">M</font></a>...<a title="25,120,136,151,165,178,190,201,211,220,228,sp_sizeof_ellipsis_paren"><font color="red">M</font></a>(<a title="26,121,137,152,166,179,191,202,212,221,229,236,sp_inside_paren"><font color="red">M</font></a>A<a title="27,122,138,153,167,180,192,203,213,222,230,237,243,sp_inside_paren"><font color="red">M</font></a>)<a title="28,123,139,154,168,181,193,204,214,223,231,238,244,249,sp_arith"><font color="red">M</font></a>+<a title="29,124,140,155,169,182,194,205,215,224,232,239,245,250,254,sp_arith"><font color="red">M</font></a>B<a title="30,125,141,156,170,183,195,206,216,225,233,240,246,251,255,258,sp_inside_paren"><font color="red">M</font></a>)<a title="31,126,142,157,171,184,196,207,217,226,234,241,247,252,256,259,261,sp_paren_ellipsis"><font color="red">M</font></a>...<a title="32,127,143,158,172,185,197,208,218,227,235,242,248,253,257,260,262,263,sp_inside_angle"><font color="red">M</font></a>&gt;
{
foo1<a title="33,51,sp_func_class_paren"><font color="red">M</font></a>(<a title="34,52,264,sp_inside_fparens"><font color="red">M</font></a>)<a title="35,53,265,266,sp_fparen_brace"><font color="red">M</font></a>{
int<a title="36,54,sp_after_type"><font color="red">M</font></a>x<a title="37,55,267,sp_assign"><font color="red">M</font></a>=<a title="38,56,268,274,sp_assign"><font color="red">M</font></a>sizeof<a title="39,57,269,275,280,sp_sizeof_ellipsis"><font color="red">M</font></a>...<a title="40,58,270,276,281,285,sp_sizeof_ellipsis_paren"><font color="red">M</font></a>(<a title="41,59,271,277,282,286,289,sp_inside_paren"><font color="red">M</font></a>A<a title="42,60,272,278,283,287,290,292,sp_inside_paren"><font color="red">M</font></a>)<a title="43,61,273,279,284,288,291,293,294,sp_before_semi"><font color="red">M</font></a>;
bool<a title="44,62,sp_after_type"><font color="red">M</font></a>b<a title="45,63,295,sp_assign"><font color="red">M</font></a>=<a title="46,64,296,300,sp_assign"><font color="red">M</font></a>x<a title="47,65,297,301,304,sp_compare"><font color="red">M</font></a>><a title="48,66,298,302,305,307,sp_compare"><font color="red">M</font></a>1<a title="49,67,299,303,306,308,309,sp_before_semi"><font color="red">M</font></a>;
}
}<a title="50,sp_before_semi"><font color="red">M</font></a>;
</pre>
</body>
</html>

@ -0,0 +1,685 @@
number of loops,1,
language,CPP,
Line,Tag,Parent_type,Type of the parent,Column,Orig Col Strt,Orig Col End,Orig Sp Before,Br,Lvl,pp,Flags,Nl Before,Nl After,Text,
1,COMMENT_MULTI,COMMENT_WHOLE,PARENT_NOT_SET,1,4,7,3,0,0,0,"",9,0," /**␤ * the enum (and variable declarations thereof) could be of␤ * the following forms:␤ *␤ * ""enum type [: integral_type] { ... } [x, ...]""␤ * ""enum type [: integral_type]""␤ * ""enum class type [: integral_type] { ... } [x, ...]""␤ * ""enum class type [: integral_type]""␤ * ""enum [: integral_type] { ... } x, ...""␤ */"
10,NEWLINE,NONE,PARENT_NOT_SET,7,7,4,0,0,0,0,"",2,0,
12,COMMENT_MULTI,COMMENT_WHOLE,PARENT_NOT_SET,1,4,7,0,0,0,0,"",9,0," /**␤ * the class/struct (and variable declarations thereof) could be of␤ * the following forms:␤ *␤ * template<...> class/struct[<...>] [macros/attributes ...] type [: bases ...] { }␤ * template<...> class/struct[<...>] [macros/attributes ...] type␤ * class/struct[ [macros/attributes ...] type [: bases ...] { } [x, ...]␤ * class/struct [macros/attributes ...] type [x, ...]␤ * class/struct [macros/attributes ...] [: bases] { } x, ...␤ */"
21,NEWLINE,NONE,PARENT_NOT_SET,7,7,1,0,0,0,0,"",2,0,
23,PREPROC,PP_DEFINE,PARENT_NOT_SET,1,1,2,0,1,1,0,"IN_PREPROC,STMT_START,EXPR_START,DONT_INDENT,PUNCTUATOR",0,0," #"
23,PP_DEFINE,NONE,PARENT_NOT_SET,2,2,8,0,1,1,0,"IN_PREPROC,FORCE_SPACE",0,0," define"
23,MACRO_FUNC,NONE,PARENT_NOT_SET,9,9,16,1,1,1,0,"IN_PREPROC,EXPR_START",0,0," ALIGNAS"
23,FPAREN_OPEN,MACRO_FUNC,PARENT_NOT_SET,16,16,17,0,1,1,0,"IN_PREPROC,PUNCTUATOR",0,0," ("
23,WORD,NONE,PARENT_NOT_SET,17,17,31,0,1,2,0,"IN_PREPROC,IN_FCN_CALL,EXPR_START",0,0," byte_alignment"
23,FPAREN_CLOSE,MACRO_FUNC,PARENT_NOT_SET,31,31,32,0,1,1,0,"IN_PREPROC,IN_FCN_CALL,PUNCTUATOR",0,0," )"
23,ATTRIBUTE,NONE,PARENT_NOT_SET,33,33,46,1,1,1,0,"IN_PREPROC",0,0," __attribute__"
23,FPAREN_OPEN,ATTRIBUTE,PARENT_NOT_SET,46,46,47,0,1,1,0,"IN_PREPROC,PUNCTUATOR",0,0," ("
23,PAREN_OPEN,NONE,PARENT_NOT_SET,47,47,48,0,1,2,0,"IN_PREPROC,EXPR_START,PUNCTUATOR",0,0," ("
23,FUNC_CALL,NONE,PARENT_NOT_SET,48,48,55,0,1,3,0,"IN_PREPROC,EXPR_START",0,0," aligned"
23,FPAREN_OPEN,FUNC_CALL,PARENT_NOT_SET,55,55,56,0,1,3,0,"IN_PREPROC,PUNCTUATOR",0,0," ("
23,WORD,NONE,PARENT_NOT_SET,56,56,70,0,1,4,0,"IN_PREPROC,IN_FCN_CALL,EXPR_START",0,0," byte_alignment"
23,FPAREN_CLOSE,FUNC_CALL,PARENT_NOT_SET,70,70,71,0,1,3,0,"IN_PREPROC,IN_FCN_CALL,PUNCTUATOR",0,0," )"
23,PAREN_CLOSE,NONE,PARENT_NOT_SET,71,71,72,0,1,2,0,"IN_PREPROC,PUNCTUATOR",0,0," )"
23,FPAREN_CLOSE,ATTRIBUTE,PARENT_NOT_SET,72,72,73,0,1,1,0,"IN_PREPROC,PUNCTUATOR",0,0," )"
23,NEWLINE,NONE,PARENT_NOT_SET,73,73,1,0,0,0,0,"",2,0,
25,PREPROC,PP_IF,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_PREPROC,DONT_INDENT,PUNCTUATOR",0,0," #"
25,PP_IF,NONE,PARENT_NOT_SET,2,2,4,0,0,0,1,"IN_PREPROC,FORCE_SPACE",0,0," if"
25,PP_DEFINED,NONE,PARENT_NOT_SET,5,5,12,1,0,0,1,"IN_PREPROC,EXPR_START",0,0," defined"
25,PAREN_OPEN,NONE,PARENT_NOT_SET,13,13,14,1,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," ("
25,WORD,NONE,PARENT_NOT_SET,14,14,22,0,0,0,1,"IN_PREPROC,EXPR_START",0,0," __unix__"
25,PAREN_CLOSE,NONE,PARENT_NOT_SET,22,22,23,0,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," )"
25,BOOL,NONE,PARENT_NOT_SET,24,24,26,1,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," ||"
25,PAREN_OPEN,NONE,PARENT_NOT_SET,27,27,28,1,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," ("
25,PP_DEFINED,NONE,PARENT_NOT_SET,28,28,35,0,0,0,1,"IN_PREPROC,EXPR_START",0,0," defined"
25,PAREN_OPEN,NONE,PARENT_NOT_SET,36,36,37,1,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," ("
25,WORD,NONE,PARENT_NOT_SET,37,37,46,0,0,0,1,"IN_PREPROC,EXPR_START",0,0," __APPLE__"
25,PAREN_CLOSE,NONE,PARENT_NOT_SET,46,46,47,0,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," )"
25,BOOL,NONE,PARENT_NOT_SET,48,48,50,1,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," &&"
25,PP_DEFINED,NONE,PARENT_NOT_SET,51,51,58,1,0,0,1,"IN_PREPROC",0,0," defined"
25,PAREN_OPEN,NONE,PARENT_NOT_SET,59,59,60,1,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," ("
25,WORD,NONE,PARENT_NOT_SET,60,60,68,0,0,0,1,"IN_PREPROC,EXPR_START",0,0," __MACH__"
25,PAREN_CLOSE,NONE,PARENT_NOT_SET,68,68,69,0,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," )"
25,PAREN_CLOSE,NONE,PARENT_NOT_SET,69,69,70,0,0,0,1,"IN_PREPROC,PUNCTUATOR",0,0," )"
25,NEWLINE,NONE,PARENT_NOT_SET,70,70,1,0,0,0,1,"",1,0,
26,PREPROC,PP_DEFINE,PARENT_NOT_SET,1,1,2,0,1,1,1,"IN_PREPROC,STMT_START,EXPR_START,DONT_INDENT,PUNCTUATOR",0,0," #"
26,PP_DEFINE,NONE,PARENT_NOT_SET,2,2,8,0,1,1,1,"IN_PREPROC,FORCE_SPACE",0,0," define"
26,MACRO,NONE,PARENT_NOT_SET,9,9,19,1,1,1,1,"IN_PREPROC,FORCE_SPACE",0,0," API_EXPORT"
26,ATTRIBUTE,NONE,PARENT_NOT_SET,20,20,33,1,1,1,1,"IN_PREPROC,EXPR_START",0,0," __attribute__"
26,FPAREN_OPEN,ATTRIBUTE,PARENT_NOT_SET,34,34,35,1,1,1,1,"IN_PREPROC,STMT_START,EXPR_START,PUNCTUATOR",0,0," ("
26,PAREN_OPEN,NONE,PARENT_NOT_SET,35,35,36,0,1,2,1,"IN_PREPROC,EXPR_START,PUNCTUATOR",0,0," ("
26,FUNC_CALL,NONE,PARENT_NOT_SET,36,36,46,0,1,3,1,"IN_PREPROC,EXPR_START",0,0," visibility"
26,FPAREN_OPEN,FUNC_CALL,PARENT_NOT_SET,46,46,47,0,1,3,1,"IN_PREPROC,PUNCTUATOR",0,0," ("
26,STRING,PP_INCLUDE,PARENT_NOT_SET,47,47,56,0,1,4,1,"IN_PREPROC,IN_FCN_CALL,EXPR_START",0,0," ""default"""
26,FPAREN_CLOSE,FUNC_CALL,PARENT_NOT_SET,56,56,57,0,1,3,1,"IN_PREPROC,IN_FCN_CALL,PUNCTUATOR",0,0," )"
26,PAREN_CLOSE,NONE,PARENT_NOT_SET,57,57,58,0,1,2,1,"IN_PREPROC,PUNCTUATOR",0,0," )"
26,FPAREN_CLOSE,ATTRIBUTE,PARENT_NOT_SET,58,58,59,0,1,1,1,"IN_PREPROC,PUNCTUATOR",0,0," )"
26,NEWLINE,NONE,PARENT_NOT_SET,59,59,1,0,0,0,1,"",1,0,
27,PREPROC,PP_ELSE,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_PREPROC,DONT_INDENT,PUNCTUATOR",0,0," #"
27,PP_ELSE,NONE,PP_IF,2,2,6,0,0,0,1,"IN_PREPROC,FORCE_SPACE",0,0," elif"
27,PP_DEFINED,NONE,PARENT_NOT_SET,7,7,14,1,0,0,1,"IN_PREPROC,FORCE_SPACE,EXPR_START",0,0," defined"
27,WORD,NONE,PARENT_NOT_SET,15,15,21,1,0,0,1,"IN_PREPROC",0,0," _WIN32"
27,NEWLINE,NONE,PARENT_NOT_SET,21,21,1,0,0,0,1,"",1,0,
28,PREPROC,PP_DEFINE,PARENT_NOT_SET,1,1,2,0,1,1,1,"IN_PREPROC,STMT_START,EXPR_START,DONT_INDENT,PUNCTUATOR",0,0," #"
28,PP_DEFINE,NONE,PARENT_NOT_SET,2,2,8,0,1,1,1,"IN_PREPROC,FORCE_SPACE",0,0," define"
28,MACRO,NONE,PARENT_NOT_SET,9,9,19,1,1,1,1,"IN_PREPROC,FORCE_SPACE",0,0," API_EXPORT"
28,DECLSPEC,NONE,PARENT_NOT_SET,20,20,30,1,1,1,1,"IN_PREPROC,STMT_START,EXPR_START",0,0," __declspec"
28,PAREN_OPEN,DECLSPEC,PARENT_NOT_SET,30,30,31,0,1,1,1,"IN_PREPROC,PUNCTUATOR",0,0," ("
28,WORD,NONE,PARENT_NOT_SET,31,31,40,0,1,2,1,"IN_PREPROC,EXPR_START",0,0," dllexport"
28,PAREN_CLOSE,DECLSPEC,PARENT_NOT_SET,40,40,41,0,1,1,1,"IN_PREPROC,PUNCTUATOR",0,0," )"
28,NEWLINE,NONE,PARENT_NOT_SET,41,41,1,0,0,0,1,"",1,0,
29,PREPROC,PP_ELSE,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_PREPROC,DONT_INDENT,PUNCTUATOR",0,0," #"
29,PP_ELSE,NONE,PP_IF,2,2,6,0,0,0,1,"IN_PREPROC",0,0," else"
29,NEWLINE,NONE,PARENT_NOT_SET,6,6,1,0,0,0,1,"",1,0,
30,PREPROC,PP_DEFINE,PARENT_NOT_SET,1,1,2,0,1,1,1,"IN_PREPROC,STMT_START,EXPR_START,DONT_INDENT,PUNCTUATOR",0,0," #"
30,PP_DEFINE,NONE,PARENT_NOT_SET,2,2,8,0,1,1,1,"IN_PREPROC,FORCE_SPACE",0,0," define"
30,MACRO,NONE,PARENT_NOT_SET,9,9,19,1,1,1,1,"IN_PREPROC",0,0," API_EXPORT"
30,NEWLINE,NONE,PARENT_NOT_SET,19,19,1,0,0,0,1,"",1,0,
31,PREPROC,PP_ENDIF,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_PREPROC,DONT_INDENT,PUNCTUATOR",0,0," #"
31,PP_ENDIF,NONE,PP_IF,2,2,7,0,0,0,0,"IN_PREPROC",0,0," endif"
31,NEWLINE,NONE,PARENT_NOT_SET,7,7,1,0,0,0,0,"",2,0,
33,NAMESPACE,NONE,PARENT_NOT_SET,1,1,10,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," namespace"
33,WORD,NAMESPACE,PARENT_NOT_SET,11,11,26,1,0,0,0,"",0,0," outer_namespace"
33,NEWLINE,NONE,PARENT_NOT_SET,26,26,1,0,0,0,0,"",1,0,
34,BRACE_OPEN,NAMESPACE,PARENT_NOT_SET,1,1,2,0,0,0,0,"PUNCTUATOR",0,0," {"
34,NEWLINE,NONE,PARENT_NOT_SET,2,2,1,0,1,1,0,"IN_NAMESPACE",2,0,
36,NAMESPACE,NONE,PARENT_NOT_SET,1,1,10,0,1,1,0,"IN_NAMESPACE,FORCE_SPACE,STMT_START,EXPR_START",0,0," namespace"
36,WORD,NAMESPACE,PARENT_NOT_SET,11,11,26,1,1,1,0,"IN_NAMESPACE",0,0," inner_namespace"
36,NEWLINE,NONE,PARENT_NOT_SET,26,26,1,0,1,1,0,"IN_NAMESPACE",1,0,
37,BRACE_OPEN,NAMESPACE,PARENT_NOT_SET,1,1,2,0,1,1,0,"IN_NAMESPACE,PUNCTUATOR",0,0," {"
37,NEWLINE,NONE,PARENT_NOT_SET,2,2,1,0,2,2,0,"IN_NAMESPACE",2,0,
39,CLASS,NONE,PARENT_NOT_SET,1,1,6,0,2,2,0,"IN_NAMESPACE,FORCE_SPACE,STMT_START,EXPR_START",0,0," class"
39,TYPE,CLASS,PARENT_NOT_SET,7,7,12,1,2,2,0,"IN_NAMESPACE",0,0," Base1"
39,BRACE_OPEN,CLASS,PARENT_NOT_SET,13,13,14,1,2,2,0,"IN_CLASS,IN_NAMESPACE,ONE_LINER,EMPTY_BODY,PUNCTUATOR",0,0," {"
39,BRACE_CLOSE,CLASS,PARENT_NOT_SET,15,15,16,1,2,2,0,"IN_CLASS,IN_NAMESPACE,ONE_LINER,EMPTY_BODY,PUNCTUATOR",0,0," }"
39,SEMICOLON,CLASS,PARENT_NOT_SET,16,16,17,0,2,2,0,"PUNCTUATOR",0,0," ;"
39,NEWLINE,NONE,PARENT_NOT_SET,17,17,1,0,2,2,0,"",2,0,
41,TEMPLATE,NONE,PARENT_NOT_SET,1,1,9,0,2,2,0,"STMT_START,EXPR_START",0,0," template"
41,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,9,9,10,0,2,2,0,"IN_TEMPLATE,PUNCTUATOR",0,0," <"
41,TYPENAME,NONE,PARENT_NOT_SET,10,10,18,0,2,3,0,"IN_TEMPLATE,EXPR_START",0,0," typename"
41,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,18,18,19,0,2,2,0,"IN_TEMPLATE,PUNCTUATOR",0,0," >"
41,CLASS,TEMPLATE,PARENT_NOT_SET,20,20,25,1,2,2,0,"FORCE_SPACE,EXPR_START",0,0," class"
41,TYPE,CLASS,PARENT_NOT_SET,26,26,31,1,2,2,0,"",0,0," Base2"
41,BRACE_OPEN,CLASS,PARENT_NOT_SET,32,32,33,1,2,2,0,"IN_CLASS,ONE_LINER,EMPTY_BODY,PUNCTUATOR",0,0," {"
41,BRACE_CLOSE,CLASS,PARENT_NOT_SET,34,34,35,1,2,2,0,"IN_CLASS,ONE_LINER,EMPTY_BODY,PUNCTUATOR",0,0," }"
41,SEMICOLON,CLASS,PARENT_NOT_SET,35,35,36,0,2,2,0,"PUNCTUATOR",0,0," ;"
41,NEWLINE,NONE,PARENT_NOT_SET,36,36,1,0,2,2,0,"",2,0,
43,BRACE_CLOSE,NAMESPACE,PARENT_NOT_SET,1,1,2,0,1,1,0,"PUNCTUATOR",0,0," }"
43,NEWLINE,NONE,PARENT_NOT_SET,2,2,1,0,1,1,0,"",2,0,
45,BRACE_CLOSE,NAMESPACE,PARENT_NOT_SET,1,1,2,0,0,0,0,"PUNCTUATOR",0,0," }"
45,NEWLINE,NONE,PARENT_NOT_SET,2,2,1,0,0,0,0,"",2,0,
47,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,82,0,0,0,0,"",0,0," // template<...> class/struct[<...>] [macros/attributes ...] type : bases ... { }"
47,NEWLINE,NONE,PARENT_NOT_SET,82,82,1,0,0,0,0,"",1,0,
48,TEMPLATE,NONE,PARENT_NOT_SET,1,1,9,0,0,0,0,"STMT_START,EXPR_START",0,0," template"
48,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,9,9,10,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," <"
48,TYPENAME,NONE,PARENT_NOT_SET,10,10,18,0,0,1,0,"IN_TEMPLATE,EXPR_START",0,0," typename"
48,COMMA,NONE,PARENT_NOT_SET,18,18,19,0,0,1,0,"IN_TEMPLATE,PUNCTUATOR",0,0," ,"
48,TYPENAME,NONE,PARENT_NOT_SET,20,20,28,1,0,1,0,"IN_TEMPLATE,EXPR_START",0,0," typename"
48,ELLIPSIS,NONE,PARENT_NOT_SET,29,29,32,1,0,1,0,"IN_TEMPLATE,PUNCTUATOR",0,0," ..."
48,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,32,32,33,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," >"
48,NEWLINE,NONE,PARENT_NOT_SET,33,33,1,0,0,0,0,"",1,0,
49,CLASS,TEMPLATE,PARENT_NOT_SET,1,1,6,0,0,0,0,"FORCE_SPACE,EXPR_START",0,0," class"
49,WORD,NONE,PARENT_NOT_SET,7,7,17,1,0,0,0,"FORCE_SPACE",0,0," API_EXPORT"
49,ATTRIBUTE,NONE,PARENT_NOT_SET,18,18,31,1,0,0,0,"",0,0," __attribute__"
49,FPAREN_OPEN,ATTRIBUTE,PARENT_NOT_SET,31,31,32,0,0,0,0,"PUNCTUATOR",0,0," ("
49,PAREN_OPEN,NONE,PARENT_NOT_SET,32,32,33,0,0,1,0,"EXPR_START,PUNCTUATOR",0,0," ("
49,WORD,NONE,PARENT_NOT_SET,33,33,47,0,0,2,0,"EXPR_START",0,0," __deprecated__"
49,PAREN_CLOSE,NONE,PARENT_NOT_SET,47,47,48,0,0,1,0,"PUNCTUATOR",0,0," )"
49,FPAREN_CLOSE,ATTRIBUTE,PARENT_NOT_SET,48,48,49,0,0,0,0,"PUNCTUATOR",0,0," )"
49,MACRO_FUNC_CALL,NONE,PARENT_NOT_SET,50,50,57,1,0,0,0,"",0,0," ALIGNAS"
49,FPAREN_OPEN,MACRO_FUNC_CALL,PARENT_NOT_SET,57,57,58,0,0,0,0,"PUNCTUATOR",0,0," ("
49,NUMBER,NONE,PARENT_NOT_SET,58,58,59,0,0,1,0,"EXPR_START",0,0," 4"
49,FPAREN_CLOSE,MACRO_FUNC_CALL,PARENT_NOT_SET,59,59,60,0,0,0,0,"PUNCTUATOR",0,0," )"
49,TYPE,CLASS,PARENT_NOT_SET,61,61,63,1,0,0,0,"",0,0," c1"
49,NEWLINE,NONE,PARENT_NOT_SET,63,63,1,0,0,0,0,"",1,0,
50,CLASS_COLON,CLASS,PARENT_NOT_SET,9,1,2,0,0,0,0,"IN_CLASS_BASE,PUNCTUATOR",0,0," :"
50,QUALIFIER,NONE,PARENT_NOT_SET,11,3,9,1,0,0,0,"IN_CLASS_BASE,FORCE_SPACE,STMT_START,EXPR_START",0,0," public"
50,TYPE,NONE,PARENT_NOT_SET,18,10,25,1,0,0,0,"IN_CLASS_BASE",0,0," outer_namespace"
50,DC_MEMBER,NONE,PARENT_NOT_SET,33,25,27,0,0,0,0,"IN_CLASS_BASE,PUNCTUATOR",0,0," ::"
50,TYPE,NONE,PARENT_NOT_SET,35,27,42,0,0,0,0,"IN_CLASS_BASE",0,0," inner_namespace"
50,DC_MEMBER,NONE,PARENT_NOT_SET,50,42,44,0,0,0,0,"IN_CLASS_BASE,PUNCTUATOR",0,0," ::"
50,TYPE,NONE,PARENT_NOT_SET,52,44,49,0,0,0,0,"IN_CLASS_BASE",0,0," Base1"
50,COMMA,NONE,PARENT_NOT_SET,57,49,50,0,0,0,0,"IN_CLASS_BASE,PUNCTUATOR",0,0," ,"
50,NEWLINE,NONE,PARENT_NOT_SET,58,50,3,0,0,0,0,"",1,0,
51,QUALIFIER,NONE,PARENT_NOT_SET,9,3,9,0,0,0,0,"IN_CLASS_BASE,FORCE_SPACE,EXPR_START",0,0," public"
51,TYPE,NONE,PARENT_NOT_SET,16,10,25,1,0,0,0,"IN_CLASS_BASE",0,0," outer_namespace"
51,DC_MEMBER,NONE,PARENT_NOT_SET,31,25,27,0,0,0,0,"IN_CLASS_BASE,PUNCTUATOR",0,0," ::"
51,TYPE,NONE,PARENT_NOT_SET,33,27,42,0,0,0,0,"IN_CLASS_BASE",0,0," inner_namespace"
51,DC_MEMBER,NONE,PARENT_NOT_SET,48,42,44,0,0,0,0,"IN_CLASS_BASE,PUNCTUATOR",0,0," ::"
51,TYPE,NONE,PARENT_NOT_SET,50,44,49,0,0,0,0,"IN_CLASS_BASE",0,0," Base2"
51,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,55,49,50,0,0,0,0,"IN_TEMPLATE,IN_CLASS_BASE,PUNCTUATOR",0,0," <"
51,TYPE,NONE,PARENT_NOT_SET,56,50,65,0,0,1,0,"IN_TEMPLATE,IN_CLASS_BASE,EXPR_START",0,0," outer_namespace"
51,DC_MEMBER,NONE,PARENT_NOT_SET,71,65,67,0,0,1,0,"IN_TEMPLATE,IN_CLASS_BASE,PUNCTUATOR",0,0," ::"
51,TYPE,NONE,PARENT_NOT_SET,73,67,82,0,0,1,0,"IN_TEMPLATE,IN_CLASS_BASE",0,0," inner_namespace"
51,DC_MEMBER,NONE,PARENT_NOT_SET,88,82,84,0,0,1,0,"IN_TEMPLATE,IN_CLASS_BASE,PUNCTUATOR",0,0," ::"
51,TYPE,NONE,PARENT_NOT_SET,90,84,89,0,0,1,0,"IN_TEMPLATE,IN_CLASS_BASE",0,0," Base1"
51,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,95,89,90,0,0,0,0,"IN_TEMPLATE,IN_CLASS_BASE,PUNCTUATOR",0,0," >"
51,NEWLINE,NONE,PARENT_NOT_SET,96,90,1,0,0,0,0,"",1,0,
52,BRACE_OPEN,CLASS,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_CLASS,EXPR_START,EMPTY_BODY,PUNCTUATOR",0,0," {"
52,NEWLINE,NONE,PARENT_NOT_SET,2,2,1,0,1,1,0,"IN_CLASS",2,0,
54,BRACE_CLOSE,CLASS,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_CLASS,EMPTY_BODY,PUNCTUATOR",0,0," }"
54,SEMICOLON,CLASS,PARENT_NOT_SET,2,2,3,0,0,0,0,"PUNCTUATOR",0,0," ;"
54,NEWLINE,NONE,PARENT_NOT_SET,3,3,1,0,0,0,0,"",2,0,
56,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,70,0,0,0,0,"",0,0," // template<...> class/struct[<...>] [macros/attributes ...] type { }"
56,NEWLINE,NONE,PARENT_NOT_SET,70,70,1,0,0,0,0,"",1,0,
57,TEMPLATE,NONE,PARENT_NOT_SET,1,1,9,0,0,0,0,"STMT_START,EXPR_START",0,0," template"
57,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,9,9,10,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," <"
57,TYPENAME,NONE,PARENT_NOT_SET,10,10,18,0,0,1,0,"IN_TEMPLATE,EXPR_START",0,0," typename"
57,COMMA,NONE,PARENT_NOT_SET,18,18,19,0,0,1,0,"IN_TEMPLATE,PUNCTUATOR",0,0," ,"
57,TYPENAME,NONE,PARENT_NOT_SET,20,20,28,1,0,1,0,"IN_TEMPLATE,EXPR_START",0,0," typename"
57,ELLIPSIS,NONE,PARENT_NOT_SET,29,29,32,1,0,1,0,"IN_TEMPLATE,PUNCTUATOR",0,0," ..."
57,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,32,32,33,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," >"
57,NEWLINE,NONE,PARENT_NOT_SET,33,33,1,0,0,0,0,"",1,0,
58,CLASS,TEMPLATE,PARENT_NOT_SET,1,1,6,0,0,0,0,"FORCE_SPACE,EXPR_START",0,0," class"
58,WORD,NONE,PARENT_NOT_SET,7,7,17,1,0,0,0,"FORCE_SPACE",0,0," API_EXPORT"
58,TYPE,CLASS,PARENT_NOT_SET,18,18,20,1,0,0,0,"",0,0," c2"
58,NEWLINE,NONE,PARENT_NOT_SET,20,20,1,0,0,0,0,"",1,0,
59,BRACE_OPEN,CLASS,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_CLASS,PUNCTUATOR",0,0," {"
59,NEWLINE,NONE,PARENT_NOT_SET,2,2,1,0,1,1,0,"IN_CLASS",1,0,
60,ACCESS,NONE,PARENT_NOT_SET,1,1,7,0,1,1,0,"IN_CLASS,STMT_START,EXPR_START",0,0," public"
60,ACCESS_COLON,NONE,PARENT_NOT_SET,7,7,8,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," :"
60,NEWLINE,NONE,PARENT_NOT_SET,8,8,4,0,1,1,0,"IN_CLASS",2,0,
62,TEMPLATE,NONE,PARENT_NOT_SET,1,4,12,0,1,1,0,"IN_CLASS,STMT_START,EXPR_START",0,0," template"
62,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,9,12,13,0,1,1,0,"IN_TEMPLATE,IN_CLASS,PUNCTUATOR",0,0," <"
62,TYPENAME,NONE,PARENT_NOT_SET,10,13,21,0,1,2,0,"IN_TEMPLATE,IN_CLASS,FORCE_SPACE,EXPR_START",0,0," typename"
62,TYPE,NONE,PARENT_NOT_SET,19,22,23,1,1,2,0,"IN_TEMPLATE,IN_CLASS",0,0," T"
62,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,20,23,24,0,1,1,0,"IN_TEMPLATE,IN_CLASS,PUNCTUATOR",0,0," >"
62,NEWLINE,NONE,PARENT_NOT_SET,21,24,4,0,1,1,0,"IN_CLASS",1,0,
63,STRUCT,TEMPLATE,PARENT_NOT_SET,1,4,10,0,1,1,0,"IN_CLASS,FORCE_SPACE,EXPR_START",0,0," struct"
63,TYPE,STRUCT,PARENT_NOT_SET,8,11,22,1,1,1,0,"IN_CLASS",0,0," inner_class"
63,NEWLINE,NONE,PARENT_NOT_SET,19,22,4,0,1,1,0,"IN_CLASS",1,0,
64,BRACE_OPEN,STRUCT,PARENT_NOT_SET,1,4,5,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," {"
64,NEWLINE,NONE,PARENT_NOT_SET,2,5,7,0,2,2,0,"IN_STRUCT,IN_CLASS",1,0,
65,QUALIFIER,NONE,PARENT_NOT_SET,9,7,13,0,2,2,0,"IN_STRUCT,IN_CLASS,FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE",0,0," static"
65,TYPE,NONE,PARENT_NOT_SET,16,14,25,1,2,2,0,"IN_STRUCT,IN_CLASS,VAR_TYPE",0,0," inner_class"
65,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,27,25,26,0,2,2,0,"IN_STRUCT,IN_TEMPLATE,IN_CLASS,PUNCTUATOR",0,0," <"
65,TYPE,NONE,PARENT_NOT_SET,28,26,27,0,2,3,0,"IN_STRUCT,IN_TEMPLATE,IN_CLASS,EXPR_START",0,0," T"
65,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,29,27,28,0,2,2,0,"IN_STRUCT,IN_TEMPLATE,IN_CLASS,PUNCTUATOR",0,0," >"
65,PTR_TYPE,NONE,PARENT_NOT_SET,31,29,30,1,2,2,0,"IN_STRUCT,IN_CLASS,EXPR_START,VAR_TYPE,PUNCTUATOR",0,0," *"
65,WORD,NONE,PARENT_NOT_SET,32,30,43,0,2,2,0,"IN_STRUCT,IN_CLASS,EXPR_START,VAR_DEF,VAR_1ST",0,0," m_inner_class"
65,SEMICOLON,NONE,PARENT_NOT_SET,45,43,44,0,2,2,0,"IN_STRUCT,IN_CLASS,PUNCTUATOR",0,0," ;"
65,NEWLINE,NONE,PARENT_NOT_SET,46,44,4,0,2,2,0,"IN_STRUCT,IN_CLASS",1,0,
66,BRACE_CLOSE,STRUCT,PARENT_NOT_SET,1,4,5,0,1,1,0,"IN_STRUCT,IN_CLASS,PUNCTUATOR",0,0," }"
66,SEMICOLON,STRUCT,PARENT_NOT_SET,2,5,6,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ;"
66,NEWLINE,NONE,PARENT_NOT_SET,3,6,1,0,1,1,0,"IN_CLASS",1,0,
67,BRACE_CLOSE,CLASS,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_CLASS,PUNCTUATOR",0,0," }"
67,SEMICOLON,CLASS,PARENT_NOT_SET,2,2,3,0,0,0,0,"PUNCTUATOR",0,0," ;"
67,NEWLINE,NONE,PARENT_NOT_SET,3,3,1,0,0,0,0,"",2,0,
69,TEMPLATE,NONE,PARENT_NOT_SET,1,1,9,0,0,0,0,"STMT_START,EXPR_START",0,0," template"
69,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,9,9,10,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," <"
69,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,10,10,11,0,0,0,0,"IN_TEMPLATE,EXPR_START,PUNCTUATOR",0,0," >"
69,TEMPLATE,NONE,PARENT_NOT_SET,12,12,20,1,0,0,0,"EXPR_START",0,0," template"
69,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,20,20,21,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," <"
69,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,21,21,22,0,0,0,0,"IN_TEMPLATE,EXPR_START,PUNCTUATOR",0,0," >"
69,STRUCT,TEMPLATE,PARENT_NOT_SET,23,23,29,1,0,0,0,"FORCE_SPACE,EXPR_START",0,0," struct"
69,WORD,NONE,PARENT_NOT_SET,30,30,40,1,0,0,0,"FORCE_SPACE",0,0," API_EXPORT"
69,TYPE,NONE,PARENT_NOT_SET,41,41,43,1,0,0,0,"",0,0," c2"
69,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,43,43,44,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," <"
69,TYPE,NONE,PARENT_NOT_SET,44,44,47,0,0,1,0,"IN_TEMPLATE,EXPR_START",0,0," int"
69,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,47,47,48,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," >"
69,DC_MEMBER,NONE,PARENT_NOT_SET,48,48,50,0,0,0,0,"EXPR_START,PUNCTUATOR",0,0," ::"
69,TYPE,STRUCT,PARENT_NOT_SET,50,50,61,0,0,0,0,"VAR_TYPE",0,0," inner_class"
69,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,61,61,62,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," <"
69,TYPE,NONE,PARENT_NOT_SET,62,62,65,0,0,1,0,"IN_TEMPLATE,EXPR_START",0,0," int"
69,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,65,65,66,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," >"
69,PTR_TYPE,NONE,PARENT_NOT_SET,67,67,68,1,0,0,0,"EXPR_START,PUNCTUATOR",0,0," *"
69,TYPE,NONE,PARENT_NOT_SET,68,68,70,0,0,0,0,"EXPR_START",0,0," c2"
69,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,70,70,71,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," <"
69,TYPE,NONE,PARENT_NOT_SET,71,71,74,0,0,1,0,"IN_TEMPLATE,EXPR_START",0,0," int"
69,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,74,74,75,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," >"
69,DC_MEMBER,NONE,PARENT_NOT_SET,75,75,77,0,0,0,0,"EXPR_START,PUNCTUATOR",0,0," ::"
69,TYPE,NONE,PARENT_NOT_SET,77,77,88,0,0,0,0,"",0,0," inner_class"
69,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,88,88,89,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," <"
69,TYPE,NONE,PARENT_NOT_SET,89,89,92,0,0,1,0,"IN_TEMPLATE,EXPR_START",0,0," int"
69,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,92,92,93,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," >"
69,DC_MEMBER,NONE,PARENT_NOT_SET,93,93,95,0,0,0,0,"EXPR_START,PUNCTUATOR",0,0," ::"
69,WORD,NONE,PARENT_NOT_SET,95,95,108,0,0,0,0,"VAR_DEF,VAR_1ST,LVALUE",0,0," m_inner_class"
69,ASSIGN,NONE,PARENT_NOT_SET,109,109,110,1,0,0,0,"PUNCTUATOR",0,0," ="
69,WORD,NONE,PARENT_NOT_SET,111,111,118,1,0,0,0,"EXPR_START",0,0," nullptr"
69,SEMICOLON,STRUCT,PARENT_NOT_SET,118,118,119,0,0,0,0,"PUNCTUATOR",0,0," ;"
69,NEWLINE,NONE,PARENT_NOT_SET,119,119,1,0,0,0,0,"",2,0,
71,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,66,0,0,0,0,"",0,0," // template<...> class/struct[<...>] [macros/attributes ...] type"
71,NEWLINE,NONE,PARENT_NOT_SET,66,66,1,0,0,0,0,"",1,0,
72,TEMPLATE,NONE,PARENT_NOT_SET,1,1,9,0,0,0,0,"STMT_START,EXPR_START",0,0," template"
72,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,9,9,10,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," <"
72,TYPENAME,NONE,PARENT_NOT_SET,10,10,18,0,0,1,0,"IN_TEMPLATE,EXPR_START",0,0," typename"
72,COMMA,NONE,PARENT_NOT_SET,18,18,19,0,0,1,0,"IN_TEMPLATE,PUNCTUATOR",0,0," ,"
72,TYPENAME,NONE,PARENT_NOT_SET,20,20,28,1,0,1,0,"IN_TEMPLATE,EXPR_START",0,0," typename"
72,ELLIPSIS,NONE,PARENT_NOT_SET,29,29,32,1,0,1,0,"IN_TEMPLATE,PUNCTUATOR",0,0," ..."
72,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,32,32,33,0,0,0,0,"IN_TEMPLATE,PUNCTUATOR",0,0," >"
72,NEWLINE,NONE,PARENT_NOT_SET,33,33,1,0,0,0,0,"",1,0,
73,CLASS,TEMPLATE,PARENT_NOT_SET,1,1,6,0,0,0,0,"FORCE_SPACE,EXPR_START,INCOMPLETE",0,0," class"
73,WORD,NONE,PARENT_NOT_SET,7,7,17,1,0,0,0,"FORCE_SPACE,INCOMPLETE",0,0," API_EXPORT"
73,TYPE,CLASS,PARENT_NOT_SET,18,18,20,1,0,0,0,"INCOMPLETE",0,0," c2"
73,SEMICOLON,CLASS,PARENT_NOT_SET,20,20,21,0,0,0,0,"PUNCTUATOR",0,0," ;"
73,NEWLINE,NONE,PARENT_NOT_SET,21,21,1,0,0,0,0,"",2,0,
75,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,68,0,0,0,0,"",0,0," // class/struct [macros/attributes ...] type : bases ... { } x, ..."
75,NEWLINE,NONE,PARENT_NOT_SET,68,68,1,0,0,0,0,"",1,0,
76,CLASS,NONE,PARENT_NOT_SET,1,1,6,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," class"
76,WORD,NONE,PARENT_NOT_SET,7,7,17,1,0,0,0,"FORCE_SPACE",0,0," API_EXPORT"
76,ATTRIBUTE,NONE,PARENT_NOT_SET,18,18,31,1,0,0,0,"",0,0," __attribute__"
76,FPAREN_OPEN,ATTRIBUTE,PARENT_NOT_SET,31,31,32,0,0,0,0,"PUNCTUATOR",0,0," ("
76,PAREN_OPEN,NONE,PARENT_NOT_SET,32,32,33,0,0,1,0,"EXPR_START,PUNCTUATOR",0,0," ("
76,WORD,NONE,PARENT_NOT_SET,33,33,47,0,0,2,0,"EXPR_START",0,0," __deprecated__"
76,PAREN_CLOSE,NONE,PARENT_NOT_SET,47,47,48,0,0,1,0,"PUNCTUATOR",0,0," )"
76,FPAREN_CLOSE,ATTRIBUTE,PARENT_NOT_SET,48,48,49,0,0,0,0,"PUNCTUATOR",0,0," )"
76,MACRO_FUNC_CALL,NONE,PARENT_NOT_SET,50,50,57,1,0,0,0,"",0,0," ALIGNAS"
76,FPAREN_OPEN,MACRO_FUNC_CALL,PARENT_NOT_SET,57,57,58,0,0,0,0,"PUNCTUATOR",0,0," ("
76,NUMBER,NONE,PARENT_NOT_SET,58,58,59,0,0,1,0,"EXPR_START",0,0," 4"
76,FPAREN_CLOSE,MACRO_FUNC_CALL,PARENT_NOT_SET,59,59,60,0,0,0,0,"PUNCTUATOR",0,0," )"
76,TYPE,CLASS,PARENT_NOT_SET,61,61,63,1,0,0,0,"VAR_TYPE",0,0," c3"
76,NEWLINE,NONE,PARENT_NOT_SET,63,63,1,0,0,0,0,"",1,0,
77,CLASS_COLON,CLASS,PARENT_NOT_SET,9,1,2,0,0,0,0,"IN_CLASS_BASE,PUNCTUATOR",0,0," :"
77,QUALIFIER,NONE,PARENT_NOT_SET,11,3,9,1,0,0,0,"IN_CLASS_BASE,FORCE_SPACE,STMT_START,EXPR_START",0,0," public"
77,TYPE,NONE,PARENT_NOT_SET,18,10,25,1,0,0,0,"IN_CLASS_BASE",0,0," outer_namespace"
77,DC_MEMBER,NONE,PARENT_NOT_SET,33,25,27,0,0,0,0,"IN_CLASS_BASE,PUNCTUATOR",0,0," ::"
77,TYPE,NONE,PARENT_NOT_SET,35,27,42,0,0,0,0,"IN_CLASS_BASE",0,0," inner_namespace"
77,DC_MEMBER,NONE,PARENT_NOT_SET,50,42,44,0,0,0,0,"IN_CLASS_BASE,PUNCTUATOR",0,0," ::"
77,TYPE,NONE,PARENT_NOT_SET,52,44,49,0,0,0,0,"IN_CLASS_BASE",0,0," Base2"
77,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,57,49,50,0,0,0,0,"IN_TEMPLATE,IN_CLASS_BASE,PUNCTUATOR",0,0," <"
77,TYPE,NONE,PARENT_NOT_SET,58,50,53,0,0,1,0,"IN_TEMPLATE,IN_CLASS_BASE,EXPR_START",0,0," int"
77,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,61,53,54,0,0,0,0,"IN_TEMPLATE,IN_CLASS_BASE,PUNCTUATOR",0,0," >"
77,COMMA,NONE,PARENT_NOT_SET,62,54,55,0,0,0,0,"IN_CLASS_BASE,EXPR_START,PUNCTUATOR",0,0," ,"
77,NEWLINE,NONE,PARENT_NOT_SET,63,55,3,0,0,0,0,"",1,0,
78,QUALIFIER,NONE,PARENT_NOT_SET,9,3,9,0,0,0,0,"IN_CLASS_BASE,FORCE_SPACE,EXPR_START",0,0," public"
78,TYPE,NONE,PARENT_NOT_SET,16,10,12,1,0,0,0,"IN_CLASS_BASE",0,0," c2"
78,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,18,12,13,0,0,0,0,"IN_TEMPLATE,IN_CLASS_BASE,PUNCTUATOR",0,0," <"
78,TYPE,NONE,PARENT_NOT_SET,19,13,16,0,0,1,0,"IN_TEMPLATE,IN_CLASS_BASE,EXPR_START",0,0," int"
78,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,22,16,17,0,0,0,0,"IN_TEMPLATE,IN_CLASS_BASE,PUNCTUATOR",0,0," >"
78,DC_MEMBER,NONE,PARENT_NOT_SET,23,17,19,0,0,0,0,"IN_CLASS_BASE,EXPR_START,PUNCTUATOR",0,0," ::"
78,TYPE,NONE,PARENT_NOT_SET,25,19,30,0,0,0,0,"IN_CLASS_BASE",0,0," inner_class"
78,ANGLE_OPEN,TEMPLATE,PARENT_NOT_SET,36,30,31,0,0,0,0,"IN_TEMPLATE,IN_CLASS_BASE,PUNCTUATOR",0,0," <"
78,TYPE,NONE,PARENT_NOT_SET,37,31,34,0,0,1,0,"IN_TEMPLATE,IN_CLASS_BASE,EXPR_START",0,0," int"
78,ANGLE_CLOSE,TEMPLATE,PARENT_NOT_SET,40,34,35,0,0,0,0,"IN_TEMPLATE,IN_CLASS_BASE,PUNCTUATOR",0,0," >"
78,NEWLINE,NONE,PARENT_NOT_SET,41,35,1,0,0,0,0,"",1,0,
79,BRACE_OPEN,CLASS,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_CLASS,EXPR_START,PUNCTUATOR",0,0," {"
79,NEWLINE,NONE,PARENT_NOT_SET,2,2,1,0,1,1,0,"IN_CLASS",1,0,
80,ACCESS,NONE,PARENT_NOT_SET,1,1,7,0,1,1,0,"IN_CLASS,STMT_START,EXPR_START",0,0," public"
80,ACCESS_COLON,NONE,PARENT_NOT_SET,7,7,8,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," :"
80,NEWLINE,NONE,PARENT_NOT_SET,8,8,4,0,1,1,0,"IN_CLASS",1,0,
81,FUNC_CLASS_DEF,NONE,PARENT_NOT_SET,1,4,6,0,1,1,0,"IN_CLASS,STMT_START,EXPR_START",0,0," c3"
81,FPAREN_OPEN,FUNC_CLASS_DEF,PARENT_NOT_SET,3,6,7,0,1,1,0,"IN_CONST_ARGS,IN_CLASS,PUNCTUATOR",0,0," ("
81,TYPE,NONE,PARENT_NOT_SET,4,7,10,0,1,2,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,FORCE_SPACE,EXPR_START,VAR_TYPE,LVALUE",0,0," int"
81,WORD,NONE,PARENT_NOT_SET,8,11,12,1,1,2,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,VAR_DEF,LVALUE",0,0," x"
81,ASSIGN_DEFAULT_ARG,FUNC_PROTO,PARENT_NOT_SET,10,13,14,1,1,2,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,PUNCTUATOR",0,0," ="
81,NUMBER,NONE,PARENT_NOT_SET,12,15,16,1,1,2,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,EXPR_START",0,0," 0"
81,COMMA,NONE,PARENT_NOT_SET,13,16,17,0,1,2,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,PUNCTUATOR",0,0," ,"
81,TYPE,NONE,PARENT_NOT_SET,15,18,21,1,1,2,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,FORCE_SPACE,EXPR_START,VAR_TYPE,LVALUE",0,0," int"
81,WORD,NONE,PARENT_NOT_SET,19,22,23,1,1,2,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,VAR_DEF,LVALUE",0,0," y"
81,ASSIGN_DEFAULT_ARG,FUNC_PROTO,PARENT_NOT_SET,21,24,25,1,1,2,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,PUNCTUATOR",0,0," ="
81,NUMBER,NONE,PARENT_NOT_SET,23,26,27,1,1,2,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,EXPR_START",0,0," 0"
81,COMMA,NONE,PARENT_NOT_SET,24,27,28,0,1,2,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,PUNCTUATOR",0,0," ,"
81,TYPE,NONE,PARENT_NOT_SET,26,29,32,1,1,2,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,FORCE_SPACE,EXPR_START,VAR_TYPE,LVALUE",0,0," int"
81,WORD,NONE,PARENT_NOT_SET,30,33,34,1,1,2,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,VAR_DEF,LVALUE",0,0," z"
81,ASSIGN_DEFAULT_ARG,FUNC_PROTO,PARENT_NOT_SET,32,35,36,1,1,2,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,PUNCTUATOR",0,0," ="
81,NUMBER,NONE,PARENT_NOT_SET,34,37,38,1,1,2,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,EXPR_START",0,0," 0"
81,FPAREN_CLOSE,FUNC_CLASS_DEF,PARENT_NOT_SET,35,38,39,0,1,1,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,PUNCTUATOR",0,0," )"
81,CONSTR_COLON,NONE,PARENT_NOT_SET,37,40,41,1,1,1,0,"IN_CONST_ARGS,IN_CLASS,PUNCTUATOR",0,0," :"
81,FUNC_CTOR_VAR,NONE,PARENT_NOT_SET,39,42,45,1,1,1,0,"IN_CONST_ARGS,IN_CLASS,STMT_START,EXPR_START",0,0," m_x"
81,FPAREN_OPEN,FUNC_CTOR_VAR,PARENT_NOT_SET,42,45,46,0,1,1,0,"IN_CONST_ARGS,IN_CLASS,PUNCTUATOR",0,0," ("
81,WORD,NONE,PARENT_NOT_SET,43,46,47,0,1,2,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,EXPR_START",0,0," x"
81,FPAREN_CLOSE,FUNC_CTOR_VAR,PARENT_NOT_SET,44,47,48,0,1,1,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,PUNCTUATOR",0,0," )"
81,COMMA,NONE,PARENT_NOT_SET,45,48,49,0,1,1,0,"IN_CONST_ARGS,IN_CLASS,PUNCTUATOR",0,0," ,"
81,FUNC_CTOR_VAR,NONE,PARENT_NOT_SET,47,50,53,1,1,1,0,"IN_CONST_ARGS,IN_CLASS,EXPR_START",0,0," m_y"
81,FPAREN_OPEN,FUNC_CTOR_VAR,PARENT_NOT_SET,50,53,54,0,1,1,0,"IN_CONST_ARGS,IN_CLASS,PUNCTUATOR",0,0," ("
81,WORD,NONE,PARENT_NOT_SET,51,54,55,0,1,2,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,EXPR_START",0,0," y"
81,FPAREN_CLOSE,FUNC_CTOR_VAR,PARENT_NOT_SET,52,55,56,0,1,1,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,PUNCTUATOR",0,0," )"
81,COMMA,NONE,PARENT_NOT_SET,53,56,57,0,1,1,0,"IN_CONST_ARGS,IN_CLASS,PUNCTUATOR",0,0," ,"
81,FUNC_CTOR_VAR,NONE,PARENT_NOT_SET,55,58,61,1,1,1,0,"IN_CONST_ARGS,IN_CLASS,EXPR_START",0,0," m_z"
81,FPAREN_OPEN,FUNC_CTOR_VAR,PARENT_NOT_SET,58,61,62,0,1,1,0,"IN_CONST_ARGS,IN_CLASS,PUNCTUATOR",0,0," ("
81,WORD,NONE,PARENT_NOT_SET,59,62,63,0,1,2,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,EXPR_START",0,0," z"
81,FPAREN_CLOSE,FUNC_CTOR_VAR,PARENT_NOT_SET,60,63,64,0,1,1,0,"IN_FCN_CALL,IN_CONST_ARGS,IN_CLASS,PUNCTUATOR",0,0," )"
81,BRACE_OPEN,FUNC_CLASS_DEF,PARENT_NOT_SET,62,65,66,1,1,1,0,"IN_CLASS,EMPTY_BODY,PUNCTUATOR",0,0," {"
81,NEWLINE,NONE,PARENT_NOT_SET,63,67,0,0,1,1,0,"IN_CLASS",1,0,
81,BRACE_CLOSE,FUNC_CLASS_DEF,PARENT_NOT_SET,1,67,68,1,1,1,0,"IN_CLASS,EMPTY_BODY,PUNCTUATOR",0,0," }"
81,NEWLINE,NONE,PARENT_NOT_SET,2,68,4,0,1,1,0,"IN_CLASS",2,0,
83,TYPE,NONE,PARENT_NOT_SET,1,4,7,0,1,1,0,"IN_CLASS,FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE",0,0," int"
83,WORD,NONE,PARENT_NOT_SET,5,8,11,1,1,1,0,"IN_CLASS,VAR_DEF,VAR_1ST",0,0," m_x"
83,SEMICOLON,NONE,PARENT_NOT_SET,8,11,12,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ;"
83,NEWLINE,NONE,PARENT_NOT_SET,9,12,4,0,1,1,0,"IN_CLASS",1,0,
84,TYPE,NONE,PARENT_NOT_SET,1,4,7,0,1,1,0,"IN_CLASS,FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE",0,0," int"
84,WORD,NONE,PARENT_NOT_SET,5,8,11,1,1,1,0,"IN_CLASS,VAR_DEF,VAR_1ST",0,0," m_y"
84,SEMICOLON,NONE,PARENT_NOT_SET,8,11,12,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ;"
84,NEWLINE,NONE,PARENT_NOT_SET,9,12,4,0,1,1,0,"IN_CLASS",1,0,
85,TYPE,NONE,PARENT_NOT_SET,1,4,7,0,1,1,0,"IN_CLASS,FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE",0,0," int"
85,WORD,NONE,PARENT_NOT_SET,5,8,11,1,1,1,0,"IN_CLASS,VAR_DEF,VAR_1ST",0,0," m_z"
85,SEMICOLON,NONE,PARENT_NOT_SET,8,11,12,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ;"
85,NEWLINE,NONE,PARENT_NOT_SET,9,12,1,0,1,1,0,"IN_CLASS",1,0,
86,BRACE_CLOSE,CLASS,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_CLASS,PUNCTUATOR",0,0," }"
86,WORD,NONE,PARENT_NOT_SET,3,3,6,1,0,0,0,"STMT_START,EXPR_START,VAR_DEF,VAR_1ST,VAR_INLINE",0,0," c31"
86,COMMA,NONE,PARENT_NOT_SET,6,6,7,0,0,0,0,"PUNCTUATOR",0,0," ,"
86,PTR_TYPE,CLASS,PARENT_NOT_SET,8,8,9,1,0,0,0,"EXPR_START,PUNCTUATOR",0,0," *"
86,WORD,NONE,PARENT_NOT_SET,9,9,12,0,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE,LVALUE",0,0," c32"
86,ASSIGN,NONE,PARENT_NOT_SET,13,13,14,1,0,0,0,"PUNCTUATOR",0,0," ="
86,WORD,NONE,PARENT_NOT_SET,15,15,22,1,0,0,0,"EXPR_START",0,0," nullptr"
86,COMMA,NONE,PARENT_NOT_SET,22,22,23,0,0,0,0,"PUNCTUATOR",0,0," ,"
86,PTR_TYPE,CLASS,PARENT_NOT_SET,24,24,25,1,0,0,0,"EXPR_START,PUNCTUATOR",0,0," *"
86,WORD,NONE,PARENT_NOT_SET,25,25,28,0,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE",0,0," c33"
86,TSQUARE,NONE,PARENT_NOT_SET,28,28,30,0,0,0,0,"PUNCTUATOR",0,0," []"
86,ASSIGN,NONE,PARENT_NOT_SET,31,31,32,1,0,0,0,"PUNCTUATOR",0,0," ="
86,BRACE_OPEN,BRACED_INIT_LIST,PARENT_NOT_SET,33,33,34,1,0,0,0,"EXPR_START,ONE_LINER,PUNCTUATOR",0,0," {"
86,WORD,NONE,PARENT_NOT_SET,35,35,42,1,1,1,0,"EXPR_START,ONE_LINER",0,0," nullptr"
86,COMMA,NONE,PARENT_NOT_SET,42,42,43,0,1,1,0,"ONE_LINER,PUNCTUATOR",0,0," ,"
86,WORD,NONE,PARENT_NOT_SET,44,44,51,1,1,1,0,"EXPR_START,ONE_LINER",0,0," nullptr"
86,BRACE_CLOSE,BRACED_INIT_LIST,PARENT_NOT_SET,52,52,53,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," }"
86,COMMA,NONE,PARENT_NOT_SET,53,53,54,0,0,0,0,"PUNCTUATOR",0,0," ,"
86,WORD,NONE,PARENT_NOT_SET,55,55,58,1,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE,LVALUE",0,0," c34"
86,BRACE_OPEN,BRACED_INIT_LIST,PARENT_NOT_SET,58,58,59,0,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
86,NUMBER,NONE,PARENT_NOT_SET,60,60,61,1,1,1,0,"STMT_START,EXPR_START,ONE_LINER",0,0," 0"
86,COMMA,NONE,PARENT_NOT_SET,61,61,62,0,1,1,0,"ONE_LINER,PUNCTUATOR",0,0," ,"
86,NUMBER,NONE,PARENT_NOT_SET,63,63,64,1,1,1,0,"EXPR_START,ONE_LINER",0,0," 1"
86,COMMA,NONE,PARENT_NOT_SET,64,64,65,0,1,1,0,"ONE_LINER,PUNCTUATOR",0,0," ,"
86,NUMBER,NONE,PARENT_NOT_SET,66,66,67,1,1,1,0,"EXPR_START,ONE_LINER",0,0," 2"
86,BRACE_CLOSE,BRACED_INIT_LIST,PARENT_NOT_SET,67,67,68,0,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," }"
86,COMMA,NONE,PARENT_NOT_SET,68,68,69,0,0,0,0,"PUNCTUATOR",0,0," ,"
86,PTR_TYPE,CLASS,PARENT_NOT_SET,70,70,71,1,0,0,0,"EXPR_START,PUNCTUATOR",0,0," *"
86,QUALIFIER,NONE,PARENT_NOT_SET,72,72,77,1,0,0,0,"FORCE_SPACE,EXPR_START",0,0," const"
86,FUNC_CALL,NONE,PARENT_NOT_SET,78,78,81,1,0,0,0,"VAR_DEF,VAR_INLINE",0,0," c35"
86,FPAREN_OPEN,FUNC_CALL,PARENT_NOT_SET,81,81,82,0,0,0,0,"PUNCTUATOR",0,0," ("
86,WORD,NONE,PARENT_NOT_SET,82,82,89,0,0,1,0,"IN_FCN_CALL,EXPR_START",0,0," nullptr"
86,FPAREN_CLOSE,FUNC_CALL,PARENT_NOT_SET,89,89,90,0,0,0,0,"IN_FCN_CALL,PUNCTUATOR",0,0," )"
86,COMMA,NONE,PARENT_NOT_SET,90,90,91,0,0,0,0,"PUNCTUATOR",0,0," ,"
86,FUNC_CALL,NONE,PARENT_NOT_SET,92,92,95,1,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE",0,0," c16"
86,FPAREN_OPEN,FUNC_CALL,PARENT_NOT_SET,95,95,96,0,0,0,0,"PUNCTUATOR",0,0," ("
86,NUMBER,NONE,PARENT_NOT_SET,96,96,97,0,0,1,0,"IN_FCN_CALL,EXPR_START",0,0," 0"
86,COMMA,NONE,PARENT_NOT_SET,97,97,98,0,0,1,0,"IN_FCN_CALL,PUNCTUATOR",0,0," ,"
86,NUMBER,NONE,PARENT_NOT_SET,99,99,100,1,0,1,0,"IN_FCN_CALL,EXPR_START",0,0," 1"
86,COMMA,NONE,PARENT_NOT_SET,100,100,101,0,0,1,0,"IN_FCN_CALL,PUNCTUATOR",0,0," ,"
86,NUMBER,NONE,PARENT_NOT_SET,102,102,103,1,0,1,0,"IN_FCN_CALL,EXPR_START",0,0," 2"
86,FPAREN_CLOSE,FUNC_CALL,PARENT_NOT_SET,103,103,104,0,0,0,0,"IN_FCN_CALL,PUNCTUATOR",0,0," )"
86,SEMICOLON,CLASS,PARENT_NOT_SET,104,104,105,0,0,0,0,"PUNCTUATOR",0,0," ;"
86,NEWLINE,NONE,PARENT_NOT_SET,105,105,1,0,0,0,0,"",2,0,
88,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,52,0,0,0,0,"",0,0," // class/struct [macros/attributes ...] type x, ..."
88,NEWLINE,NONE,PARENT_NOT_SET,52,52,1,0,0,0,0,"",1,0,
89,CLASS,NONE,PARENT_NOT_SET,1,1,6,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," class"
89,ATTRIBUTE,NONE,PARENT_NOT_SET,7,7,20,1,0,0,0,"",0,0," __attribute__"
89,FPAREN_OPEN,ATTRIBUTE,PARENT_NOT_SET,20,20,21,0,0,0,0,"PUNCTUATOR",0,0," ("
89,PAREN_OPEN,NONE,PARENT_NOT_SET,21,21,22,0,0,1,0,"EXPR_START,PUNCTUATOR",0,0," ("
89,WORD,NONE,PARENT_NOT_SET,22,22,36,0,0,2,0,"EXPR_START",0,0," __deprecated__"
89,PAREN_CLOSE,NONE,PARENT_NOT_SET,36,36,37,0,0,1,0,"PUNCTUATOR",0,0," )"
89,FPAREN_CLOSE,ATTRIBUTE,PARENT_NOT_SET,37,37,38,0,0,0,0,"PUNCTUATOR",0,0," )"
89,WORD,NONE,PARENT_NOT_SET,39,39,49,1,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," API_EXPORT"
89,MACRO_FUNC_CALL,NONE,PARENT_NOT_SET,50,50,57,1,0,0,0,"",0,0," ALIGNAS"
89,FPAREN_OPEN,MACRO_FUNC_CALL,PARENT_NOT_SET,57,57,58,0,0,0,0,"PUNCTUATOR",0,0," ("
89,NUMBER,NONE,PARENT_NOT_SET,58,58,59,0,0,1,0,"EXPR_START",0,0," 4"
89,FPAREN_CLOSE,MACRO_FUNC_CALL,PARENT_NOT_SET,59,59,60,0,0,0,0,"PUNCTUATOR",0,0," )"
89,TYPE,CLASS,PARENT_NOT_SET,61,61,63,1,0,0,0,"FORCE_SPACE,VAR_TYPE",0,0," c3"
89,WORD,NONE,PARENT_NOT_SET,64,64,67,1,0,0,0,"VAR_DEF,VAR_1ST",0,0," c41"
89,COMMA,NONE,PARENT_NOT_SET,67,67,68,0,0,0,0,"PUNCTUATOR",0,0," ,"
89,PTR_TYPE,CLASS,PARENT_NOT_SET,69,69,70,1,0,0,0,"EXPR_START,PUNCTUATOR",0,0," *"
89,WORD,NONE,PARENT_NOT_SET,70,70,73,0,0,0,0,"EXPR_START,VAR_DEF,LVALUE",0,0," c42"
89,ASSIGN,NONE,PARENT_NOT_SET,74,74,75,1,0,0,0,"PUNCTUATOR",0,0," ="
89,WORD,NONE,PARENT_NOT_SET,76,76,79,1,0,0,0,"EXPR_START",0,0," c32"
89,QUESTION,NONE,PARENT_NOT_SET,80,80,81,1,0,0,0,"PUNCTUATOR",0,0," ?"
89,WORD,NONE,PARENT_NOT_SET,82,82,85,1,0,0,0,"EXPR_START",0,0," c32"
89,COND_COLON,NONE,PARENT_NOT_SET,86,86,87,1,0,0,0,"PUNCTUATOR",0,0," :"
89,WORD,NONE,PARENT_NOT_SET,88,88,95,1,0,0,0,"STMT_START,EXPR_START",0,0," nullptr"
89,COMMA,NONE,PARENT_NOT_SET,95,95,96,0,0,0,0,"PUNCTUATOR",0,0," ,"
89,PTR_TYPE,CLASS,PARENT_NOT_SET,97,97,98,1,0,0,0,"EXPR_START,PUNCTUATOR",0,0," *"
89,WORD,NONE,PARENT_NOT_SET,98,98,101,0,0,0,0,"EXPR_START,VAR_DEF",0,0," c43"
89,TSQUARE,NONE,PARENT_NOT_SET,101,101,103,0,0,0,0,"PUNCTUATOR",0,0," []"
89,ASSIGN,NONE,PARENT_NOT_SET,104,104,105,1,0,0,0,"PUNCTUATOR",0,0," ="
89,BRACE_OPEN,BRACED_INIT_LIST,PARENT_NOT_SET,106,106,107,1,0,0,0,"EXPR_START,ONE_LINER,PUNCTUATOR",0,0," {"
89,WORD,NONE,PARENT_NOT_SET,108,108,115,1,1,1,0,"EXPR_START,ONE_LINER",0,0," nullptr"
89,COMMA,NONE,PARENT_NOT_SET,115,115,116,0,1,1,0,"ONE_LINER,PUNCTUATOR",0,0," ,"
89,WORD,NONE,PARENT_NOT_SET,117,117,124,1,1,1,0,"EXPR_START,ONE_LINER",0,0," nullptr"
89,BRACE_CLOSE,BRACED_INIT_LIST,PARENT_NOT_SET,125,125,126,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," }"
89,COMMA,NONE,PARENT_NOT_SET,126,126,127,0,0,0,0,"PUNCTUATOR",0,0," ,"
89,WORD,NONE,PARENT_NOT_SET,128,128,131,1,0,0,0,"EXPR_START,VAR_DEF,LVALUE",0,0," c44"
89,BRACE_OPEN,BRACED_INIT_LIST,PARENT_NOT_SET,131,131,132,0,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
89,NUMBER,NONE,PARENT_NOT_SET,133,133,134,1,1,1,0,"STMT_START,EXPR_START,ONE_LINER",0,0," 0"
89,COMMA,NONE,PARENT_NOT_SET,134,134,135,0,1,1,0,"ONE_LINER,PUNCTUATOR",0,0," ,"
89,NUMBER,NONE,PARENT_NOT_SET,136,136,137,1,1,1,0,"EXPR_START,ONE_LINER",0,0," 1"
89,COMMA,NONE,PARENT_NOT_SET,137,137,138,0,1,1,0,"ONE_LINER,PUNCTUATOR",0,0," ,"
89,NUMBER,NONE,PARENT_NOT_SET,139,139,140,1,1,1,0,"EXPR_START,ONE_LINER",0,0," 2"
89,BRACE_CLOSE,BRACED_INIT_LIST,PARENT_NOT_SET,140,140,141,0,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," }"
89,COMMA,NONE,PARENT_NOT_SET,141,141,142,0,0,0,0,"PUNCTUATOR",0,0," ,"
89,PTR_TYPE,CLASS,PARENT_NOT_SET,143,143,144,1,0,0,0,"EXPR_START,PUNCTUATOR",0,0," *"
89,QUALIFIER,NONE,PARENT_NOT_SET,145,145,150,1,0,0,0,"FORCE_SPACE,EXPR_START",0,0," const"
89,FUNC_CALL,NONE,PARENT_NOT_SET,151,151,154,1,0,0,0,"VAR_DEF",0,0," c45"
89,FPAREN_OPEN,FUNC_CALL,PARENT_NOT_SET,154,154,155,0,0,0,0,"PUNCTUATOR",0,0," ("
89,WORD,NONE,PARENT_NOT_SET,155,155,162,0,0,1,0,"IN_FCN_CALL,EXPR_START",0,0," nullptr"
89,FPAREN_CLOSE,FUNC_CALL,PARENT_NOT_SET,162,162,163,0,0,0,0,"IN_FCN_CALL,PUNCTUATOR",0,0," )"
89,COMMA,NONE,PARENT_NOT_SET,163,163,164,0,0,0,0,"PUNCTUATOR",0,0," ,"
89,FUNC_CALL,NONE,PARENT_NOT_SET,165,165,168,1,0,0,0,"EXPR_START,VAR_DEF",0,0," c46"
89,FPAREN_OPEN,FUNC_CALL,PARENT_NOT_SET,168,168,169,0,0,0,0,"PUNCTUATOR",0,0," ("
89,NUMBER,NONE,PARENT_NOT_SET,169,169,170,0,0,1,0,"IN_FCN_CALL,EXPR_START",0,0," 0"
89,COMMA,NONE,PARENT_NOT_SET,170,170,171,0,0,1,0,"IN_FCN_CALL,PUNCTUATOR",0,0," ,"
89,NUMBER,NONE,PARENT_NOT_SET,172,172,173,1,0,1,0,"IN_FCN_CALL,EXPR_START",0,0," 1"
89,COMMA,NONE,PARENT_NOT_SET,173,173,174,0,0,1,0,"IN_FCN_CALL,PUNCTUATOR",0,0," ,"
89,NUMBER,NONE,PARENT_NOT_SET,175,175,176,1,0,1,0,"IN_FCN_CALL,EXPR_START",0,0," 2"
89,FPAREN_CLOSE,FUNC_CALL,PARENT_NOT_SET,176,176,177,0,0,0,0,"IN_FCN_CALL,PUNCTUATOR",0,0," )"
89,SEMICOLON,CLASS,PARENT_NOT_SET,177,177,178,0,0,0,0,"PUNCTUATOR",0,0," ;"
89,NEWLINE,NONE,PARENT_NOT_SET,178,178,1,0,0,0,0,"",2,0,
91,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,68,0,0,0,0,"",0,0," // class/struct [macros/attributes ...] type : bases ... { } x, ..."
91,NEWLINE,NONE,PARENT_NOT_SET,68,68,1,0,0,0,0,"",1,0,
92,CLASS,NONE,PARENT_NOT_SET,1,1,6,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," class"
92,FUNC_CALL,NONE,PARENT_NOT_SET,7,7,14,1,0,0,0,"",0,0," ALIGNAS"
92,FPAREN_OPEN,FUNC_CALL,PARENT_NOT_SET,14,14,15,0,0,0,0,"PUNCTUATOR",0,0," ("
92,NUMBER,NONE,PARENT_NOT_SET,15,15,16,0,0,1,0,"IN_FCN_CALL,EXPR_START",0,0," 4"
92,FPAREN_CLOSE,FUNC_CALL,PARENT_NOT_SET,16,16,17,0,0,0,0,"IN_FCN_CALL,PUNCTUATOR",0,0," )"
92,WORD,NONE,PARENT_NOT_SET,18,18,28,1,0,0,0,"FORCE_SPACE",0,0," API_EXPORT"
92,ATTRIBUTE,NONE,PARENT_NOT_SET,29,29,42,1,0,0,0,"",0,0," __attribute__"
92,FPAREN_OPEN,ATTRIBUTE,PARENT_NOT_SET,42,42,43,0,0,0,0,"PUNCTUATOR",0,0," ("
92,PAREN_OPEN,NONE,PARENT_NOT_SET,43,43,44,0,0,1,0,"EXPR_START,PUNCTUATOR",0,0," ("
92,WORD,NONE,PARENT_NOT_SET,44,44,58,0,0,2,0,"EXPR_START",0,0," __deprecated__"
92,PAREN_CLOSE,NONE,PARENT_NOT_SET,58,58,59,0,0,1,0,"PUNCTUATOR",0,0," )"
92,FPAREN_CLOSE,ATTRIBUTE,PARENT_NOT_SET,59,59,60,0,0,0,0,"PUNCTUATOR",0,0," )"
92,NEWLINE,NONE,PARENT_NOT_SET,60,60,1,0,0,0,0,"",1,0,
93,CLASS_COLON,CLASS,PARENT_NOT_SET,9,1,2,0,0,0,0,"IN_CLASS_BASE,PUNCTUATOR",0,0," :"
93,QUALIFIER,NONE,PARENT_NOT_SET,11,3,9,1,0,0,0,"IN_CLASS_BASE,FORCE_SPACE,STMT_START,EXPR_START",0,0," public"
93,TYPE,NONE,PARENT_NOT_SET,18,10,25,1,0,0,0,"IN_CLASS_BASE",0,0," outer_namespace"
93,DC_MEMBER,NONE,PARENT_NOT_SET,33,25,27,0,0,0,0,"IN_CLASS_BASE,PUNCTUATOR",0,0," ::"
93,TYPE,NONE,PARENT_NOT_SET,35,27,42,0,0,0,0,"IN_CLASS_BASE",0,0," inner_namespace"
93,DC_MEMBER,NONE,PARENT_NOT_SET,50,42,44,0,0,0,0,"IN_CLASS_BASE,PUNCTUATOR",0,0," ::"
93,TYPE,NONE,PARENT_NOT_SET,52,44,49,0,0,0,0,"IN_CLASS_BASE",0,0," Base1"
93,NEWLINE,NONE,PARENT_NOT_SET,57,49,1,0,0,0,0,"",1,0,
94,BRACE_OPEN,CLASS,PARENT_NOT_SET,1,1,2,0,0,0,0,"PUNCTUATOR",0,0," {"
94,NEWLINE,NONE,PARENT_NOT_SET,2,2,1,0,1,1,0,"IN_CLASS",1,0,
95,ACCESS,NONE,PARENT_NOT_SET,1,1,7,0,1,1,0,"IN_CLASS,STMT_START,EXPR_START",0,0," public"
95,ACCESS_COLON,NONE,PARENT_NOT_SET,7,7,8,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," :"
95,NEWLINE,NONE,PARENT_NOT_SET,8,8,4,0,1,1,0,"IN_CLASS",1,0,
96,TYPE,NONE,PARENT_NOT_SET,1,4,7,0,1,1,0,"IN_CLASS,FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE",0,0," int"
96,WORD,NONE,PARENT_NOT_SET,5,8,11,1,1,1,0,"IN_CLASS,VAR_DEF,VAR_1ST",0,0," m_x"
96,SEMICOLON,NONE,PARENT_NOT_SET,8,11,12,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ;"
96,NEWLINE,NONE,PARENT_NOT_SET,9,12,4,0,1,1,0,"IN_CLASS",1,0,
97,TYPE,NONE,PARENT_NOT_SET,1,4,7,0,1,1,0,"IN_CLASS,FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE",0,0," int"
97,WORD,NONE,PARENT_NOT_SET,5,8,11,1,1,1,0,"IN_CLASS,VAR_DEF,VAR_1ST",0,0," m_y"
97,SEMICOLON,NONE,PARENT_NOT_SET,8,11,12,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ;"
97,NEWLINE,NONE,PARENT_NOT_SET,9,12,4,0,1,1,0,"IN_CLASS",1,0,
98,TYPE,NONE,PARENT_NOT_SET,1,4,7,0,1,1,0,"IN_CLASS,FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE",0,0," int"
98,WORD,NONE,PARENT_NOT_SET,5,8,11,1,1,1,0,"IN_CLASS,VAR_DEF,VAR_1ST",0,0," m_z"
98,SEMICOLON,NONE,PARENT_NOT_SET,8,11,12,0,1,1,0,"IN_CLASS,PUNCTUATOR",0,0," ;"
98,NEWLINE,NONE,PARENT_NOT_SET,9,12,1,0,1,1,0,"IN_CLASS",1,0,
99,BRACE_CLOSE,CLASS,PARENT_NOT_SET,1,1,2,0,0,0,0,"IN_CLASS,PUNCTUATOR",0,0," }"
99,WORD,NONE,PARENT_NOT_SET,3,3,6,1,0,0,0,"STMT_START,EXPR_START,VAR_DEF,VAR_1ST,VAR_INLINE",0,0," c51"
99,COMMA,NONE,PARENT_NOT_SET,6,6,7,0,0,0,0,"PUNCTUATOR",0,0," ,"
99,PTR_TYPE,CLASS,PARENT_NOT_SET,8,8,9,1,0,0,0,"EXPR_START,PUNCTUATOR",0,0," *"
99,WORD,NONE,PARENT_NOT_SET,9,9,12,0,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE,LVALUE",0,0," c52"
99,ASSIGN,NONE,PARENT_NOT_SET,13,13,14,1,0,0,0,"PUNCTUATOR",0,0," ="
99,WORD,NONE,PARENT_NOT_SET,15,15,22,1,0,0,0,"EXPR_START",0,0," nullptr"
99,COMMA,NONE,PARENT_NOT_SET,22,22,23,0,0,0,0,"PUNCTUATOR",0,0," ,"
99,PTR_TYPE,CLASS,PARENT_NOT_SET,24,24,25,1,0,0,0,"EXPR_START,PUNCTUATOR",0,0," *"
99,WORD,NONE,PARENT_NOT_SET,25,25,28,0,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE",0,0," c53"
99,TSQUARE,NONE,PARENT_NOT_SET,28,28,30,0,0,0,0,"PUNCTUATOR",0,0," []"
99,ASSIGN,NONE,PARENT_NOT_SET,31,31,32,1,0,0,0,"PUNCTUATOR",0,0," ="
99,BRACE_OPEN,BRACED_INIT_LIST,PARENT_NOT_SET,33,33,34,1,0,0,0,"EXPR_START,ONE_LINER,PUNCTUATOR",0,0," {"
99,WORD,NONE,PARENT_NOT_SET,35,35,42,1,1,1,0,"EXPR_START,ONE_LINER",0,0," nullptr"
99,COMMA,NONE,PARENT_NOT_SET,42,42,43,0,1,1,0,"ONE_LINER,PUNCTUATOR",0,0," ,"
99,WORD,NONE,PARENT_NOT_SET,44,44,51,1,1,1,0,"EXPR_START,ONE_LINER",0,0," nullptr"
99,BRACE_CLOSE,BRACED_INIT_LIST,PARENT_NOT_SET,52,52,53,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," }"
99,SEMICOLON,CLASS,PARENT_NOT_SET,53,53,54,0,0,0,0,"PUNCTUATOR",0,0," ;"
99,NEWLINE,NONE,PARENT_NOT_SET,54,54,1,0,0,0,0,"",3,0,
102,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,44,0,0,0,0,"",0,0," // enum type : integral_type { ... } x, ..."
102,NEWLINE,NONE,PARENT_NOT_SET,44,44,1,0,0,0,0,"",1,0,
103,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," enum"
103,TYPE,ENUM,PARENT_NOT_SET,6,6,8,1,0,0,0,"VAR_TYPE",0,0," e1"
103,BIT_COLON,ENUM,PARENT_NOT_SET,9,9,10,1,0,0,0,"PUNCTUATOR",0,0," :"
103,TYPE,BIT_COLON,PARENT_NOT_SET,11,11,15,1,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," long"
103,TYPE,BIT_COLON,PARENT_NOT_SET,16,16,20,1,0,0,0,"",0,0," long"
103,BRACE_OPEN,ENUM,PARENT_NOT_SET,21,21,22,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
103,WORD,NONE,PARENT_NOT_SET,23,23,25,1,1,1,0,"IN_ENUM,STMT_START,EXPR_START,ONE_LINER",0,0," a1"
103,COMMA,NONE,PARENT_NOT_SET,25,25,26,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
103,WORD,NONE,PARENT_NOT_SET,27,27,29,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," b1"
103,COMMA,NONE,PARENT_NOT_SET,29,29,30,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
103,WORD,NONE,PARENT_NOT_SET,31,31,33,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," d1"
103,BRACE_CLOSE,ENUM,PARENT_NOT_SET,34,34,35,1,0,0,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," }"
103,WORD,NONE,PARENT_NOT_SET,36,36,39,1,0,0,0,"STMT_START,EXPR_START,VAR_DEF,VAR_1ST,VAR_INLINE",0,0," e11"
103,COMMA,NONE,PARENT_NOT_SET,39,39,40,0,0,0,0,"PUNCTUATOR",0,0," ,"
103,WORD,NONE,PARENT_NOT_SET,41,41,44,1,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE",0,0," e12"
103,COMMA,NONE,PARENT_NOT_SET,44,44,45,0,0,0,0,"PUNCTUATOR",0,0," ,"
103,WORD,NONE,PARENT_NOT_SET,46,46,49,1,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE",0,0," e13"
103,SEMICOLON,ENUM,PARENT_NOT_SET,49,49,50,0,0,0,0,"PUNCTUATOR",0,0," ;"
103,NEWLINE,NONE,PARENT_NOT_SET,50,50,1,0,0,0,0,"",2,0,
105,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,37,0,0,0,0,"",0,0," // enum type : integral_type { ... }"
105,NEWLINE,NONE,PARENT_NOT_SET,37,37,1,0,0,0,0,"",1,0,
106,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," enum"
106,TYPE,ENUM,PARENT_NOT_SET,6,6,8,1,0,0,0,"",0,0," e2"
106,BIT_COLON,ENUM,PARENT_NOT_SET,9,9,10,1,0,0,0,"PUNCTUATOR",0,0," :"
106,TYPE,BIT_COLON,PARENT_NOT_SET,11,11,19,1,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," unsigned"
106,TYPE,BIT_COLON,PARENT_NOT_SET,20,20,23,1,0,0,0,"",0,0," int"
106,BRACE_OPEN,ENUM,PARENT_NOT_SET,24,24,25,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
106,WORD,NONE,PARENT_NOT_SET,26,26,28,1,1,1,0,"IN_ENUM,STMT_START,EXPR_START,ONE_LINER",0,0," a2"
106,COMMA,NONE,PARENT_NOT_SET,28,28,29,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
106,WORD,NONE,PARENT_NOT_SET,30,30,32,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," b2"
106,COMMA,NONE,PARENT_NOT_SET,32,32,33,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
106,WORD,NONE,PARENT_NOT_SET,34,34,36,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," d2"
106,BRACE_CLOSE,ENUM,PARENT_NOT_SET,37,37,38,1,0,0,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," }"
106,SEMICOLON,ENUM,PARENT_NOT_SET,38,38,39,0,0,0,0,"PUNCTUATOR",0,0," ;"
106,NEWLINE,NONE,PARENT_NOT_SET,39,39,1,0,0,0,0,"",2,0,
108,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,29,0,0,0,0,"",0,0," // enum type : integral_type"
108,NEWLINE,NONE,PARENT_NOT_SET,29,29,1,0,0,0,0,"",1,0,
109,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START,INCOMPLETE",0,0," enum"
109,TYPE,ENUM,PARENT_NOT_SET,6,6,8,1,0,0,0,"INCOMPLETE",0,0," e3"
109,BIT_COLON,ENUM,PARENT_NOT_SET,9,9,10,1,0,0,0,"PUNCTUATOR",0,0," :"
109,TYPE,BIT_COLON,PARENT_NOT_SET,11,11,16,1,0,0,0,"STMT_START,EXPR_START",0,0," short"
109,SEMICOLON,ENUM,PARENT_NOT_SET,16,16,17,0,0,0,0,"PUNCTUATOR",0,0," ;"
109,NEWLINE,NONE,PARENT_NOT_SET,17,17,1,0,0,0,0,"",2,0,
111,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,20,0,0,0,0,"",0,0," // enum type x, ..."
111,NEWLINE,NONE,PARENT_NOT_SET,20,20,1,0,0,0,0,"",1,0,
112,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," enum"
112,TYPE,ENUM,PARENT_NOT_SET,6,6,8,1,0,0,0,"FORCE_SPACE,VAR_TYPE",0,0," e3"
112,WORD,NONE,PARENT_NOT_SET,9,9,12,1,0,0,0,"VAR_DEF,VAR_1ST",0,0," e31"
112,COMMA,NONE,PARENT_NOT_SET,12,12,13,0,0,0,0,"PUNCTUATOR",0,0," ,"
112,WORD,NONE,PARENT_NOT_SET,14,14,17,1,0,0,0,"EXPR_START,VAR_DEF",0,0," e32"
112,SEMICOLON,ENUM,PARENT_NOT_SET,17,17,18,0,0,0,0,"PUNCTUATOR",0,0," ;"
112,NEWLINE,NONE,PARENT_NOT_SET,18,18,1,0,0,0,0,"",2,0,
114,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,50,0,0,0,0,"",0,0," // enum class type : integral_type { ... } x, ..."
114,NEWLINE,NONE,PARENT_NOT_SET,50,50,1,0,0,0,0,"",1,0,
115,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," enum"
115,ENUM_CLASS,NONE,PARENT_NOT_SET,6,6,11,1,0,0,0,"FORCE_SPACE",0,0," class"
115,TYPE,ENUM,PARENT_NOT_SET,12,12,14,1,0,0,0,"VAR_TYPE",0,0," e4"
115,BIT_COLON,ENUM,PARENT_NOT_SET,15,15,16,1,0,0,0,"PUNCTUATOR",0,0," :"
115,TYPE,BIT_COLON,PARENT_NOT_SET,17,17,21,1,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," long"
115,TYPE,BIT_COLON,PARENT_NOT_SET,22,22,26,1,0,0,0,"",0,0," long"
115,BRACE_OPEN,ENUM,PARENT_NOT_SET,27,27,28,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
115,WORD,NONE,PARENT_NOT_SET,29,29,31,1,1,1,0,"IN_ENUM,STMT_START,EXPR_START,ONE_LINER",0,0," a4"
115,COMMA,NONE,PARENT_NOT_SET,31,31,32,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
115,WORD,NONE,PARENT_NOT_SET,33,33,35,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," b4"
115,COMMA,NONE,PARENT_NOT_SET,35,35,36,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
115,WORD,NONE,PARENT_NOT_SET,37,37,39,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," d4"
115,BRACE_CLOSE,ENUM,PARENT_NOT_SET,40,40,41,1,0,0,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," }"
115,WORD,NONE,PARENT_NOT_SET,42,42,45,1,0,0,0,"STMT_START,EXPR_START,VAR_DEF,VAR_1ST,VAR_INLINE",0,0," e41"
115,COMMA,NONE,PARENT_NOT_SET,45,45,46,0,0,0,0,"PUNCTUATOR",0,0," ,"
115,WORD,NONE,PARENT_NOT_SET,47,47,50,1,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE",0,0," e42"
115,COMMA,NONE,PARENT_NOT_SET,50,50,51,0,0,0,0,"PUNCTUATOR",0,0," ,"
115,WORD,NONE,PARENT_NOT_SET,52,52,55,1,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE",0,0," e43"
115,COMMA,NONE,PARENT_NOT_SET,55,55,56,0,0,0,0,"PUNCTUATOR",0,0," ,"
115,WORD,NONE,PARENT_NOT_SET,57,57,60,1,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE",0,0," e44"
115,SEMICOLON,ENUM,PARENT_NOT_SET,60,60,61,0,0,0,0,"PUNCTUATOR",0,0," ;"
115,NEWLINE,NONE,PARENT_NOT_SET,61,61,1,0,0,0,0,"",2,0,
117,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,43,0,0,0,0,"",0,0," // enum class type : integral_type { ... }"
117,NEWLINE,NONE,PARENT_NOT_SET,43,43,1,0,0,0,0,"",1,0,
118,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," enum"
118,ENUM_CLASS,NONE,PARENT_NOT_SET,6,6,11,1,0,0,0,"FORCE_SPACE",0,0," class"
118,TYPE,ENUM,PARENT_NOT_SET,12,12,14,1,0,0,0,"",0,0," e5"
118,BIT_COLON,ENUM,PARENT_NOT_SET,15,15,16,1,0,0,0,"PUNCTUATOR",0,0," :"
118,TYPE,BIT_COLON,PARENT_NOT_SET,17,17,25,1,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," unsigned"
118,TYPE,BIT_COLON,PARENT_NOT_SET,26,26,29,1,0,0,0,"",0,0," int"
118,BRACE_OPEN,ENUM,PARENT_NOT_SET,30,30,31,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
118,WORD,NONE,PARENT_NOT_SET,32,32,34,1,1,1,0,"IN_ENUM,STMT_START,EXPR_START,ONE_LINER",0,0," a5"
118,COMMA,NONE,PARENT_NOT_SET,34,34,35,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
118,WORD,NONE,PARENT_NOT_SET,36,36,38,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," b5"
118,COMMA,NONE,PARENT_NOT_SET,38,38,39,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
118,WORD,NONE,PARENT_NOT_SET,40,40,42,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," d5"
118,BRACE_CLOSE,ENUM,PARENT_NOT_SET,43,43,44,1,0,0,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," }"
118,SEMICOLON,ENUM,PARENT_NOT_SET,44,44,45,0,0,0,0,"PUNCTUATOR",0,0," ;"
118,NEWLINE,NONE,PARENT_NOT_SET,45,45,1,0,0,0,0,"",2,0,
120,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,35,0,0,0,0,"",0,0," // enum class type : integral_type"
120,NEWLINE,NONE,PARENT_NOT_SET,35,35,1,0,0,0,0,"",1,0,
121,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START,INCOMPLETE",0,0," enum"
121,ENUM_CLASS,NONE,PARENT_NOT_SET,6,6,11,1,0,0,0,"FORCE_SPACE,INCOMPLETE",0,0," class"
121,TYPE,ENUM,PARENT_NOT_SET,12,12,14,1,0,0,0,"INCOMPLETE",0,0," e6"
121,BIT_COLON,ENUM,PARENT_NOT_SET,15,15,16,1,0,0,0,"PUNCTUATOR",0,0," :"
121,TYPE,BIT_COLON,PARENT_NOT_SET,17,17,22,1,0,0,0,"STMT_START,EXPR_START",0,0," short"
121,SEMICOLON,ENUM,PARENT_NOT_SET,22,22,23,0,0,0,0,"PUNCTUATOR",0,0," ;"
121,NEWLINE,NONE,PARENT_NOT_SET,23,23,1,0,0,0,0,"",2,0,
123,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,19,0,0,0,0,"",0,0," // enum class type"
123,NEWLINE,NONE,PARENT_NOT_SET,19,19,1,0,0,0,0,"",1,0,
124,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START,INCOMPLETE",0,0," enum"
124,ENUM_CLASS,NONE,PARENT_NOT_SET,6,6,11,1,0,0,0,"FORCE_SPACE,INCOMPLETE",0,0," class"
124,TYPE,ENUM,PARENT_NOT_SET,12,12,14,1,0,0,0,"INCOMPLETE",0,0," e7"
124,SEMICOLON,ENUM,PARENT_NOT_SET,14,14,15,0,0,0,0,"PUNCTUATOR",0,0," ;"
124,NEWLINE,NONE,PARENT_NOT_SET,15,15,1,0,0,0,0,"",2,0,
126,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,39,0,0,0,0,"",0,0," // enum : integral_type { ... } x, ..."
126,NEWLINE,NONE,PARENT_NOT_SET,39,39,1,0,0,0,0,"",1,0,
127,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"STMT_START,EXPR_START",0,0," enum"
127,BIT_COLON,ENUM,PARENT_NOT_SET,6,6,7,1,0,0,0,"PUNCTUATOR",0,0," :"
127,TYPE,BIT_COLON,PARENT_NOT_SET,8,8,12,1,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," long"
127,TYPE,BIT_COLON,PARENT_NOT_SET,13,13,17,1,0,0,0,"",0,0," long"
127,BRACE_OPEN,ENUM,PARENT_NOT_SET,18,18,19,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
127,WORD,NONE,PARENT_NOT_SET,20,20,22,1,1,1,0,"IN_ENUM,STMT_START,EXPR_START,ONE_LINER",0,0," a8"
127,COMMA,NONE,PARENT_NOT_SET,22,22,23,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
127,WORD,NONE,PARENT_NOT_SET,24,24,26,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," b8"
127,COMMA,NONE,PARENT_NOT_SET,26,26,27,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
127,WORD,NONE,PARENT_NOT_SET,28,28,30,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," c8"
127,BRACE_CLOSE,ENUM,PARENT_NOT_SET,31,31,32,1,0,0,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," }"
127,WORD,NONE,PARENT_NOT_SET,33,33,36,1,0,0,0,"STMT_START,EXPR_START,VAR_DEF,VAR_1ST,VAR_INLINE",0,0," e81"
127,COMMA,NONE,PARENT_NOT_SET,36,36,37,0,0,0,0,"PUNCTUATOR",0,0," ,"
127,WORD,NONE,PARENT_NOT_SET,38,38,41,1,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE",0,0," e82"
127,SEMICOLON,ENUM,PARENT_NOT_SET,41,41,42,0,0,0,0,"PUNCTUATOR",0,0," ;"
127,NEWLINE,NONE,PARENT_NOT_SET,42,42,1,0,0,0,0,"",2,0,
129,COMMENT_CPP,COMMENT_WHOLE,PARENT_NOT_SET,1,1,23,0,0,0,0,"",0,0," // enum { ... } x, ..."
129,NEWLINE,NONE,PARENT_NOT_SET,23,23,1,0,0,0,0,"",1,0,
130,ENUM,NONE,PARENT_NOT_SET,1,1,5,0,0,0,0,"STMT_START,EXPR_START",0,0," enum"
130,BRACE_OPEN,ENUM,PARENT_NOT_SET,6,6,7,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
130,WORD,NONE,PARENT_NOT_SET,8,8,10,1,1,1,0,"IN_ENUM,STMT_START,EXPR_START,ONE_LINER",0,0," a9"
130,COMMA,NONE,PARENT_NOT_SET,10,10,11,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
130,WORD,NONE,PARENT_NOT_SET,12,12,14,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," b9"
130,COMMA,NONE,PARENT_NOT_SET,14,14,15,0,1,1,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," ,"
130,WORD,NONE,PARENT_NOT_SET,16,16,18,1,1,1,0,"IN_ENUM,EXPR_START,ONE_LINER",0,0," c9"
130,BRACE_CLOSE,ENUM,PARENT_NOT_SET,19,19,20,1,0,0,0,"IN_ENUM,ONE_LINER,PUNCTUATOR",0,0," }"
130,WORD,NONE,PARENT_NOT_SET,21,21,24,1,0,0,0,"STMT_START,EXPR_START,VAR_DEF,VAR_1ST,VAR_INLINE",0,0," e91"
130,COMMA,NONE,PARENT_NOT_SET,24,24,25,0,0,0,0,"PUNCTUATOR",0,0," ,"
130,WORD,NONE,PARENT_NOT_SET,26,26,29,1,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE",0,0," e92"
130,SEMICOLON,ENUM,PARENT_NOT_SET,29,29,30,0,0,0,0,"PUNCTUATOR",0,0," ;"
130,NEWLINE,NONE,PARENT_NOT_SET,30,30,1,0,0,0,0,"",2,0,
132,UNION,NONE,PARENT_NOT_SET,1,1,6,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," union"
132,WORD,NONE,PARENT_NOT_SET,7,7,17,1,0,0,0,"FORCE_SPACE",0,0," API_EXPORT"
132,TYPE,UNION,PARENT_NOT_SET,18,18,20,1,0,0,0,"VAR_TYPE",0,0," u1"
132,BRACE_OPEN,UNION,PARENT_NOT_SET,21,21,22,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
132,TYPE,NONE,PARENT_NOT_SET,23,23,26,1,1,1,0,"FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE,ONE_LINER",0,0," int"
132,WORD,NONE,PARENT_NOT_SET,27,27,28,1,1,1,0,"VAR_DEF,VAR_1ST,ONE_LINER",0,0," x"
132,SEMICOLON,NONE,PARENT_NOT_SET,28,28,29,0,1,1,0,"ONE_LINER,PUNCTUATOR",0,0," ;"
132,TYPE,NONE,PARENT_NOT_SET,30,30,34,1,1,1,0,"FORCE_SPACE,STMT_START,EXPR_START,VAR_TYPE,ONE_LINER",0,0," long"
132,WORD,NONE,PARENT_NOT_SET,35,35,36,1,1,1,0,"VAR_DEF,VAR_1ST,ONE_LINER",0,0," y"
132,SEMICOLON,NONE,PARENT_NOT_SET,36,36,37,0,1,1,0,"ONE_LINER,PUNCTUATOR",0,0," ;"
132,BRACE_CLOSE,UNION,PARENT_NOT_SET,38,38,39,1,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," }"
132,WORD,NONE,PARENT_NOT_SET,40,40,43,1,0,0,0,"STMT_START,EXPR_START,VAR_DEF,VAR_1ST,VAR_INLINE",0,0," u11"
132,COMMA,NONE,PARENT_NOT_SET,43,43,44,0,0,0,0,"PUNCTUATOR",0,0," ,"
132,PTR_TYPE,UNION,PARENT_NOT_SET,45,45,46,1,0,0,0,"EXPR_START,PUNCTUATOR",0,0," *"
132,WORD,NONE,PARENT_NOT_SET,46,46,49,0,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE,LVALUE",0,0," u12"
132,ASSIGN,NONE,PARENT_NOT_SET,50,50,51,1,0,0,0,"PUNCTUATOR",0,0," ="
132,WORD,NONE,PARENT_NOT_SET,52,52,59,1,0,0,0,"EXPR_START",0,0," nullptr"
132,COMMA,NONE,PARENT_NOT_SET,59,59,60,0,0,0,0,"PUNCTUATOR",0,0," ,"
132,PTR_TYPE,UNION,PARENT_NOT_SET,61,61,62,1,0,0,0,"EXPR_START,PUNCTUATOR",0,0," *"
132,WORD,NONE,PARENT_NOT_SET,62,62,65,0,0,0,0,"EXPR_START,VAR_DEF,VAR_INLINE,LVALUE",0,0," u13"
132,BRACE_OPEN,BRACED_INIT_LIST,PARENT_NOT_SET,65,65,66,0,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," {"
132,NUMBER,NONE,PARENT_NOT_SET,66,66,67,0,1,1,0,"STMT_START,EXPR_START,ONE_LINER",0,0," 0"
132,BRACE_CLOSE,BRACED_INIT_LIST,PARENT_NOT_SET,67,67,68,0,0,0,0,"ONE_LINER,PUNCTUATOR",0,0," }"
132,SEMICOLON,UNION,PARENT_NOT_SET,68,68,69,0,0,0,0,"PUNCTUATOR",0,0," ;"
132,NEWLINE,NONE,PARENT_NOT_SET,69,69,1,0,0,0,0,"",2,0,
134,UNION,NONE,PARENT_NOT_SET,1,1,6,0,0,0,0,"FORCE_SPACE,STMT_START,EXPR_START",0,0," union"
134,WORD,NONE,PARENT_NOT_SET,7,7,17,1,0,0,0,"FORCE_SPACE",0,0," API_EXPORT"
134,TYPE,UNION,PARENT_NOT_SET,18,18,20,1,0,0,0,"FORCE_SPACE,VAR_TYPE",0,0," u1"
134,WORD,NONE,PARENT_NOT_SET,21,21,24,1,0,0,0,"VAR_DEF,VAR_1ST",0,0," u21"
134,SEMICOLON,UNION,PARENT_NOT_SET,24,24,25,0,0,0,0,"PUNCTUATOR",0,0," ;"
134,NEWLINE,NONE,PARENT_NOT_SET,25,25,1,0,0,0,0,"",1,0,
Can't render this file because it has a wrong number of fields in line 3.

@ -0,0 +1,692 @@
# option(s) with 'not default' value: 0
#
# -=====-
# number of loops = 1
# -=====-
# language = CPP
# -=====-
# Line Tag Parent_type Type of the parent Columns Br/Lvl/pp Flag Nl Text
# 1> COMMENT_MULTI| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 4/ 7/ 3][0/0/0][ 0][9-0] /**␤ * the enum (and variable declarations thereof) could be of␤ * the following forms:␤ *␤ * "enum type [: integral_type] { ... } [x, ...]"␤ * "enum type [: integral_type]"␤ * "enum class type [: integral_type] { ... } [x, ...]"␤ * "enum class type [: integral_type]"␤ * "enum [: integral_type] { ... } x, ..."␤ */
# 10> NEWLINE| NONE| PARENT_NOT_SET[ 7/ 7/ 4/ 0][0/0/0][ 0][2-0]
# 12> COMMENT_MULTI| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 4/ 7/ 0][0/0/0][ 0][9-0] /**␤ * the class/struct (and variable declarations thereof) could be of␤ * the following forms:␤ *␤ * template<...> class/struct[<...>] [macros/attributes ...] type [: bases ...] { }␤ * template<...> class/struct[<...>] [macros/attributes ...] type␤ * class/struct[ [macros/attributes ...] type [: bases ...] { } [x, ...]␤ * class/struct [macros/attributes ...] type [x, ...]␤ * class/struct [macros/attributes ...] [: bases] { } x, ...␤ */
# 21> NEWLINE| NONE| PARENT_NOT_SET[ 7/ 7/ 1/ 0][0/0/0][ 0][2-0]
# 23> PREPROC| PP_DEFINE| PARENT_NOT_SET[ 1/ 1/ 2/ 0][1/1/0][ 2001c0001][0-0] #
# 23> PP_DEFINE| NONE| PARENT_NOT_SET[ 2/ 2/ 8/ 0][1/1/0][ 20001][0-0] define
# 23> MACRO_FUNC| NONE| PARENT_NOT_SET[ 9/ 9/ 16/ 1][1/1/0][ 80001][0-0] ALIGNAS
# 23> FPAREN_OPEN| MACRO_FUNC| PARENT_NOT_SET[ 16/ 16/ 17/ 0][1/1/0][ 200000001][0-0] (
# 23> WORD| NONE| PARENT_NOT_SET[ 17/ 17/ 31/ 0][1/2/0][ 80011][0-0] byte_alignment
# 23> FPAREN_CLOSE| MACRO_FUNC| PARENT_NOT_SET[ 31/ 31/ 32/ 0][1/1/0][ 200000011][0-0] )
# 23> ATTRIBUTE| NONE| PARENT_NOT_SET[ 33/ 33/ 46/ 1][1/1/0][ 1][0-0] __attribute__
# 23> FPAREN_OPEN| ATTRIBUTE| PARENT_NOT_SET[ 46/ 46/ 47/ 0][1/1/0][ 200000001][0-0] (
# 23> PAREN_OPEN| NONE| PARENT_NOT_SET[ 47/ 47/ 48/ 0][1/2/0][ 200080001][0-0] (
# 23> FUNC_CALL| NONE| PARENT_NOT_SET[ 48/ 48/ 55/ 0][1/3/0][ 80001][0-0] aligned
# 23> FPAREN_OPEN| FUNC_CALL| PARENT_NOT_SET[ 55/ 55/ 56/ 0][1/3/0][ 200000001][0-0] (
# 23> WORD| NONE| PARENT_NOT_SET[ 56/ 56/ 70/ 0][1/4/0][ 80011][0-0] byte_alignment
# 23> FPAREN_CLOSE| FUNC_CALL| PARENT_NOT_SET[ 70/ 70/ 71/ 0][1/3/0][ 200000011][0-0] )
# 23> PAREN_CLOSE| NONE| PARENT_NOT_SET[ 71/ 71/ 72/ 0][1/2/0][ 200000001][0-0] )
# 23> FPAREN_CLOSE| ATTRIBUTE| PARENT_NOT_SET[ 72/ 72/ 73/ 0][1/1/0][ 200000001][0-0] )
# 23> NEWLINE| NONE| PARENT_NOT_SET[ 73/ 73/ 1/ 0][0/0/0][ 0][2-0]
# 25> PREPROC| PP_IF| PARENT_NOT_SET[ 1/ 1/ 2/ 0][0/0/0][ 200100001][0-0] #
# 25> PP_IF| NONE| PARENT_NOT_SET[ 2/ 2/ 4/ 0][0/0/1][ 20001][0-0] if
# 25> PP_DEFINED| NONE| PARENT_NOT_SET[ 5/ 5/ 12/ 1][0/0/1][ 80001][0-0] defined
# 25> PAREN_OPEN| NONE| PARENT_NOT_SET[ 13/ 13/ 14/ 1][0/0/1][ 200000001][0-0] (
# 25> WORD| NONE| PARENT_NOT_SET[ 14/ 14/ 22/ 0][0/0/1][ 80001][0-0] __unix__
# 25> PAREN_CLOSE| NONE| PARENT_NOT_SET[ 22/ 22/ 23/ 0][0/0/1][ 200000001][0-0] )
# 25> BOOL| NONE| PARENT_NOT_SET[ 24/ 24/ 26/ 1][0/0/1][ 200000001][0-0] ||
# 25> PAREN_OPEN| NONE| PARENT_NOT_SET[ 27/ 27/ 28/ 1][0/0/1][ 200000001][0-0] (
# 25> PP_DEFINED| NONE| PARENT_NOT_SET[ 28/ 28/ 35/ 0][0/0/1][ 80001][0-0] defined
# 25> PAREN_OPEN| NONE| PARENT_NOT_SET[ 36/ 36/ 37/ 1][0/0/1][ 200000001][0-0] (
# 25> WORD| NONE| PARENT_NOT_SET[ 37/ 37/ 46/ 0][0/0/1][ 80001][0-0] __APPLE__
# 25> PAREN_CLOSE| NONE| PARENT_NOT_SET[ 46/ 46/ 47/ 0][0/0/1][ 200000001][0-0] )
# 25> BOOL| NONE| PARENT_NOT_SET[ 48/ 48/ 50/ 1][0/0/1][ 200000001][0-0] &&
# 25> PP_DEFINED| NONE| PARENT_NOT_SET[ 51/ 51/ 58/ 1][0/0/1][ 1][0-0] defined
# 25> PAREN_OPEN| NONE| PARENT_NOT_SET[ 59/ 59/ 60/ 1][0/0/1][ 200000001][0-0] (
# 25> WORD| NONE| PARENT_NOT_SET[ 60/ 60/ 68/ 0][0/0/1][ 80001][0-0] __MACH__
# 25> PAREN_CLOSE| NONE| PARENT_NOT_SET[ 68/ 68/ 69/ 0][0/0/1][ 200000001][0-0] )
# 25> PAREN_CLOSE| NONE| PARENT_NOT_SET[ 69/ 69/ 70/ 0][0/0/1][ 200000001][0-0] )
# 25> NEWLINE| NONE| PARENT_NOT_SET[ 70/ 70/ 1/ 0][0/0/1][ 0][1-0]
# 26> PREPROC| PP_DEFINE| PARENT_NOT_SET[ 1/ 1/ 2/ 0][1/1/1][ 2001c0001][0-0] #
# 26> PP_DEFINE| NONE| PARENT_NOT_SET[ 2/ 2/ 8/ 0][1/1/1][ 20001][0-0] define
# 26> MACRO| NONE| PARENT_NOT_SET[ 9/ 9/ 19/ 1][1/1/1][ 20001][0-0] API_EXPORT
# 26> ATTRIBUTE| NONE| PARENT_NOT_SET[ 20/ 20/ 33/ 1][1/1/1][ 80001][0-0] __attribute__
# 26> FPAREN_OPEN| ATTRIBUTE| PARENT_NOT_SET[ 34/ 34/ 35/ 1][1/1/1][ 2000c0001][0-0] (
# 26> PAREN_OPEN| NONE| PARENT_NOT_SET[ 35/ 35/ 36/ 0][1/2/1][ 200080001][0-0] (
# 26> FUNC_CALL| NONE| PARENT_NOT_SET[ 36/ 36/ 46/ 0][1/3/1][ 80001][0-0] visibility
# 26> FPAREN_OPEN| FUNC_CALL| PARENT_NOT_SET[ 46/ 46/ 47/ 0][1/3/1][ 200000001][0-0] (
# 26> STRING| PP_INCLUDE| PARENT_NOT_SET[ 47/ 47/ 56/ 0][1/4/1][ 80011][0-0] "default"
# 26> FPAREN_CLOSE| FUNC_CALL| PARENT_NOT_SET[ 56/ 56/ 57/ 0][1/3/1][ 200000011][0-0] )
# 26> PAREN_CLOSE| NONE| PARENT_NOT_SET[ 57/ 57/ 58/ 0][1/2/1][ 200000001][0-0] )
# 26> FPAREN_CLOSE| ATTRIBUTE| PARENT_NOT_SET[ 58/ 58/ 59/ 0][1/1/1][ 200000001][0-0] )
# 26> NEWLINE| NONE| PARENT_NOT_SET[ 59/ 59/ 1/ 0][0/0/1][ 0][1-0]
# 27> PREPROC| PP_ELSE| PARENT_NOT_SET[ 1/ 1/ 2/ 0][0/0/0][ 200100001][0-0] #
# 27> PP_ELSE| NONE| PP_IF[ 2/ 2/ 6/ 0][0/0/1][ 20001][0-0] elif
# 27> PP_DEFINED| NONE| PARENT_NOT_SET[ 7/ 7/ 14/ 1][0/0/1][ a0001][0-0] defined
# 27> WORD| NONE| PARENT_NOT_SET[ 15/ 15/ 21/ 1][0/0/1][ 1][0-0] _WIN32
# 27> NEWLINE| NONE| PARENT_NOT_SET[ 21/ 21/ 1/ 0][0/0/1][ 0][1-0]
# 28> PREPROC| PP_DEFINE| PARENT_NOT_SET[ 1/ 1/ 2/ 0][1/1/1][ 2001c0001][0-0] #
# 28> PP_DEFINE| NONE| PARENT_NOT_SET[ 2/ 2/ 8/ 0][1/1/1][ 20001][0-0] define
# 28> MACRO| NONE| PARENT_NOT_SET[ 9/ 9/ 19/ 1][1/1/1][ 20001][0-0] API_EXPORT
# 28> DECLSPEC| NONE| PARENT_NOT_SET[ 20/ 20/ 30/ 1][1/1/1][ c0001][0-0] __declspec
# 28> PAREN_OPEN| DECLSPEC| PARENT_NOT_SET[ 30/ 30/ 31/ 0][1/1/1][ 200000001][0-0] (
# 28> WORD| NONE| PARENT_NOT_SET[ 31/ 31/ 40/ 0][1/2/1][ 80001][0-0] dllexport
# 28> PAREN_CLOSE| DECLSPEC| PARENT_NOT_SET[ 40/ 40/ 41/ 0][1/1/1][ 200000001][0-0] )
# 28> NEWLINE| NONE| PARENT_NOT_SET[ 41/ 41/ 1/ 0][0/0/1][ 0][1-0]
# 29> PREPROC| PP_ELSE| PARENT_NOT_SET[ 1/ 1/ 2/ 0][0/0/0][ 200100001][0-0] #
# 29> PP_ELSE| NONE| PP_IF[ 2/ 2/ 6/ 0][0/0/1][ 1][0-0] else
# 29> NEWLINE| NONE| PARENT_NOT_SET[ 6/ 6/ 1/ 0][0/0/1][ 0][1-0]
# 30> PREPROC| PP_DEFINE| PARENT_NOT_SET[ 1/ 1/ 2/ 0][1/1/1][ 2001c0001][0-0] #
# 30> PP_DEFINE| NONE| PARENT_NOT_SET[ 2/ 2/ 8/ 0][1/1/1][ 20001][0-0] define
# 30> MACRO| NONE| PARENT_NOT_SET[ 9/ 9/ 19/ 1][1/1/1][ 1][0-0] API_EXPORT
# 30> NEWLINE| NONE| PARENT_NOT_SET[ 19/ 19/ 1/ 0][0/0/1][ 0][1-0]
# 31> PREPROC| PP_ENDIF| PARENT_NOT_SET[ 1/ 1/ 2/ 0][0/0/0][ 200100001][0-0] #
# 31> PP_ENDIF| NONE| PP_IF[ 2/ 2/ 7/ 0][0/0/0][ 1][0-0] endif
# 31> NEWLINE| NONE| PARENT_NOT_SET[ 7/ 7/ 1/ 0][0/0/0][ 0][2-0]
# 33> NAMESPACE| NONE| PARENT_NOT_SET[ 1/ 1/ 10/ 0][0/0/0][ e0000][0-0] namespace
# 33> WORD| NAMESPACE| PARENT_NOT_SET[ 11/ 11/ 26/ 1][0/0/0][ 0][0-0] outer_namespace
# 33> NEWLINE| NONE| PARENT_NOT_SET[ 26/ 26/ 1/ 0][0/0/0][ 0][1-0]
# 34> BRACE_OPEN| NAMESPACE| PARENT_NOT_SET[ 1/ 1/ 2/ 0][0/0/0][ 200000000][0-0] {
# 34> NEWLINE| NONE| PARENT_NOT_SET[ 2/ 2/ 1/ 0][1/1/0][ 1000][2-0]
# 36> NAMESPACE| NONE| PARENT_NOT_SET[ 1/ 1/ 10/ 0][1/1/0][ e1000][0-0] namespace
# 36> WORD| NAMESPACE| PARENT_NOT_SET[ 11/ 11/ 26/ 1][1/1/0][ 1000][0-0] inner_namespace
# 36> NEWLINE| NONE| PARENT_NOT_SET[ 26/ 26/ 1/ 0][1/1/0][ 1000][1-0]
# 37> BRACE_OPEN| NAMESPACE| PARENT_NOT_SET[ 1/ 1/ 2/ 0][1/1/0][ 200001000][0-0] {
# 37> NEWLINE| NONE| PARENT_NOT_SET[ 2/ 2/ 1/ 0][2/2/0][ 1000][2-0]
# 39> CLASS| NONE| PARENT_NOT_SET[ 1/ 1/ 6/ 0][2/2/0][ e1000][0-0] class
# 39> TYPE| CLASS| PARENT_NOT_SET[ 7/ 7/ 12/ 1][2/2/0][ 1000][0-0] Base1
# 39> BRACE_OPEN| CLASS| PARENT_NOT_SET[ 13/ 13/ 14/ 1][2/2/0][ 2c0001400][0-0] {
# 39> BRACE_CLOSE| CLASS| PARENT_NOT_SET[ 15/ 15/ 16/ 1][2/2/0][ 2c0001400][0-0] }
# 39> SEMICOLON| CLASS| PARENT_NOT_SET[ 16/ 16/ 17/ 0][2/2/0][ 200000000][0-0] ;
# 39> NEWLINE| NONE| PARENT_NOT_SET[ 17/ 17/ 1/ 0][2/2/0][ 0][2-0]
# 41> TEMPLATE| NONE| PARENT_NOT_SET[ 1/ 1/ 9/ 0][2/2/0][ c0000][0-0] template
# 41> ANGLE_OPEN| TEMPLATE| PARENT_NOT_SET[ 9/ 9/ 10/ 0][2/2/0][ 200000040][0-0] <
# 41> TYPENAME| NONE| PARENT_NOT_SET[ 10/ 10/ 18/ 0][2/3/0][ 80040][0-0] typename
# 41> ANGLE_CLOSE| TEMPLATE| PARENT_NOT_SET[ 18/ 18/ 19/ 0][2/2/0][ 200000040][0-0] >
# 41> CLASS| TEMPLATE| PARENT_NOT_SET[ 20/ 20/ 25/ 1][2/2/0][ a0000][0-0] class
# 41> TYPE| CLASS| PARENT_NOT_SET[ 26/ 26/ 31/ 1][2/2/0][ 0][0-0] Base2
# 41> BRACE_OPEN| CLASS| PARENT_NOT_SET[ 32/ 32/ 33/ 1][2/2/0][ 2c0000400][0-0] {
# 41> BRACE_CLOSE| CLASS| PARENT_NOT_SET[ 34/ 34/ 35/ 1][2/2/0][ 2c0000400][0-0] }
# 41> SEMICOLON| CLASS| PARENT_NOT_SET[ 35/ 35/ 36/ 0][2/2/0][ 200000000][0-0] ;
# 41> NEWLINE| NONE| PARENT_NOT_SET[ 36/ 36/ 1/ 0][2/2/0][ 0][2-0]
# 43> BRACE_CLOSE| NAMESPACE| PARENT_NOT_SET[ 1/ 1/ 2/ 0][1/1/0][ 200000000][0-0] }
# 43> NEWLINE| NONE| PARENT_NOT_SET[ 2/ 2/ 1/ 0][1/1/0][ 0][2-0]
# 45> BRACE_CLOSE| NAMESPACE| PARENT_NOT_SET[ 1/ 1/ 2/ 0][0/0/0][ 200000000][0-0] }
# 45> NEWLINE| NONE| PARENT_NOT_SET[ 2/ 2/ 1/ 0][0/0/0][ 0][2-0]
# 47> COMMENT_CPP| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 1/ 82/ 0][0/0/0][ 0][0-0] // template<...> class/struct[<...>] [macros/attributes ...] type : bases ... { }
# 47> NEWLINE| NONE| PARENT_NOT_SET[ 82/ 82/ 1/ 0][0/0/0][ 0][1-0]
# 48> TEMPLATE| NONE| PARENT_NOT_SET[ 1/ 1/ 9/ 0][0/0/0][ c0000][0-0] template
# 48> ANGLE_OPEN| TEMPLATE| PARENT_NOT_SET[ 9/ 9/ 10/ 0][0/0/0][ 200000040][0-0] <
# 48> TYPENAME| NONE| PARENT_NOT_SET[ 10/ 10/ 18/ 0][0/1/0][ 80040][0-0] typename
# 48> COMMA| NONE| PARENT_NOT_SET[ 18/ 18/ 19/ 0][0/1/0][ 200000040][0-0] ,
# 48> TYPENAME| NONE| PARENT_NOT_SET[ 20/ 20/ 28/ 1][0/1/0][ 80040][0-0] typename
# 48> ELLIPSIS| NONE| PARENT_NOT_SET[ 29/ 29/ 32/ 1][0/1/0][ 200000040][0-0] ...
# 48> ANGLE_CLOSE| TEMPLATE| PARENT_NOT_SET[ 32/ 32/ 33/ 0][0/0/0][ 200000040][0-0] >
# 48> NEWLINE| NONE| PARENT_NOT_SET[ 33/ 33/ 1/ 0][0/0/0][ 0][1-0]
# 49> CLASS| TEMPLATE| PARENT_NOT_SET[ 1/ 1/ 6/ 0][0/0/0][ a0000][0-0] class
# 49> WORD| NONE| PARENT_NOT_SET[ 7/ 7/ 17/ 1][0/0/0][ 20000][0-0] API_EXPORT
# 49> ATTRIBUTE| NONE| PARENT_NOT_SET[ 18/ 18/ 31/ 1][0/0/0][ 0][0-0] __attribute__
# 49> FPAREN_OPEN| ATTRIBUTE| PARENT_NOT_SET[ 31/ 31/ 32/ 0][0/0/0][ 200000000][0-0] (
# 49> PAREN_OPEN| NONE| PARENT_NOT_SET[ 32/ 32/ 33/ 0][0/1/0][ 200080000][0-0] (
# 49> WORD| NONE| PARENT_NOT_SET[ 33/ 33/ 47/ 0][0/2/0][ 80000][0-0] __deprecated__
# 49> PAREN_CLOSE| NONE| PARENT_NOT_SET[ 47/ 47/ 48/ 0][0/1/0][ 200000000][0-0] )
# 49> FPAREN_CLOSE| ATTRIBUTE| PARENT_NOT_SET[ 48/ 48/ 49/ 0][0/0/0][ 200000000][0-0] )
# 49> MACRO_FUNC_CALL| NONE| PARENT_NOT_SET[ 50/ 50/ 57/ 1][0/0/0][ 0][0-0] ALIGNAS
# 49> FPAREN_OPEN| MACRO_FUNC_CALL| PARENT_NOT_SET[ 57/ 57/ 58/ 0][0/0/0][ 200000000][0-0] (
# 49> NUMBER| NONE| PARENT_NOT_SET[ 58/ 58/ 59/ 0][0/1/0][ 80000][0-0] 4
# 49> FPAREN_CLOSE| MACRO_FUNC_CALL| PARENT_NOT_SET[ 59/ 59/ 60/ 0][0/0/0][ 200000000][0-0] )
# 49> TYPE| CLASS| PARENT_NOT_SET[ 61/ 61/ 63/ 1][0/0/0][ 0][0-0] c1
# 49> NEWLINE| NONE| PARENT_NOT_SET[ 63/ 63/ 1/ 0][0/0/0][ 0][1-0]
# 50> CLASS_COLON| CLASS| PARENT_NOT_SET[ 9/ 1/ 2/ 0][0/0/0][ 200000800][0-0] :
# 50> QUALIFIER| NONE| PARENT_NOT_SET[ 11/ 3/ 9/ 1][0/0/0][ e0800][0-0] public
# 50> TYPE| NONE| PARENT_NOT_SET[ 18/ 10/ 25/ 1][0/0/0][ 800][0-0] outer_namespace
# 50> DC_MEMBER| NONE| PARENT_NOT_SET[ 33/ 25/ 27/ 0][0/0/0][ 200000800][0-0] ::
# 50> TYPE| NONE| PARENT_NOT_SET[ 35/ 27/ 42/ 0][0/0/0][ 800][0-0] inner_namespace
# 50> DC_MEMBER| NONE| PARENT_NOT_SET[ 50/ 42/ 44/ 0][0/0/0][ 200000800][0-0] ::
# 50> TYPE| NONE| PARENT_NOT_SET[ 52/ 44/ 49/ 0][0/0/0][ 800][0-0] Base1
# 50> COMMA| NONE| PARENT_NOT_SET[ 57/ 49/ 50/ 0][0/0/0][ 200000800][0-0] ,
# 50> NEWLINE| NONE| PARENT_NOT_SET[ 58/ 50/ 3/ 0][0/0/0][ 0][1-0]
# 51> QUALIFIER| NONE| PARENT_NOT_SET[ 9/ 3/ 9/ 0][0/0/0][ a0800][0-0] public
# 51> TYPE| NONE| PARENT_NOT_SET[ 16/ 10/ 25/ 1][0/0/0][ 800][0-0] outer_namespace
# 51> DC_MEMBER| NONE| PARENT_NOT_SET[ 31/ 25/ 27/ 0][0/0/0][ 200000800][0-0] ::
# 51> TYPE| NONE| PARENT_NOT_SET[ 33/ 27/ 42/ 0][0/0/0][ 800][0-0] inner_namespace
# 51> DC_MEMBER| NONE| PARENT_NOT_SET[ 48/ 42/ 44/ 0][0/0/0][ 200000800][0-0] ::
# 51> TYPE| NONE| PARENT_NOT_SET[ 50/ 44/ 49/ 0][0/0/0][ 800][0-0] Base2
# 51> ANGLE_OPEN| TEMPLATE| PARENT_NOT_SET[ 55/ 49/ 50/ 0][0/0/0][ 200000840][0-0] <
# 51> TYPE| NONE| PARENT_NOT_SET[ 56/ 50/ 65/ 0][0/1/0][ 80840][0-0] outer_namespace
# 51> DC_MEMBER| NONE| PARENT_NOT_SET[ 71/ 65/ 67/ 0][0/1/0][ 200000840][0-0] ::
# 51> TYPE| NONE| PARENT_NOT_SET[ 73/ 67/ 82/ 0][0/1/0][ 840][0-0] inner_namespace
# 51> DC_MEMBER| NONE| PARENT_NOT_SET[ 88/ 82/ 84/ 0][0/1/0][ 200000840][0-0] ::
# 51> TYPE| NONE| PARENT_NOT_SET[ 90/ 84/ 89/ 0][0/1/0][ 840][0-0] Base1
# 51> ANGLE_CLOSE| TEMPLATE| PARENT_NOT_SET[ 95/ 89/ 90/ 0][0/0/0][ 200000840][0-0] >
# 51> NEWLINE| NONE| PARENT_NOT_SET[ 96/ 90/ 1/ 0][0/0/0][ 0][1-0]
# 52> BRACE_OPEN| CLASS| PARENT_NOT_SET[ 1/ 1/ 2/ 0][0/0/0][ 280080400][0-0] {
# 52> NEWLINE| NONE| PARENT_NOT_SET[ 2/ 2/ 1/ 0][1/1/0][ 400][2-0]
# 54> BRACE_CLOSE| CLASS| PARENT_NOT_SET[ 1/ 1/ 2/ 0][0/0/0][ 280000400][0-0] }
# 54> SEMICOLON| CLASS| PARENT_NOT_SET[ 2/ 2/ 3/ 0][0/0/0][ 200000000][0-0] ;
# 54> NEWLINE| NONE| PARENT_NOT_SET[ 3/ 3/ 1/ 0][0/0/0][ 0][2-0]
# 56> COMMENT_CPP| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 1/ 70/ 0][0/0/0][ 0][0-0] // template<...> class/struct[<...>] [macros/attributes ...] type { }
# 56> NEWLINE| NONE| PARENT_NOT_SET[ 70/ 70/ 1/ 0][0/0/0][ 0][1-0]
# 57> TEMPLATE| NONE| PARENT_NOT_SET[ 1/ 1/ 9/ 0][0/0/0][ c0000][0-0] template
# 57> ANGLE_OPEN| TEMPLATE| PARENT_NOT_SET[ 9/ 9/ 10/ 0][0/0/0][ 200000040][0-0] <
# 57> TYPENAME| NONE| PARENT_NOT_SET[ 10/ 10/ 18/ 0][0/1/0][ 80040][0-0] typename
# 57> COMMA| NONE| PARENT_NOT_SET[ 18/ 18/ 19/ 0][0/1/0][ 200000040][0-0] ,
# 57> TYPENAME| NONE| PARENT_NOT_SET[ 20/ 20/ 28/ 1][0/1/0][ 80040][0-0] typename
# 57> ELLIPSIS| NONE| PARENT_NOT_SET[ 29/ 29/ 32/ 1][0/1/0][ 200000040][0-0] ...
# 57> ANGLE_CLOSE| TEMPLATE| PARENT_NOT_SET[ 32/ 32/ 33/ 0][0/0/0][ 200000040][0-0] >
# 57> NEWLINE| NONE| PARENT_NOT_SET[ 33/ 33/ 1/ 0][0/0/0][ 0][1-0]
# 58> CLASS| TEMPLATE| PARENT_NOT_SET[ 1/ 1/ 6/ 0][0/0/0][ a0000][0-0] class
# 58> WORD| NONE| PARENT_NOT_SET[ 7/ 7/ 17/ 1][0/0/0][ 20000][0-0] API_EXPORT
# 58> TYPE| CLASS| PARENT_NOT_SET[ 18/ 18/ 20/ 1][0/0/0][ 0][0-0] c2
# 58> NEWLINE| NONE| PARENT_NOT_SET[ 20/ 20/ 1/ 0][0/0/0][ 0][1-0]
# 59> BRACE_OPEN| CLASS| PARENT_NOT_SET[ 1/ 1/ 2/ 0][0/0/0][ 200000400][0-0] {
# 59> NEWLINE| NONE| PARENT_NOT_SET[ 2/ 2/ 1/ 0][1/1/0][ 400][1-0]
# 60> ACCESS| NONE| PARENT_NOT_SET[ 1/ 1/ 7/ 0][1/1/0][ c0400][0-0] public
# 60> ACCESS_COLON| NONE| PARENT_NOT_SET[ 7/ 7/ 8/ 0][1/1/0][ 200000400][0-0] :
# 60> NEWLINE| NONE| PARENT_NOT_SET[ 8/ 8/ 4/ 0][1/1/0][ 400][2-0]
# 62> TEMPLATE| NONE| PARENT_NOT_SET[ 1/ 4/ 12/ 0][1/1/0][ c0400][0-0] template
# 62> ANGLE_OPEN| TEMPLATE| PARENT_NOT_SET[ 9/ 12/ 13/ 0][1/1/0][ 200000440][0-0] <
# 62> TYPENAME| NONE| PARENT_NOT_SET[ 10/ 13/ 21/ 0][1/2/0][ a0440][0-0] typename
# 62> TYPE| NONE| PARENT_NOT_SET[ 19/ 22/ 23/ 1][1/2/0][ 440][0-0] T
# 62> ANGLE_CLOSE| TEMPLATE| PARENT_NOT_SET[ 20/ 23/ 24/ 0][1/1/0][ 200000440][0-0] >
# 62> NEWLINE| NONE| PARENT_NOT_SET[ 21/ 24/ 4/ 0][1/1/0][ 400][1-0]
# 63> STRUCT| TEMPLATE| PARENT_NOT_SET[ 1/ 4/ 10/ 0][1/1/0][ a0400][0-0] struct
# 63> TYPE| STRUCT| PARENT_NOT_SET[ 8/ 11/ 22/ 1][1/1/0][ 400][0-0] inner_class
# 63> NEWLINE| NONE| PARENT_NOT_SET[ 19/ 22/ 4/ 0][1/1/0][ 400][1-0]
# 64> BRACE_OPEN| STRUCT| PARENT_NOT_SET[ 1/ 4/ 5/ 0][1/1/0][ 200000400][0-0] {
# 64> NEWLINE| NONE| PARENT_NOT_SET[ 2/ 5/ 7/ 0][2/2/0][ 402][1-0]
# 65> QUALIFIER| NONE| PARENT_NOT_SET[ 9/ 7/ 13/ 0][2/2/0][ 8e0402][0-0] static
# 65> TYPE| NONE| PARENT_NOT_SET[ 16/ 14/ 25/ 1][2/2/0][ 800402][0-0] inner_class
# 65> ANGLE_OPEN| TEMPLATE| PARENT_NOT_SET[ 27/ 25/ 26/ 0][2/2/0][ 200000442][0-0] <
# 65> TYPE| NONE| PARENT_NOT_SET[ 28/ 26/ 27/ 0][2/3/0][ 80442][0-0] T
# 65> ANGLE_CLOSE| TEMPLATE| PARENT_NOT_SET[ 29/ 27/ 28/ 0][2/2/0][ 200000442][0-0] >
# 65> PTR_TYPE| NONE| PARENT_NOT_SET[ 31/ 29/ 30/ 1][2/2/0][ 200880402][0-0] *
# 65> WORD| NONE| PARENT_NOT_SET[ 32/ 30/ 43/ 0][2/2/0][ 3080402][0-0] m_inner_class
# 65> SEMICOLON| NONE| PARENT_NOT_SET[ 45/ 43/ 44/ 0][2/2/0][ 200000402][0-0] ;
# 65> NEWLINE| NONE| PARENT_NOT_SET[ 46/ 44/ 4/ 0][2/2/0][ 402][1-0]
# 66> BRACE_CLOSE| STRUCT| PARENT_NOT_SET[ 1/ 4/ 5/ 0][1/1/0][ 200000402][0-0] }
# 66> SEMICOLON| STRUCT| PARENT_NOT_SET[ 2/ 5/ 6/ 0][1/1/0][ 200000400][0-0] ;
# 66> NEWLINE| NONE| PARENT_NOT_SET[ 3/ 6/ 1/ 0][1/1/0][ 400][1-0]
# 67> BRACE_CLOSE| CLASS| PARENT_NOT_SET[ 1/ 1/ 2/ 0][0/0/0][ 200000400][0-0] }
# 67> SEMICOLON| CLASS| PARENT_NOT_SET[ 2/ 2/ 3/ 0][0/0/0][ 200000000][0-0] ;
# 67> NEWLINE| NONE| PARENT_NOT_SET[ 3/ 3/ 1/ 0][0/0/0][ 0][2-0]
# 69> TEMPLATE| NONE| PARENT_NOT_SET[ 1/ 1/ 9/ 0][0/0/0][ c0000][0-0] template
# 69> ANGLE_OPEN| TEMPLATE| PARENT_NOT_SET[ 9/ 9/ 10/ 0][0/0/0][ 200000040][0-0] <
# 69> ANGLE_CLOSE| TEMPLATE| PARENT_NOT_SET[ 10/ 10/ 11/ 0][0/0/0][ 200080040][0-0] >
# 69> TEMPLATE| NONE| PARENT_NOT_SET[ 12/ 12/ 20/ 1][0/0/0][ 80000][0-0] template
# 69> ANGLE_OPEN| TEMPLATE| PARENT_NOT_SET[ 20/ 20/ 21/ 0][0/0/0][ 200000040][0-0] <
# 69> ANGLE_CLOSE| TEMPLATE| PARENT_NOT_SET[ 21/ 21/ 22/ 0][0/0/0][ 200080040][0-0] >
# 69> STRUCT| TEMPLATE| PARENT_NOT_SET[ 23/ 23/ 29/ 1][0/0/0][ a0000][0-0] struct
# 69> WORD| NONE| PARENT_NOT_SET[ 30/ 30/ 40/ 1][0/0/0][ 20000][0-0] API_EXPORT
# 69> TYPE| NONE| PARENT_NOT_SET[ 41/ 41/ 43/ 1][0/0/0][ 0][0-0] c2
# 69> ANGLE_OPEN| TEMPLATE| PARENT_NOT_SET[ 43/ 43/ 44/ 0][0/0/0][ 200000040][0-0] <
# 69> TYPE| NONE| PARENT_NOT_SET[ 44/ 44/ 47/ 0][0/1/0][ 80040][0-0] int
# 69> ANGLE_CLOSE| TEMPLATE| PARENT_NOT_SET[ 47/ 47/ 48/ 0][0/0/0][ 200000040][0-0] >
# 69> DC_MEMBER| NONE| PARENT_NOT_SET[ 48/ 48/ 50/ 0][0/0/0][ 200080000][0-0] ::
# 69> TYPE| STRUCT| PARENT_NOT_SET[ 50/ 50/ 61/ 0][0/0/0][ 800000][0-0] inner_class
# 69> ANGLE_OPEN| TEMPLATE| PARENT_NOT_SET[ 61/ 61/ 62/ 0][0/0/0][ 200000040][0-0] <
# 69> TYPE| NONE| PARENT_NOT_SET[ 62/ 62/ 65/ 0][0/1/0][ 80040][0-0] int
# 69> ANGLE_CLOSE| TEMPLATE| PARENT_NOT_SET[ 65/ 65/ 66/ 0][0/0/0][ 200000040][0-0] >
# 69> PTR_TYPE| NONE| PARENT_NOT_SET[ 67/ 67/ 68/ 1][0/0/0][ 200080000][0-0] *
# 69> TYPE| NONE| PARENT_NOT_SET[ 68/ 68/ 70/ 0][0/0/0][ 80000][0-0] c2
# 69> ANGLE_OPEN| TEMPLATE| PARENT_NOT_SET[ 70/ 70/ 71/ 0][0/0/0][ 200000040][0-0] <
# 69> TYPE| NONE| PARENT_NOT_SET[ 71/ 71/ 74/ 0][0/1/0][ 80040][0-0] int
# 69> ANGLE_CLOSE| TEMPLATE| PARENT_NOT_SET[ 74/ 74/ 75/ 0][0/0/0][ 200000040][0-0] >
# 69> DC_MEMBER| NONE| PARENT_NOT_SET[ 75/ 75/ 77/ 0][0/0/0][ 200080000][0-0] ::
# 69> TYPE| NONE| PARENT_NOT_SET[ 77/ 77/ 88/ 0][0/0/0][ 0][0-0] inner_class
# 69> ANGLE_OPEN| TEMPLATE| PARENT_NOT_SET[ 88/ 88/ 89/ 0][0/0/0][ 200000040][0-0] <
# 69> TYPE| NONE| PARENT_NOT_SET[ 89/ 89/ 92/ 0][0/1/0][ 80040][0-0] int
# 69> ANGLE_CLOSE| TEMPLATE| PARENT_NOT_SET[ 92/ 92/ 93/ 0][0/0/0][ 200000040][0-0] >
# 69> DC_MEMBER| NONE| PARENT_NOT_SET[ 93/ 93/ 95/ 0][0/0/0][ 200080000][0-0] ::
# 69> WORD| NONE| PARENT_NOT_SET[ 95/ 95/108/ 0][0/0/0][ 23000000][0-0] m_inner_class
# 69> ASSIGN| NONE| PARENT_NOT_SET[109/109/110/ 1][0/0/0][ 200000000][0-0] =
# 69> WORD| NONE| PARENT_NOT_SET[111/111/118/ 1][0/0/0][ 80000][0-0] nullptr
# 69> SEMICOLON| STRUCT| PARENT_NOT_SET[118/118/119/ 0][0/0/0][ 200000000][0-0] ;
# 69> NEWLINE| NONE| PARENT_NOT_SET[119/119/ 1/ 0][0/0/0][ 0][2-0]
# 71> COMMENT_CPP| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 1/ 66/ 0][0/0/0][ 0][0-0] // template<...> class/struct[<...>] [macros/attributes ...] type
# 71> NEWLINE| NONE| PARENT_NOT_SET[ 66/ 66/ 1/ 0][0/0/0][ 0][1-0]
# 72> TEMPLATE| NONE| PARENT_NOT_SET[ 1/ 1/ 9/ 0][0/0/0][ c0000][0-0] template
# 72> ANGLE_OPEN| TEMPLATE| PARENT_NOT_SET[ 9/ 9/ 10/ 0][0/0/0][ 200000040][0-0] <
# 72> TYPENAME| NONE| PARENT_NOT_SET[ 10/ 10/ 18/ 0][0/1/0][ 80040][0-0] typename
# 72> COMMA| NONE| PARENT_NOT_SET[ 18/ 18/ 19/ 0][0/1/0][ 200000040][0-0] ,
# 72> TYPENAME| NONE| PARENT_NOT_SET[ 20/ 20/ 28/ 1][0/1/0][ 80040][0-0] typename
# 72> ELLIPSIS| NONE| PARENT_NOT_SET[ 29/ 29/ 32/ 1][0/1/0][ 200000040][0-0] ...
# 72> ANGLE_CLOSE| TEMPLATE| PARENT_NOT_SET[ 32/ 32/ 33/ 0][0/0/0][ 200000040][0-0] >
# 72> NEWLINE| NONE| PARENT_NOT_SET[ 33/ 33/ 1/ 0][0/0/0][ 0][1-0]
# 73> CLASS| TEMPLATE| PARENT_NOT_SET[ 1/ 1/ 6/ 0][0/0/0][1000000a0000][0-0] class
# 73> WORD| NONE| PARENT_NOT_SET[ 7/ 7/ 17/ 1][0/0/0][100000020000][0-0] API_EXPORT
# 73> TYPE| CLASS| PARENT_NOT_SET[ 18/ 18/ 20/ 1][0/0/0][100000000000][0-0] c2
# 73> SEMICOLON| CLASS| PARENT_NOT_SET[ 20/ 20/ 21/ 0][0/0/0][ 200000000][0-0] ;
# 73> NEWLINE| NONE| PARENT_NOT_SET[ 21/ 21/ 1/ 0][0/0/0][ 0][2-0]
# 75> COMMENT_CPP| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 1/ 68/ 0][0/0/0][ 0][0-0] // class/struct [macros/attributes ...] type : bases ... { } x, ...
# 75> NEWLINE| NONE| PARENT_NOT_SET[ 68/ 68/ 1/ 0][0/0/0][ 0][1-0]
# 76> CLASS| NONE| PARENT_NOT_SET[ 1/ 1/ 6/ 0][0/0/0][ e0000][0-0] class
# 76> WORD| NONE| PARENT_NOT_SET[ 7/ 7/ 17/ 1][0/0/0][ 20000][0-0] API_EXPORT
# 76> ATTRIBUTE| NONE| PARENT_NOT_SET[ 18/ 18/ 31/ 1][0/0/0][ 0][0-0] __attribute__
# 76> FPAREN_OPEN| ATTRIBUTE| PARENT_NOT_SET[ 31/ 31/ 32/ 0][0/0/0][ 200000000][0-0] (
# 76> PAREN_OPEN| NONE| PARENT_NOT_SET[ 32/ 32/ 33/ 0][0/1/0][ 200080000][0-0] (
# 76> WORD| NONE| PARENT_NOT_SET[ 33/ 33/ 47/ 0][0/2/0][ 80000][0-0] __deprecated__
# 76> PAREN_CLOSE| NONE| PARENT_NOT_SET[ 47/ 47/ 48/ 0][0/1/0][ 200000000][0-0] )
# 76> FPAREN_CLOSE| ATTRIBUTE| PARENT_NOT_SET[ 48/ 48/ 49/ 0][0/0/0][ 200000000][0-0] )
# 76> MACRO_FUNC_CALL| NONE| PARENT_NOT_SET[ 50/ 50/ 57/ 1][0/0/0][ 0][0-0] ALIGNAS
# 76> FPAREN_OPEN| MACRO_FUNC_CALL| PARENT_NOT_SET[ 57/ 57/ 58/ 0][0/0/0][ 200000000][0-0] (
# 76> NUMBER| NONE| PARENT_NOT_SET[ 58/ 58/ 59/ 0][0/1/0][ 80000][0-0] 4
# 76> FPAREN_CLOSE| MACRO_FUNC_CALL| PARENT_NOT_SET[ 59/ 59/ 60/ 0][0/0/0][ 200000000][0-0] )
# 76> TYPE| CLASS| PARENT_NOT_SET[ 61/ 61/ 63/ 1][0/0/0][ 800000][0-0] c3
# 76> NEWLINE| NONE| PARENT_NOT_SET[ 63/ 63/ 1/ 0][0/0/0][ 0][1-0]
# 77> CLASS_COLON| CLASS| PARENT_NOT_SET[ 9/ 1/ 2/ 0][0/0/0][ 200000800][0-0] :
# 77> QUALIFIER| NONE| PARENT_NOT_SET[ 11/ 3/ 9/ 1][0/0/0][ e0800][0-0] public
# 77> TYPE| NONE| PARENT_NOT_SET[ 18/ 10/ 25/ 1][0/0/0][ 800][0-0] outer_namespace
# 77> DC_MEMBER| NONE| PARENT_NOT_SET[ 33/ 25/ 27/ 0][0/0/0][ 200000800][0-0] ::
# 77> TYPE| NONE| PARENT_NOT_SET[ 35/ 27/ 42/ 0][0/0/0][ 800][0-0] inner_namespace
# 77> DC_MEMBER| NONE| PARENT_NOT_SET[ 50/ 42/ 44/ 0][0/0/0][ 200000800][0-0] ::
# 77> TYPE| NONE| PARENT_NOT_SET[ 52/ 44/ 49/ 0][0/0/0][ 800][0-0] Base2
# 77> ANGLE_OPEN| TEMPLATE| PARENT_NOT_SET[ 57/ 49/ 50/ 0][0/0/0][ 200000840][0-0] <
# 77> TYPE| NONE| PARENT_NOT_SET[ 58/ 50/ 53/ 0][0/1/0][ 80840][0-0] int
# 77> ANGLE_CLOSE| TEMPLATE| PARENT_NOT_SET[ 61/ 53/ 54/ 0][0/0/0][ 200000840][0-0] >
# 77> COMMA| NONE| PARENT_NOT_SET[ 62/ 54/ 55/ 0][0/0/0][ 200080800][0-0] ,
# 77> NEWLINE| NONE| PARENT_NOT_SET[ 63/ 55/ 3/ 0][0/0/0][ 0][1-0]
# 78> QUALIFIER| NONE| PARENT_NOT_SET[ 9/ 3/ 9/ 0][0/0/0][ a0800][0-0] public
# 78> TYPE| NONE| PARENT_NOT_SET[ 16/ 10/ 12/ 1][0/0/0][ 800][0-0] c2
# 78> ANGLE_OPEN| TEMPLATE| PARENT_NOT_SET[ 18/ 12/ 13/ 0][0/0/0][ 200000840][0-0] <
# 78> TYPE| NONE| PARENT_NOT_SET[ 19/ 13/ 16/ 0][0/1/0][ 80840][0-0] int
# 78> ANGLE_CLOSE| TEMPLATE| PARENT_NOT_SET[ 22/ 16/ 17/ 0][0/0/0][ 200000840][0-0] >
# 78> DC_MEMBER| NONE| PARENT_NOT_SET[ 23/ 17/ 19/ 0][0/0/0][ 200080800][0-0] ::
# 78> TYPE| NONE| PARENT_NOT_SET[ 25/ 19/ 30/ 0][0/0/0][ 800][0-0] inner_class
# 78> ANGLE_OPEN| TEMPLATE| PARENT_NOT_SET[ 36/ 30/ 31/ 0][0/0/0][ 200000840][0-0] <
# 78> TYPE| NONE| PARENT_NOT_SET[ 37/ 31/ 34/ 0][0/1/0][ 80840][0-0] int
# 78> ANGLE_CLOSE| TEMPLATE| PARENT_NOT_SET[ 40/ 34/ 35/ 0][0/0/0][ 200000840][0-0] >
# 78> NEWLINE| NONE| PARENT_NOT_SET[ 41/ 35/ 1/ 0][0/0/0][ 0][1-0]
# 79> BRACE_OPEN| CLASS| PARENT_NOT_SET[ 1/ 1/ 2/ 0][0/0/0][ 200080400][0-0] {
# 79> NEWLINE| NONE| PARENT_NOT_SET[ 2/ 2/ 1/ 0][1/1/0][ 400][1-0]
# 80> ACCESS| NONE| PARENT_NOT_SET[ 1/ 1/ 7/ 0][1/1/0][ c0400][0-0] public
# 80> ACCESS_COLON| NONE| PARENT_NOT_SET[ 7/ 7/ 8/ 0][1/1/0][ 200000400][0-0] :
# 80> NEWLINE| NONE| PARENT_NOT_SET[ 8/ 8/ 4/ 0][1/1/0][ 400][1-0]
# 81> FUNC_CLASS_DEF| NONE| PARENT_NOT_SET[ 1/ 4/ 6/ 0][1/1/0][ c0400][0-0] c3
# 81> FPAREN_OPEN| FUNC_CLASS_DEF| PARENT_NOT_SET[ 3/ 6/ 7/ 0][1/1/0][ 200000500][0-0] (
# 81> TYPE| NONE| PARENT_NOT_SET[ 4/ 7/ 10/ 0][1/2/0][ 208a0510][0-0] int
# 81> WORD| NONE| PARENT_NOT_SET[ 8/ 11/ 12/ 1][1/2/0][ 21000510][0-0] x
# 81> ASSIGN_DEFAULT_ARG| FUNC_PROTO| PARENT_NOT_SET[ 10/ 13/ 14/ 1][1/2/0][ 200000510][0-0] =
# 81> NUMBER| NONE| PARENT_NOT_SET[ 12/ 15/ 16/ 1][1/2/0][ 80510][0-0] 0
# 81> COMMA| NONE| PARENT_NOT_SET[ 13/ 16/ 17/ 0][1/2/0][ 200000510][0-0] ,
# 81> TYPE| NONE| PARENT_NOT_SET[ 15/ 18/ 21/ 1][1/2/0][ 208a0510][0-0] int
# 81> WORD| NONE| PARENT_NOT_SET[ 19/ 22/ 23/ 1][1/2/0][ 21000510][0-0] y
# 81> ASSIGN_DEFAULT_ARG| FUNC_PROTO| PARENT_NOT_SET[ 21/ 24/ 25/ 1][1/2/0][ 200000510][0-0] =
# 81> NUMBER| NONE| PARENT_NOT_SET[ 23/ 26/ 27/ 1][1/2/0][ 80510][0-0] 0
# 81> COMMA| NONE| PARENT_NOT_SET[ 24/ 27/ 28/ 0][1/2/0][ 200000510][0-0] ,
# 81> TYPE| NONE| PARENT_NOT_SET[ 26/ 29/ 32/ 1][1/2/0][ 208a0510][0-0] int
# 81> WORD| NONE| PARENT_NOT_SET[ 30/ 33/ 34/ 1][1/2/0][ 21000510][0-0] z
# 81> ASSIGN_DEFAULT_ARG| FUNC_PROTO| PARENT_NOT_SET[ 32/ 35/ 36/ 1][1/2/0][ 200000510][0-0] =
# 81> NUMBER| NONE| PARENT_NOT_SET[ 34/ 37/ 38/ 1][1/2/0][ 80510][0-0] 0
# 81> FPAREN_CLOSE| FUNC_CLASS_DEF| PARENT_NOT_SET[ 35/ 38/ 39/ 0][1/1/0][ 200000510][0-0] )
# 81> CONSTR_COLON| NONE| PARENT_NOT_SET[ 37/ 40/ 41/ 1][1/1/0][ 200000500][0-0] :
# 81> FUNC_CTOR_VAR| NONE| PARENT_NOT_SET[ 39/ 42/ 45/ 1][1/1/0][ c0500][0-0] m_x
# 81> FPAREN_OPEN| FUNC_CTOR_VAR| PARENT_NOT_SET[ 42/ 45/ 46/ 0][1/1/0][ 200000500][0-0] (
# 81> WORD| NONE| PARENT_NOT_SET[ 43/ 46/ 47/ 0][1/2/0][ 80510][0-0] x
# 81> FPAREN_CLOSE| FUNC_CTOR_VAR| PARENT_NOT_SET[ 44/ 47/ 48/ 0][1/1/0][ 200000510][0-0] )
# 81> COMMA| NONE| PARENT_NOT_SET[ 45/ 48/ 49/ 0][1/1/0][ 200000500][0-0] ,
# 81> FUNC_CTOR_VAR| NONE| PARENT_NOT_SET[ 47/ 50/ 53/ 1][1/1/0][ 80500][0-0] m_y
# 81> FPAREN_OPEN| FUNC_CTOR_VAR| PARENT_NOT_SET[ 50/ 53/ 54/ 0][1/1/0][ 200000500][0-0] (
# 81> WORD| NONE| PARENT_NOT_SET[ 51/ 54/ 55/ 0][1/2/0][ 80510][0-0] y
# 81> FPAREN_CLOSE| FUNC_CTOR_VAR| PARENT_NOT_SET[ 52/ 55/ 56/ 0][1/1/0][ 200000510][0-0] )
# 81> COMMA| NONE| PARENT_NOT_SET[ 53/ 56/ 57/ 0][1/1/0][ 200000500][0-0] ,
# 81> FUNC_CTOR_VAR| NONE| PARENT_NOT_SET[ 55/ 58/ 61/ 1][1/1/0][ 80500][0-0] m_z
# 81> FPAREN_OPEN| FUNC_CTOR_VAR| PARENT_NOT_SET[ 58/ 61/ 62/ 0][1/1/0][ 200000500][0-0] (
# 81> WORD| NONE| PARENT_NOT_SET[ 59/ 62/ 63/ 0][1/2/0][ 80510][0-0] z
# 81> FPAREN_CLOSE| FUNC_CTOR_VAR| PARENT_NOT_SET[ 60/ 63/ 64/ 0][1/1/0][ 200000510][0-0] )
# 81> BRACE_OPEN| FUNC_CLASS_DEF| PARENT_NOT_SET[ 62/ 65/ 66/ 1][1/1/0][ 280000400][0-0] {
# 81> NEWLINE| NONE| PARENT_NOT_SET[ 63/ 67/ 0/ 0][1/1/0][ 400][1-0]
# 81> BRACE_CLOSE| FUNC_CLASS_DEF| PARENT_NOT_SET[ 1/ 67/ 68/ 1][1/1/0][ 280000400][0-0] }
# 81> NEWLINE| NONE| PARENT_NOT_SET[ 2/ 68/ 4/ 0][1/1/0][ 400][2-0]
# 83> TYPE| NONE| PARENT_NOT_SET[ 1/ 4/ 7/ 0][1/1/0][ 8e0400][0-0] int
# 83> WORD| NONE| PARENT_NOT_SET[ 5/ 8/ 11/ 1][1/1/0][ 3000400][0-0] m_x
# 83> SEMICOLON| NONE| PARENT_NOT_SET[ 8/ 11/ 12/ 0][1/1/0][ 200000400][0-0] ;
# 83> NEWLINE| NONE| PARENT_NOT_SET[ 9/ 12/ 4/ 0][1/1/0][ 400][1-0]
# 84> TYPE| NONE| PARENT_NOT_SET[ 1/ 4/ 7/ 0][1/1/0][ 8e0400][0-0] int
# 84> WORD| NONE| PARENT_NOT_SET[ 5/ 8/ 11/ 1][1/1/0][ 3000400][0-0] m_y
# 84> SEMICOLON| NONE| PARENT_NOT_SET[ 8/ 11/ 12/ 0][1/1/0][ 200000400][0-0] ;
# 84> NEWLINE| NONE| PARENT_NOT_SET[ 9/ 12/ 4/ 0][1/1/0][ 400][1-0]
# 85> TYPE| NONE| PARENT_NOT_SET[ 1/ 4/ 7/ 0][1/1/0][ 8e0400][0-0] int
# 85> WORD| NONE| PARENT_NOT_SET[ 5/ 8/ 11/ 1][1/1/0][ 3000400][0-0] m_z
# 85> SEMICOLON| NONE| PARENT_NOT_SET[ 8/ 11/ 12/ 0][1/1/0][ 200000400][0-0] ;
# 85> NEWLINE| NONE| PARENT_NOT_SET[ 9/ 12/ 1/ 0][1/1/0][ 400][1-0]
# 86> BRACE_CLOSE| CLASS| PARENT_NOT_SET[ 1/ 1/ 2/ 0][0/0/0][ 200000400][0-0] }
# 86> WORD| NONE| PARENT_NOT_SET[ 3/ 3/ 6/ 1][0/0/0][ 70c0000][0-0] c31
# 86> COMMA| NONE| PARENT_NOT_SET[ 6/ 6/ 7/ 0][0/0/0][ 200000000][0-0] ,
# 86> PTR_TYPE| CLASS| PARENT_NOT_SET[ 8/ 8/ 9/ 1][0/0/0][ 200080000][0-0] *
# 86> WORD| NONE| PARENT_NOT_SET[ 9/ 9/ 12/ 0][0/0/0][ 25080000][0-0] c32
# 86> ASSIGN| NONE| PARENT_NOT_SET[ 13/ 13/ 14/ 1][0/0/0][ 200000000][0-0] =
# 86> WORD| NONE| PARENT_NOT_SET[ 15/ 15/ 22/ 1][0/0/0][ 80000][0-0] nullptr
# 86> COMMA| NONE| PARENT_NOT_SET[ 22/ 22/ 23/ 0][0/0/0][ 200000000][0-0] ,
# 86> PTR_TYPE| CLASS| PARENT_NOT_SET[ 24/ 24/ 25/ 1][0/0/0][ 200080000][0-0] *
# 86> WORD| NONE| PARENT_NOT_SET[ 25/ 25/ 28/ 0][0/0/0][ 5080000][0-0] c33
# 86> TSQUARE| NONE| PARENT_NOT_SET[ 28/ 28/ 30/ 0][0/0/0][ 200000000][0-0] []
# 86> ASSIGN| NONE| PARENT_NOT_SET[ 31/ 31/ 32/ 1][0/0/0][ 200000000][0-0] =
# 86> BRACE_OPEN| BRACED_INIT_LIST| PARENT_NOT_SET[ 33/ 33/ 34/ 1][0/0/0][ 240080000][0-0] {
# 86> WORD| NONE| PARENT_NOT_SET[ 35/ 35/ 42/ 1][1/1/0][ 40080000][0-0] nullptr
# 86> COMMA| NONE| PARENT_NOT_SET[ 42/ 42/ 43/ 0][1/1/0][ 240000000][0-0] ,
# 86> WORD| NONE| PARENT_NOT_SET[ 44/ 44/ 51/ 1][1/1/0][ 40080000][0-0] nullptr
# 86> BRACE_CLOSE| BRACED_INIT_LIST| PARENT_NOT_SET[ 52/ 52/ 53/ 1][0/0/0][ 240000000][0-0] }
# 86> COMMA| NONE| PARENT_NOT_SET[ 53/ 53/ 54/ 0][0/0/0][ 200000000][0-0] ,
# 86> WORD| NONE| PARENT_NOT_SET[ 55/ 55/ 58/ 1][0/0/0][ 25080000][0-0] c34
# 86> BRACE_OPEN| BRACED_INIT_LIST| PARENT_NOT_SET[ 58/ 58/ 59/ 0][0/0/0][ 240000000][0-0] {
# 86> NUMBER| NONE| PARENT_NOT_SET[ 60/ 60/ 61/ 1][1/1/0][ 400c0000][0-0] 0
# 86> COMMA| NONE| PARENT_NOT_SET[ 61/ 61/ 62/ 0][1/1/0][ 240000000][0-0] ,
# 86> NUMBER| NONE| PARENT_NOT_SET[ 63/ 63/ 64/ 1][1/1/0][ 40080000][0-0] 1
# 86> COMMA| NONE| PARENT_NOT_SET[ 64/ 64/ 65/ 0][1/1/0][ 240000000][0-0] ,
# 86> NUMBER| NONE| PARENT_NOT_SET[ 66/ 66/ 67/ 1][1/1/0][ 40080000][0-0] 2
# 86> BRACE_CLOSE| BRACED_INIT_LIST| PARENT_NOT_SET[ 67/ 67/ 68/ 0][0/0/0][ 240000000][0-0] }
# 86> COMMA| NONE| PARENT_NOT_SET[ 68/ 68/ 69/ 0][0/0/0][ 200000000][0-0] ,
# 86> PTR_TYPE| CLASS| PARENT_NOT_SET[ 70/ 70/ 71/ 1][0/0/0][ 200080000][0-0] *
# 86> QUALIFIER| NONE| PARENT_NOT_SET[ 72/ 72/ 77/ 1][0/0/0][ a0000][0-0] const
# 86> FUNC_CALL| NONE| PARENT_NOT_SET[ 78/ 78/ 81/ 1][0/0/0][ 5000000][0-0] c35
# 86> FPAREN_OPEN| FUNC_CALL| PARENT_NOT_SET[ 81/ 81/ 82/ 0][0/0/0][ 200000000][0-0] (
# 86> WORD| NONE| PARENT_NOT_SET[ 82/ 82/ 89/ 0][0/1/0][ 80010][0-0] nullptr
# 86> FPAREN_CLOSE| FUNC_CALL| PARENT_NOT_SET[ 89/ 89/ 90/ 0][0/0/0][ 200000010][0-0] )
# 86> COMMA| NONE| PARENT_NOT_SET[ 90/ 90/ 91/ 0][0/0/0][ 200000000][0-0] ,
# 86> FUNC_CALL| NONE| PARENT_NOT_SET[ 92/ 92/ 95/ 1][0/0/0][ 5080000][0-0] c16
# 86> FPAREN_OPEN| FUNC_CALL| PARENT_NOT_SET[ 95/ 95/ 96/ 0][0/0/0][ 200000000][0-0] (
# 86> NUMBER| NONE| PARENT_NOT_SET[ 96/ 96/ 97/ 0][0/1/0][ 80010][0-0] 0
# 86> COMMA| NONE| PARENT_NOT_SET[ 97/ 97/ 98/ 0][0/1/0][ 200000010][0-0] ,
# 86> NUMBER| NONE| PARENT_NOT_SET[ 99/ 99/100/ 1][0/1/0][ 80010][0-0] 1
# 86> COMMA| NONE| PARENT_NOT_SET[100/100/101/ 0][0/1/0][ 200000010][0-0] ,
# 86> NUMBER| NONE| PARENT_NOT_SET[102/102/103/ 1][0/1/0][ 80010][0-0] 2
# 86> FPAREN_CLOSE| FUNC_CALL| PARENT_NOT_SET[103/103/104/ 0][0/0/0][ 200000010][0-0] )
# 86> SEMICOLON| CLASS| PARENT_NOT_SET[104/104/105/ 0][0/0/0][ 200000000][0-0] ;
# 86> NEWLINE| NONE| PARENT_NOT_SET[105/105/ 1/ 0][0/0/0][ 0][2-0]
# 88> COMMENT_CPP| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 1/ 52/ 0][0/0/0][ 0][0-0] // class/struct [macros/attributes ...] type x, ...
# 88> NEWLINE| NONE| PARENT_NOT_SET[ 52/ 52/ 1/ 0][0/0/0][ 0][1-0]
# 89> CLASS| NONE| PARENT_NOT_SET[ 1/ 1/ 6/ 0][0/0/0][ e0000][0-0] class
# 89> ATTRIBUTE| NONE| PARENT_NOT_SET[ 7/ 7/ 20/ 1][0/0/0][ 0][0-0] __attribute__
# 89> FPAREN_OPEN| ATTRIBUTE| PARENT_NOT_SET[ 20/ 20/ 21/ 0][0/0/0][ 200000000][0-0] (
# 89> PAREN_OPEN| NONE| PARENT_NOT_SET[ 21/ 21/ 22/ 0][0/1/0][ 200080000][0-0] (
# 89> WORD| NONE| PARENT_NOT_SET[ 22/ 22/ 36/ 0][0/2/0][ 80000][0-0] __deprecated__
# 89> PAREN_CLOSE| NONE| PARENT_NOT_SET[ 36/ 36/ 37/ 0][0/1/0][ 200000000][0-0] )
# 89> FPAREN_CLOSE| ATTRIBUTE| PARENT_NOT_SET[ 37/ 37/ 38/ 0][0/0/0][ 200000000][0-0] )
# 89> WORD| NONE| PARENT_NOT_SET[ 39/ 39/ 49/ 1][0/0/0][ e0000][0-0] API_EXPORT
# 89> MACRO_FUNC_CALL| NONE| PARENT_NOT_SET[ 50/ 50/ 57/ 1][0/0/0][ 0][0-0] ALIGNAS
# 89> FPAREN_OPEN| MACRO_FUNC_CALL| PARENT_NOT_SET[ 57/ 57/ 58/ 0][0/0/0][ 200000000][0-0] (
# 89> NUMBER| NONE| PARENT_NOT_SET[ 58/ 58/ 59/ 0][0/1/0][ 80000][0-0] 4
# 89> FPAREN_CLOSE| MACRO_FUNC_CALL| PARENT_NOT_SET[ 59/ 59/ 60/ 0][0/0/0][ 200000000][0-0] )
# 89> TYPE| CLASS| PARENT_NOT_SET[ 61/ 61/ 63/ 1][0/0/0][ 820000][0-0] c3
# 89> WORD| NONE| PARENT_NOT_SET[ 64/ 64/ 67/ 1][0/0/0][ 3000000][0-0] c41
# 89> COMMA| NONE| PARENT_NOT_SET[ 67/ 67/ 68/ 0][0/0/0][ 200000000][0-0] ,
# 89> PTR_TYPE| CLASS| PARENT_NOT_SET[ 69/ 69/ 70/ 1][0/0/0][ 200080000][0-0] *
# 89> WORD| NONE| PARENT_NOT_SET[ 70/ 70/ 73/ 0][0/0/0][ 21080000][0-0] c42
# 89> ASSIGN| NONE| PARENT_NOT_SET[ 74/ 74/ 75/ 1][0/0/0][ 200000000][0-0] =
# 89> WORD| NONE| PARENT_NOT_SET[ 76/ 76/ 79/ 1][0/0/0][ 80000][0-0] c32
# 89> QUESTION| NONE| PARENT_NOT_SET[ 80/ 80/ 81/ 1][0/0/0][ 200000000][0-0] ?
# 89> WORD| NONE| PARENT_NOT_SET[ 82/ 82/ 85/ 1][0/0/0][ 80000][0-0] c32
# 89> COND_COLON| NONE| PARENT_NOT_SET[ 86/ 86/ 87/ 1][0/0/0][ 200000000][0-0] :
# 89> WORD| NONE| PARENT_NOT_SET[ 88/ 88/ 95/ 1][0/0/0][ c0000][0-0] nullptr
# 89> COMMA| NONE| PARENT_NOT_SET[ 95/ 95/ 96/ 0][0/0/0][ 200000000][0-0] ,
# 89> PTR_TYPE| CLASS| PARENT_NOT_SET[ 97/ 97/ 98/ 1][0/0/0][ 200080000][0-0] *
# 89> WORD| NONE| PARENT_NOT_SET[ 98/ 98/101/ 0][0/0/0][ 1080000][0-0] c43
# 89> TSQUARE| NONE| PARENT_NOT_SET[101/101/103/ 0][0/0/0][ 200000000][0-0] []
# 89> ASSIGN| NONE| PARENT_NOT_SET[104/104/105/ 1][0/0/0][ 200000000][0-0] =
# 89> BRACE_OPEN| BRACED_INIT_LIST| PARENT_NOT_SET[106/106/107/ 1][0/0/0][ 240080000][0-0] {
# 89> WORD| NONE| PARENT_NOT_SET[108/108/115/ 1][1/1/0][ 40080000][0-0] nullptr
# 89> COMMA| NONE| PARENT_NOT_SET[115/115/116/ 0][1/1/0][ 240000000][0-0] ,
# 89> WORD| NONE| PARENT_NOT_SET[117/117/124/ 1][1/1/0][ 40080000][0-0] nullptr
# 89> BRACE_CLOSE| BRACED_INIT_LIST| PARENT_NOT_SET[125/125/126/ 1][0/0/0][ 240000000][0-0] }
# 89> COMMA| NONE| PARENT_NOT_SET[126/126/127/ 0][0/0/0][ 200000000][0-0] ,
# 89> WORD| NONE| PARENT_NOT_SET[128/128/131/ 1][0/0/0][ 21080000][0-0] c44
# 89> BRACE_OPEN| BRACED_INIT_LIST| PARENT_NOT_SET[131/131/132/ 0][0/0/0][ 240000000][0-0] {
# 89> NUMBER| NONE| PARENT_NOT_SET[133/133/134/ 1][1/1/0][ 400c0000][0-0] 0
# 89> COMMA| NONE| PARENT_NOT_SET[134/134/135/ 0][1/1/0][ 240000000][0-0] ,
# 89> NUMBER| NONE| PARENT_NOT_SET[136/136/137/ 1][1/1/0][ 40080000][0-0] 1
# 89> COMMA| NONE| PARENT_NOT_SET[137/137/138/ 0][1/1/0][ 240000000][0-0] ,
# 89> NUMBER| NONE| PARENT_NOT_SET[139/139/140/ 1][1/1/0][ 40080000][0-0] 2
# 89> BRACE_CLOSE| BRACED_INIT_LIST| PARENT_NOT_SET[140/140/141/ 0][0/0/0][ 240000000][0-0] }
# 89> COMMA| NONE| PARENT_NOT_SET[141/141/142/ 0][0/0/0][ 200000000][0-0] ,
# 89> PTR_TYPE| CLASS| PARENT_NOT_SET[143/143/144/ 1][0/0/0][ 200080000][0-0] *
# 89> QUALIFIER| NONE| PARENT_NOT_SET[145/145/150/ 1][0/0/0][ a0000][0-0] const
# 89> FUNC_CALL| NONE| PARENT_NOT_SET[151/151/154/ 1][0/0/0][ 1000000][0-0] c45
# 89> FPAREN_OPEN| FUNC_CALL| PARENT_NOT_SET[154/154/155/ 0][0/0/0][ 200000000][0-0] (
# 89> WORD| NONE| PARENT_NOT_SET[155/155/162/ 0][0/1/0][ 80010][0-0] nullptr
# 89> FPAREN_CLOSE| FUNC_CALL| PARENT_NOT_SET[162/162/163/ 0][0/0/0][ 200000010][0-0] )
# 89> COMMA| NONE| PARENT_NOT_SET[163/163/164/ 0][0/0/0][ 200000000][0-0] ,
# 89> FUNC_CALL| NONE| PARENT_NOT_SET[165/165/168/ 1][0/0/0][ 1080000][0-0] c46
# 89> FPAREN_OPEN| FUNC_CALL| PARENT_NOT_SET[168/168/169/ 0][0/0/0][ 200000000][0-0] (
# 89> NUMBER| NONE| PARENT_NOT_SET[169/169/170/ 0][0/1/0][ 80010][0-0] 0
# 89> COMMA| NONE| PARENT_NOT_SET[170/170/171/ 0][0/1/0][ 200000010][0-0] ,
# 89> NUMBER| NONE| PARENT_NOT_SET[172/172/173/ 1][0/1/0][ 80010][0-0] 1
# 89> COMMA| NONE| PARENT_NOT_SET[173/173/174/ 0][0/1/0][ 200000010][0-0] ,
# 89> NUMBER| NONE| PARENT_NOT_SET[175/175/176/ 1][0/1/0][ 80010][0-0] 2
# 89> FPAREN_CLOSE| FUNC_CALL| PARENT_NOT_SET[176/176/177/ 0][0/0/0][ 200000010][0-0] )
# 89> SEMICOLON| CLASS| PARENT_NOT_SET[177/177/178/ 0][0/0/0][ 200000000][0-0] ;
# 89> NEWLINE| NONE| PARENT_NOT_SET[178/178/ 1/ 0][0/0/0][ 0][2-0]
# 91> COMMENT_CPP| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 1/ 68/ 0][0/0/0][ 0][0-0] // class/struct [macros/attributes ...] type : bases ... { } x, ...
# 91> NEWLINE| NONE| PARENT_NOT_SET[ 68/ 68/ 1/ 0][0/0/0][ 0][1-0]
# 92> CLASS| NONE| PARENT_NOT_SET[ 1/ 1/ 6/ 0][0/0/0][ e0000][0-0] class
# 92> FUNC_CALL| NONE| PARENT_NOT_SET[ 7/ 7/ 14/ 1][0/0/0][ 0][0-0] ALIGNAS
# 92> FPAREN_OPEN| FUNC_CALL| PARENT_NOT_SET[ 14/ 14/ 15/ 0][0/0/0][ 200000000][0-0] (
# 92> NUMBER| NONE| PARENT_NOT_SET[ 15/ 15/ 16/ 0][0/1/0][ 80010][0-0] 4
# 92> FPAREN_CLOSE| FUNC_CALL| PARENT_NOT_SET[ 16/ 16/ 17/ 0][0/0/0][ 200000010][0-0] )
# 92> WORD| NONE| PARENT_NOT_SET[ 18/ 18/ 28/ 1][0/0/0][ 20000][0-0] API_EXPORT
# 92> ATTRIBUTE| NONE| PARENT_NOT_SET[ 29/ 29/ 42/ 1][0/0/0][ 0][0-0] __attribute__
# 92> FPAREN_OPEN| ATTRIBUTE| PARENT_NOT_SET[ 42/ 42/ 43/ 0][0/0/0][ 200000000][0-0] (
# 92> PAREN_OPEN| NONE| PARENT_NOT_SET[ 43/ 43/ 44/ 0][0/1/0][ 200080000][0-0] (
# 92> WORD| NONE| PARENT_NOT_SET[ 44/ 44/ 58/ 0][0/2/0][ 80000][0-0] __deprecated__
# 92> PAREN_CLOSE| NONE| PARENT_NOT_SET[ 58/ 58/ 59/ 0][0/1/0][ 200000000][0-0] )
# 92> FPAREN_CLOSE| ATTRIBUTE| PARENT_NOT_SET[ 59/ 59/ 60/ 0][0/0/0][ 200000000][0-0] )
# 92> NEWLINE| NONE| PARENT_NOT_SET[ 60/ 60/ 1/ 0][0/0/0][ 0][1-0]
# 93> CLASS_COLON| CLASS| PARENT_NOT_SET[ 9/ 1/ 2/ 0][0/0/0][ 200000800][0-0] :
# 93> QUALIFIER| NONE| PARENT_NOT_SET[ 11/ 3/ 9/ 1][0/0/0][ e0800][0-0] public
# 93> TYPE| NONE| PARENT_NOT_SET[ 18/ 10/ 25/ 1][0/0/0][ 800][0-0] outer_namespace
# 93> DC_MEMBER| NONE| PARENT_NOT_SET[ 33/ 25/ 27/ 0][0/0/0][ 200000800][0-0] ::
# 93> TYPE| NONE| PARENT_NOT_SET[ 35/ 27/ 42/ 0][0/0/0][ 800][0-0] inner_namespace
# 93> DC_MEMBER| NONE| PARENT_NOT_SET[ 50/ 42/ 44/ 0][0/0/0][ 200000800][0-0] ::
# 93> TYPE| NONE| PARENT_NOT_SET[ 52/ 44/ 49/ 0][0/0/0][ 800][0-0] Base1
# 93> NEWLINE| NONE| PARENT_NOT_SET[ 57/ 49/ 1/ 0][0/0/0][ 0][1-0]
# 94> BRACE_OPEN| CLASS| PARENT_NOT_SET[ 1/ 1/ 2/ 0][0/0/0][ 200000000][0-0] {
# 94> NEWLINE| NONE| PARENT_NOT_SET[ 2/ 2/ 1/ 0][1/1/0][ 400][1-0]
# 95> ACCESS| NONE| PARENT_NOT_SET[ 1/ 1/ 7/ 0][1/1/0][ c0400][0-0] public
# 95> ACCESS_COLON| NONE| PARENT_NOT_SET[ 7/ 7/ 8/ 0][1/1/0][ 200000400][0-0] :
# 95> NEWLINE| NONE| PARENT_NOT_SET[ 8/ 8/ 4/ 0][1/1/0][ 400][1-0]
# 96> TYPE| NONE| PARENT_NOT_SET[ 1/ 4/ 7/ 0][1/1/0][ 8e0400][0-0] int
# 96> WORD| NONE| PARENT_NOT_SET[ 5/ 8/ 11/ 1][1/1/0][ 3000400][0-0] m_x
# 96> SEMICOLON| NONE| PARENT_NOT_SET[ 8/ 11/ 12/ 0][1/1/0][ 200000400][0-0] ;
# 96> NEWLINE| NONE| PARENT_NOT_SET[ 9/ 12/ 4/ 0][1/1/0][ 400][1-0]
# 97> TYPE| NONE| PARENT_NOT_SET[ 1/ 4/ 7/ 0][1/1/0][ 8e0400][0-0] int
# 97> WORD| NONE| PARENT_NOT_SET[ 5/ 8/ 11/ 1][1/1/0][ 3000400][0-0] m_y
# 97> SEMICOLON| NONE| PARENT_NOT_SET[ 8/ 11/ 12/ 0][1/1/0][ 200000400][0-0] ;
# 97> NEWLINE| NONE| PARENT_NOT_SET[ 9/ 12/ 4/ 0][1/1/0][ 400][1-0]
# 98> TYPE| NONE| PARENT_NOT_SET[ 1/ 4/ 7/ 0][1/1/0][ 8e0400][0-0] int
# 98> WORD| NONE| PARENT_NOT_SET[ 5/ 8/ 11/ 1][1/1/0][ 3000400][0-0] m_z
# 98> SEMICOLON| NONE| PARENT_NOT_SET[ 8/ 11/ 12/ 0][1/1/0][ 200000400][0-0] ;
# 98> NEWLINE| NONE| PARENT_NOT_SET[ 9/ 12/ 1/ 0][1/1/0][ 400][1-0]
# 99> BRACE_CLOSE| CLASS| PARENT_NOT_SET[ 1/ 1/ 2/ 0][0/0/0][ 200000400][0-0] }
# 99> WORD| NONE| PARENT_NOT_SET[ 3/ 3/ 6/ 1][0/0/0][ 70c0000][0-0] c51
# 99> COMMA| NONE| PARENT_NOT_SET[ 6/ 6/ 7/ 0][0/0/0][ 200000000][0-0] ,
# 99> PTR_TYPE| CLASS| PARENT_NOT_SET[ 8/ 8/ 9/ 1][0/0/0][ 200080000][0-0] *
# 99> WORD| NONE| PARENT_NOT_SET[ 9/ 9/ 12/ 0][0/0/0][ 25080000][0-0] c52
# 99> ASSIGN| NONE| PARENT_NOT_SET[ 13/ 13/ 14/ 1][0/0/0][ 200000000][0-0] =
# 99> WORD| NONE| PARENT_NOT_SET[ 15/ 15/ 22/ 1][0/0/0][ 80000][0-0] nullptr
# 99> COMMA| NONE| PARENT_NOT_SET[ 22/ 22/ 23/ 0][0/0/0][ 200000000][0-0] ,
# 99> PTR_TYPE| CLASS| PARENT_NOT_SET[ 24/ 24/ 25/ 1][0/0/0][ 200080000][0-0] *
# 99> WORD| NONE| PARENT_NOT_SET[ 25/ 25/ 28/ 0][0/0/0][ 5080000][0-0] c53
# 99> TSQUARE| NONE| PARENT_NOT_SET[ 28/ 28/ 30/ 0][0/0/0][ 200000000][0-0] []
# 99> ASSIGN| NONE| PARENT_NOT_SET[ 31/ 31/ 32/ 1][0/0/0][ 200000000][0-0] =
# 99> BRACE_OPEN| BRACED_INIT_LIST| PARENT_NOT_SET[ 33/ 33/ 34/ 1][0/0/0][ 240080000][0-0] {
# 99> WORD| NONE| PARENT_NOT_SET[ 35/ 35/ 42/ 1][1/1/0][ 40080000][0-0] nullptr
# 99> COMMA| NONE| PARENT_NOT_SET[ 42/ 42/ 43/ 0][1/1/0][ 240000000][0-0] ,
# 99> WORD| NONE| PARENT_NOT_SET[ 44/ 44/ 51/ 1][1/1/0][ 40080000][0-0] nullptr
# 99> BRACE_CLOSE| BRACED_INIT_LIST| PARENT_NOT_SET[ 52/ 52/ 53/ 1][0/0/0][ 240000000][0-0] }
# 99> SEMICOLON| CLASS| PARENT_NOT_SET[ 53/ 53/ 54/ 0][0/0/0][ 200000000][0-0] ;
# 99> NEWLINE| NONE| PARENT_NOT_SET[ 54/ 54/ 1/ 0][0/0/0][ 0][3-0]
# 102> COMMENT_CPP| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 1/ 44/ 0][0/0/0][ 0][0-0] // enum type : integral_type { ... } x, ...
# 102> NEWLINE| NONE| PARENT_NOT_SET[ 44/ 44/ 1/ 0][0/0/0][ 0][1-0]
# 103> ENUM| NONE| PARENT_NOT_SET[ 1/ 1/ 5/ 0][0/0/0][ e0000][0-0] enum
# 103> TYPE| ENUM| PARENT_NOT_SET[ 6/ 6/ 8/ 1][0/0/0][ 800000][0-0] e1
# 103> BIT_COLON| ENUM| PARENT_NOT_SET[ 9/ 9/ 10/ 1][0/0/0][ 200000000][0-0] :
# 103> TYPE| BIT_COLON| PARENT_NOT_SET[ 11/ 11/ 15/ 1][0/0/0][ e0000][0-0] long
# 103> TYPE| BIT_COLON| PARENT_NOT_SET[ 16/ 16/ 20/ 1][0/0/0][ 0][0-0] long
# 103> BRACE_OPEN| ENUM| PARENT_NOT_SET[ 21/ 21/ 22/ 1][0/0/0][ 240000000][0-0] {
# 103> WORD| NONE| PARENT_NOT_SET[ 23/ 23/ 25/ 1][1/1/0][ 400c0004][0-0] a1
# 103> COMMA| NONE| PARENT_NOT_SET[ 25/ 25/ 26/ 0][1/1/0][ 240000004][0-0] ,
# 103> WORD| NONE| PARENT_NOT_SET[ 27/ 27/ 29/ 1][1/1/0][ 40080004][0-0] b1
# 103> COMMA| NONE| PARENT_NOT_SET[ 29/ 29/ 30/ 0][1/1/0][ 240000004][0-0] ,
# 103> WORD| NONE| PARENT_NOT_SET[ 31/ 31/ 33/ 1][1/1/0][ 40080004][0-0] d1
# 103> BRACE_CLOSE| ENUM| PARENT_NOT_SET[ 34/ 34/ 35/ 1][0/0/0][ 240000004][0-0] }
# 103> WORD| NONE| PARENT_NOT_SET[ 36/ 36/ 39/ 1][0/0/0][ 70c0000][0-0] e11
# 103> COMMA| NONE| PARENT_NOT_SET[ 39/ 39/ 40/ 0][0/0/0][ 200000000][0-0] ,
# 103> WORD| NONE| PARENT_NOT_SET[ 41/ 41/ 44/ 1][0/0/0][ 5080000][0-0] e12
# 103> COMMA| NONE| PARENT_NOT_SET[ 44/ 44/ 45/ 0][0/0/0][ 200000000][0-0] ,
# 103> WORD| NONE| PARENT_NOT_SET[ 46/ 46/ 49/ 1][0/0/0][ 5080000][0-0] e13
# 103> SEMICOLON| ENUM| PARENT_NOT_SET[ 49/ 49/ 50/ 0][0/0/0][ 200000000][0-0] ;
# 103> NEWLINE| NONE| PARENT_NOT_SET[ 50/ 50/ 1/ 0][0/0/0][ 0][2-0]
# 105> COMMENT_CPP| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 1/ 37/ 0][0/0/0][ 0][0-0] // enum type : integral_type { ... }
# 105> NEWLINE| NONE| PARENT_NOT_SET[ 37/ 37/ 1/ 0][0/0/0][ 0][1-0]
# 106> ENUM| NONE| PARENT_NOT_SET[ 1/ 1/ 5/ 0][0/0/0][ e0000][0-0] enum
# 106> TYPE| ENUM| PARENT_NOT_SET[ 6/ 6/ 8/ 1][0/0/0][ 0][0-0] e2
# 106> BIT_COLON| ENUM| PARENT_NOT_SET[ 9/ 9/ 10/ 1][0/0/0][ 200000000][0-0] :
# 106> TYPE| BIT_COLON| PARENT_NOT_SET[ 11/ 11/ 19/ 1][0/0/0][ e0000][0-0] unsigned
# 106> TYPE| BIT_COLON| PARENT_NOT_SET[ 20/ 20/ 23/ 1][0/0/0][ 0][0-0] int
# 106> BRACE_OPEN| ENUM| PARENT_NOT_SET[ 24/ 24/ 25/ 1][0/0/0][ 240000000][0-0] {
# 106> WORD| NONE| PARENT_NOT_SET[ 26/ 26/ 28/ 1][1/1/0][ 400c0004][0-0] a2
# 106> COMMA| NONE| PARENT_NOT_SET[ 28/ 28/ 29/ 0][1/1/0][ 240000004][0-0] ,
# 106> WORD| NONE| PARENT_NOT_SET[ 30/ 30/ 32/ 1][1/1/0][ 40080004][0-0] b2
# 106> COMMA| NONE| PARENT_NOT_SET[ 32/ 32/ 33/ 0][1/1/0][ 240000004][0-0] ,
# 106> WORD| NONE| PARENT_NOT_SET[ 34/ 34/ 36/ 1][1/1/0][ 40080004][0-0] d2
# 106> BRACE_CLOSE| ENUM| PARENT_NOT_SET[ 37/ 37/ 38/ 1][0/0/0][ 240000004][0-0] }
# 106> SEMICOLON| ENUM| PARENT_NOT_SET[ 38/ 38/ 39/ 0][0/0/0][ 200000000][0-0] ;
# 106> NEWLINE| NONE| PARENT_NOT_SET[ 39/ 39/ 1/ 0][0/0/0][ 0][2-0]
# 108> COMMENT_CPP| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 1/ 29/ 0][0/0/0][ 0][0-0] // enum type : integral_type
# 108> NEWLINE| NONE| PARENT_NOT_SET[ 29/ 29/ 1/ 0][0/0/0][ 0][1-0]
# 109> ENUM| NONE| PARENT_NOT_SET[ 1/ 1/ 5/ 0][0/0/0][1000000e0000][0-0] enum
# 109> TYPE| ENUM| PARENT_NOT_SET[ 6/ 6/ 8/ 1][0/0/0][100000000000][0-0] e3
# 109> BIT_COLON| ENUM| PARENT_NOT_SET[ 9/ 9/ 10/ 1][0/0/0][ 200000000][0-0] :
# 109> TYPE| BIT_COLON| PARENT_NOT_SET[ 11/ 11/ 16/ 1][0/0/0][ c0000][0-0] short
# 109> SEMICOLON| ENUM| PARENT_NOT_SET[ 16/ 16/ 17/ 0][0/0/0][ 200000000][0-0] ;
# 109> NEWLINE| NONE| PARENT_NOT_SET[ 17/ 17/ 1/ 0][0/0/0][ 0][2-0]
# 111> COMMENT_CPP| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 1/ 20/ 0][0/0/0][ 0][0-0] // enum type x, ...
# 111> NEWLINE| NONE| PARENT_NOT_SET[ 20/ 20/ 1/ 0][0/0/0][ 0][1-0]
# 112> ENUM| NONE| PARENT_NOT_SET[ 1/ 1/ 5/ 0][0/0/0][ e0000][0-0] enum
# 112> TYPE| ENUM| PARENT_NOT_SET[ 6/ 6/ 8/ 1][0/0/0][ 820000][0-0] e3
# 112> WORD| NONE| PARENT_NOT_SET[ 9/ 9/ 12/ 1][0/0/0][ 3000000][0-0] e31
# 112> COMMA| NONE| PARENT_NOT_SET[ 12/ 12/ 13/ 0][0/0/0][ 200000000][0-0] ,
# 112> WORD| NONE| PARENT_NOT_SET[ 14/ 14/ 17/ 1][0/0/0][ 1080000][0-0] e32
# 112> SEMICOLON| ENUM| PARENT_NOT_SET[ 17/ 17/ 18/ 0][0/0/0][ 200000000][0-0] ;
# 112> NEWLINE| NONE| PARENT_NOT_SET[ 18/ 18/ 1/ 0][0/0/0][ 0][2-0]
# 114> COMMENT_CPP| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 1/ 50/ 0][0/0/0][ 0][0-0] // enum class type : integral_type { ... } x, ...
# 114> NEWLINE| NONE| PARENT_NOT_SET[ 50/ 50/ 1/ 0][0/0/0][ 0][1-0]
# 115> ENUM| NONE| PARENT_NOT_SET[ 1/ 1/ 5/ 0][0/0/0][ e0000][0-0] enum
# 115> ENUM_CLASS| NONE| PARENT_NOT_SET[ 6/ 6/ 11/ 1][0/0/0][ 20000][0-0] class
# 115> TYPE| ENUM| PARENT_NOT_SET[ 12/ 12/ 14/ 1][0/0/0][ 800000][0-0] e4
# 115> BIT_COLON| ENUM| PARENT_NOT_SET[ 15/ 15/ 16/ 1][0/0/0][ 200000000][0-0] :
# 115> TYPE| BIT_COLON| PARENT_NOT_SET[ 17/ 17/ 21/ 1][0/0/0][ e0000][0-0] long
# 115> TYPE| BIT_COLON| PARENT_NOT_SET[ 22/ 22/ 26/ 1][0/0/0][ 0][0-0] long
# 115> BRACE_OPEN| ENUM| PARENT_NOT_SET[ 27/ 27/ 28/ 1][0/0/0][ 240000000][0-0] {
# 115> WORD| NONE| PARENT_NOT_SET[ 29/ 29/ 31/ 1][1/1/0][ 400c0004][0-0] a4
# 115> COMMA| NONE| PARENT_NOT_SET[ 31/ 31/ 32/ 0][1/1/0][ 240000004][0-0] ,
# 115> WORD| NONE| PARENT_NOT_SET[ 33/ 33/ 35/ 1][1/1/0][ 40080004][0-0] b4
# 115> COMMA| NONE| PARENT_NOT_SET[ 35/ 35/ 36/ 0][1/1/0][ 240000004][0-0] ,
# 115> WORD| NONE| PARENT_NOT_SET[ 37/ 37/ 39/ 1][1/1/0][ 40080004][0-0] d4
# 115> BRACE_CLOSE| ENUM| PARENT_NOT_SET[ 40/ 40/ 41/ 1][0/0/0][ 240000004][0-0] }
# 115> WORD| NONE| PARENT_NOT_SET[ 42/ 42/ 45/ 1][0/0/0][ 70c0000][0-0] e41
# 115> COMMA| NONE| PARENT_NOT_SET[ 45/ 45/ 46/ 0][0/0/0][ 200000000][0-0] ,
# 115> WORD| NONE| PARENT_NOT_SET[ 47/ 47/ 50/ 1][0/0/0][ 5080000][0-0] e42
# 115> COMMA| NONE| PARENT_NOT_SET[ 50/ 50/ 51/ 0][0/0/0][ 200000000][0-0] ,
# 115> WORD| NONE| PARENT_NOT_SET[ 52/ 52/ 55/ 1][0/0/0][ 5080000][0-0] e43
# 115> COMMA| NONE| PARENT_NOT_SET[ 55/ 55/ 56/ 0][0/0/0][ 200000000][0-0] ,
# 115> WORD| NONE| PARENT_NOT_SET[ 57/ 57/ 60/ 1][0/0/0][ 5080000][0-0] e44
# 115> SEMICOLON| ENUM| PARENT_NOT_SET[ 60/ 60/ 61/ 0][0/0/0][ 200000000][0-0] ;
# 115> NEWLINE| NONE| PARENT_NOT_SET[ 61/ 61/ 1/ 0][0/0/0][ 0][2-0]
# 117> COMMENT_CPP| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 1/ 43/ 0][0/0/0][ 0][0-0] // enum class type : integral_type { ... }
# 117> NEWLINE| NONE| PARENT_NOT_SET[ 43/ 43/ 1/ 0][0/0/0][ 0][1-0]
# 118> ENUM| NONE| PARENT_NOT_SET[ 1/ 1/ 5/ 0][0/0/0][ e0000][0-0] enum
# 118> ENUM_CLASS| NONE| PARENT_NOT_SET[ 6/ 6/ 11/ 1][0/0/0][ 20000][0-0] class
# 118> TYPE| ENUM| PARENT_NOT_SET[ 12/ 12/ 14/ 1][0/0/0][ 0][0-0] e5
# 118> BIT_COLON| ENUM| PARENT_NOT_SET[ 15/ 15/ 16/ 1][0/0/0][ 200000000][0-0] :
# 118> TYPE| BIT_COLON| PARENT_NOT_SET[ 17/ 17/ 25/ 1][0/0/0][ e0000][0-0] unsigned
# 118> TYPE| BIT_COLON| PARENT_NOT_SET[ 26/ 26/ 29/ 1][0/0/0][ 0][0-0] int
# 118> BRACE_OPEN| ENUM| PARENT_NOT_SET[ 30/ 30/ 31/ 1][0/0/0][ 240000000][0-0] {
# 118> WORD| NONE| PARENT_NOT_SET[ 32/ 32/ 34/ 1][1/1/0][ 400c0004][0-0] a5
# 118> COMMA| NONE| PARENT_NOT_SET[ 34/ 34/ 35/ 0][1/1/0][ 240000004][0-0] ,
# 118> WORD| NONE| PARENT_NOT_SET[ 36/ 36/ 38/ 1][1/1/0][ 40080004][0-0] b5
# 118> COMMA| NONE| PARENT_NOT_SET[ 38/ 38/ 39/ 0][1/1/0][ 240000004][0-0] ,
# 118> WORD| NONE| PARENT_NOT_SET[ 40/ 40/ 42/ 1][1/1/0][ 40080004][0-0] d5
# 118> BRACE_CLOSE| ENUM| PARENT_NOT_SET[ 43/ 43/ 44/ 1][0/0/0][ 240000004][0-0] }
# 118> SEMICOLON| ENUM| PARENT_NOT_SET[ 44/ 44/ 45/ 0][0/0/0][ 200000000][0-0] ;
# 118> NEWLINE| NONE| PARENT_NOT_SET[ 45/ 45/ 1/ 0][0/0/0][ 0][2-0]
# 120> COMMENT_CPP| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 1/ 35/ 0][0/0/0][ 0][0-0] // enum class type : integral_type
# 120> NEWLINE| NONE| PARENT_NOT_SET[ 35/ 35/ 1/ 0][0/0/0][ 0][1-0]
# 121> ENUM| NONE| PARENT_NOT_SET[ 1/ 1/ 5/ 0][0/0/0][1000000e0000][0-0] enum
# 121> ENUM_CLASS| NONE| PARENT_NOT_SET[ 6/ 6/ 11/ 1][0/0/0][100000020000][0-0] class
# 121> TYPE| ENUM| PARENT_NOT_SET[ 12/ 12/ 14/ 1][0/0/0][100000000000][0-0] e6
# 121> BIT_COLON| ENUM| PARENT_NOT_SET[ 15/ 15/ 16/ 1][0/0/0][ 200000000][0-0] :
# 121> TYPE| BIT_COLON| PARENT_NOT_SET[ 17/ 17/ 22/ 1][0/0/0][ c0000][0-0] short
# 121> SEMICOLON| ENUM| PARENT_NOT_SET[ 22/ 22/ 23/ 0][0/0/0][ 200000000][0-0] ;
# 121> NEWLINE| NONE| PARENT_NOT_SET[ 23/ 23/ 1/ 0][0/0/0][ 0][2-0]
# 123> COMMENT_CPP| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 1/ 19/ 0][0/0/0][ 0][0-0] // enum class type
# 123> NEWLINE| NONE| PARENT_NOT_SET[ 19/ 19/ 1/ 0][0/0/0][ 0][1-0]
# 124> ENUM| NONE| PARENT_NOT_SET[ 1/ 1/ 5/ 0][0/0/0][1000000e0000][0-0] enum
# 124> ENUM_CLASS| NONE| PARENT_NOT_SET[ 6/ 6/ 11/ 1][0/0/0][100000020000][0-0] class
# 124> TYPE| ENUM| PARENT_NOT_SET[ 12/ 12/ 14/ 1][0/0/0][100000000000][0-0] e7
# 124> SEMICOLON| ENUM| PARENT_NOT_SET[ 14/ 14/ 15/ 0][0/0/0][ 200000000][0-0] ;
# 124> NEWLINE| NONE| PARENT_NOT_SET[ 15/ 15/ 1/ 0][0/0/0][ 0][2-0]
# 126> COMMENT_CPP| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 1/ 39/ 0][0/0/0][ 0][0-0] // enum : integral_type { ... } x, ...
# 126> NEWLINE| NONE| PARENT_NOT_SET[ 39/ 39/ 1/ 0][0/0/0][ 0][1-0]
# 127> ENUM| NONE| PARENT_NOT_SET[ 1/ 1/ 5/ 0][0/0/0][ c0000][0-0] enum
# 127> BIT_COLON| ENUM| PARENT_NOT_SET[ 6/ 6/ 7/ 1][0/0/0][ 200000000][0-0] :
# 127> TYPE| BIT_COLON| PARENT_NOT_SET[ 8/ 8/ 12/ 1][0/0/0][ e0000][0-0] long
# 127> TYPE| BIT_COLON| PARENT_NOT_SET[ 13/ 13/ 17/ 1][0/0/0][ 0][0-0] long
# 127> BRACE_OPEN| ENUM| PARENT_NOT_SET[ 18/ 18/ 19/ 1][0/0/0][ 240000000][0-0] {
# 127> WORD| NONE| PARENT_NOT_SET[ 20/ 20/ 22/ 1][1/1/0][ 400c0004][0-0] a8
# 127> COMMA| NONE| PARENT_NOT_SET[ 22/ 22/ 23/ 0][1/1/0][ 240000004][0-0] ,
# 127> WORD| NONE| PARENT_NOT_SET[ 24/ 24/ 26/ 1][1/1/0][ 40080004][0-0] b8
# 127> COMMA| NONE| PARENT_NOT_SET[ 26/ 26/ 27/ 0][1/1/0][ 240000004][0-0] ,
# 127> WORD| NONE| PARENT_NOT_SET[ 28/ 28/ 30/ 1][1/1/0][ 40080004][0-0] c8
# 127> BRACE_CLOSE| ENUM| PARENT_NOT_SET[ 31/ 31/ 32/ 1][0/0/0][ 240000004][0-0] }
# 127> WORD| NONE| PARENT_NOT_SET[ 33/ 33/ 36/ 1][0/0/0][ 70c0000][0-0] e81
# 127> COMMA| NONE| PARENT_NOT_SET[ 36/ 36/ 37/ 0][0/0/0][ 200000000][0-0] ,
# 127> WORD| NONE| PARENT_NOT_SET[ 38/ 38/ 41/ 1][0/0/0][ 5080000][0-0] e82
# 127> SEMICOLON| ENUM| PARENT_NOT_SET[ 41/ 41/ 42/ 0][0/0/0][ 200000000][0-0] ;
# 127> NEWLINE| NONE| PARENT_NOT_SET[ 42/ 42/ 1/ 0][0/0/0][ 0][2-0]
# 129> COMMENT_CPP| COMMENT_WHOLE| PARENT_NOT_SET[ 1/ 1/ 23/ 0][0/0/0][ 0][0-0] // enum { ... } x, ...
# 129> NEWLINE| NONE| PARENT_NOT_SET[ 23/ 23/ 1/ 0][0/0/0][ 0][1-0]
# 130> ENUM| NONE| PARENT_NOT_SET[ 1/ 1/ 5/ 0][0/0/0][ c0000][0-0] enum
# 130> BRACE_OPEN| ENUM| PARENT_NOT_SET[ 6/ 6/ 7/ 1][0/0/0][ 240000000][0-0] {
# 130> WORD| NONE| PARENT_NOT_SET[ 8/ 8/ 10/ 1][1/1/0][ 400c0004][0-0] a9
# 130> COMMA| NONE| PARENT_NOT_SET[ 10/ 10/ 11/ 0][1/1/0][ 240000004][0-0] ,
# 130> WORD| NONE| PARENT_NOT_SET[ 12/ 12/ 14/ 1][1/1/0][ 40080004][0-0] b9
# 130> COMMA| NONE| PARENT_NOT_SET[ 14/ 14/ 15/ 0][1/1/0][ 240000004][0-0] ,
# 130> WORD| NONE| PARENT_NOT_SET[ 16/ 16/ 18/ 1][1/1/0][ 40080004][0-0] c9
# 130> BRACE_CLOSE| ENUM| PARENT_NOT_SET[ 19/ 19/ 20/ 1][0/0/0][ 240000004][0-0] }
# 130> WORD| NONE| PARENT_NOT_SET[ 21/ 21/ 24/ 1][0/0/0][ 70c0000][0-0] e91
# 130> COMMA| NONE| PARENT_NOT_SET[ 24/ 24/ 25/ 0][0/0/0][ 200000000][0-0] ,
# 130> WORD| NONE| PARENT_NOT_SET[ 26/ 26/ 29/ 1][0/0/0][ 5080000][0-0] e92
# 130> SEMICOLON| ENUM| PARENT_NOT_SET[ 29/ 29/ 30/ 0][0/0/0][ 200000000][0-0] ;
# 130> NEWLINE| NONE| PARENT_NOT_SET[ 30/ 30/ 1/ 0][0/0/0][ 0][2-0]
# 132> UNION| NONE| PARENT_NOT_SET[ 1/ 1/ 6/ 0][0/0/0][ e0000][0-0] union
# 132> WORD| NONE| PARENT_NOT_SET[ 7/ 7/ 17/ 1][0/0/0][ 20000][0-0] API_EXPORT
# 132> TYPE| UNION| PARENT_NOT_SET[ 18/ 18/ 20/ 1][0/0/0][ 800000][0-0] u1
# 132> BRACE_OPEN| UNION| PARENT_NOT_SET[ 21/ 21/ 22/ 1][0/0/0][ 240000000][0-0] {
# 132> TYPE| NONE| PARENT_NOT_SET[ 23/ 23/ 26/ 1][1/1/0][ 408e0000][0-0] int
# 132> WORD| NONE| PARENT_NOT_SET[ 27/ 27/ 28/ 1][1/1/0][ 43000000][0-0] x
# 132> SEMICOLON| NONE| PARENT_NOT_SET[ 28/ 28/ 29/ 0][1/1/0][ 240000000][0-0] ;
# 132> TYPE| NONE| PARENT_NOT_SET[ 30/ 30/ 34/ 1][1/1/0][ 408e0000][0-0] long
# 132> WORD| NONE| PARENT_NOT_SET[ 35/ 35/ 36/ 1][1/1/0][ 43000000][0-0] y
# 132> SEMICOLON| NONE| PARENT_NOT_SET[ 36/ 36/ 37/ 0][1/1/0][ 240000000][0-0] ;
# 132> BRACE_CLOSE| UNION| PARENT_NOT_SET[ 38/ 38/ 39/ 1][0/0/0][ 240000000][0-0] }
# 132> WORD| NONE| PARENT_NOT_SET[ 40/ 40/ 43/ 1][0/0/0][ 70c0000][0-0] u11
# 132> COMMA| NONE| PARENT_NOT_SET[ 43/ 43/ 44/ 0][0/0/0][ 200000000][0-0] ,
# 132> PTR_TYPE| UNION| PARENT_NOT_SET[ 45/ 45/ 46/ 1][0/0/0][ 200080000][0-0] *
# 132> WORD| NONE| PARENT_NOT_SET[ 46/ 46/ 49/ 0][0/0/0][ 25080000][0-0] u12
# 132> ASSIGN| NONE| PARENT_NOT_SET[ 50/ 50/ 51/ 1][0/0/0][ 200000000][0-0] =
# 132> WORD| NONE| PARENT_NOT_SET[ 52/ 52/ 59/ 1][0/0/0][ 80000][0-0] nullptr
# 132> COMMA| NONE| PARENT_NOT_SET[ 59/ 59/ 60/ 0][0/0/0][ 200000000][0-0] ,
# 132> PTR_TYPE| UNION| PARENT_NOT_SET[ 61/ 61/ 62/ 1][0/0/0][ 200080000][0-0] *
# 132> WORD| NONE| PARENT_NOT_SET[ 62/ 62/ 65/ 0][0/0/0][ 25080000][0-0] u13
# 132> BRACE_OPEN| BRACED_INIT_LIST| PARENT_NOT_SET[ 65/ 65/ 66/ 0][0/0/0][ 240000000][0-0] {
# 132> NUMBER| NONE| PARENT_NOT_SET[ 66/ 66/ 67/ 0][1/1/0][ 400c0000][0-0] 0
# 132> BRACE_CLOSE| BRACED_INIT_LIST| PARENT_NOT_SET[ 67/ 67/ 68/ 0][0/0/0][ 240000000][0-0] }
# 132> SEMICOLON| UNION| PARENT_NOT_SET[ 68/ 68/ 69/ 0][0/0/0][ 200000000][0-0] ;
# 132> NEWLINE| NONE| PARENT_NOT_SET[ 69/ 69/ 1/ 0][0/0/0][ 0][2-0]
# 134> UNION| NONE| PARENT_NOT_SET[ 1/ 1/ 6/ 0][0/0/0][ e0000][0-0] union
# 134> WORD| NONE| PARENT_NOT_SET[ 7/ 7/ 17/ 1][0/0/0][ 20000][0-0] API_EXPORT
# 134> TYPE| UNION| PARENT_NOT_SET[ 18/ 18/ 20/ 1][0/0/0][ 820000][0-0] u1
# 134> WORD| NONE| PARENT_NOT_SET[ 21/ 21/ 24/ 1][0/0/0][ 3000000][0-0] u21
# 134> SEMICOLON| UNION| PARENT_NOT_SET[ 24/ 24/ 25/ 0][0/0/0][ 200000000][0-0] ;
# 134> NEWLINE| NONE| PARENT_NOT_SET[ 25/ 25/ 1/ 0][0/0/0][ 0][1-0]
# -=====-

@ -51,13 +51,13 @@ Config/Help Options:
--set <option>=<value> : Sets a new value to a config option.
Debug Options:
-p FILE : Dump debug info into FILE, or to stdout if FILE is set to '-'.
Must be used in combination with '-f FILE'.
--debug-csv-format : Dump debug info to file in csv-delimited format.
Must be used in combination with '-p FILE', where FILE is not set to '-'
-L SEV : Set the log severity (see log_levels.h; note 'A' = 'all')
-s : Show the log severity in the logs.
--decode : Decode remaining args (chunk flags) and exit.
-p FILE : Dump debug info into FILE, or to stdout if FILE is set to '-'.
Must be used in combination with '-f FILE'
-L SEV : Set the log severity (see log_levels.h; note 'A' = 'all')
-s : Show the log severity in the logs.
--decode : Decode remaining args (chunk flags) and exit.
--tracking_space FILE : Prepare tracking informations for debugging.
Cannot be used with the -o option'
Usage Examples
cat foo.d | uncrustify -q -c my.cfg -l d

@ -10,18 +10,17 @@ disable_processing_nl_cont = false
disable_processing_cmt = " *INDENT-OFF*"
enable_processing_cmt = " *INDENT-ON*"
enable_digraphs = false
processing_cmt_as_regex = false
utf8_bom = ignore
utf8_byte = false
utf8_force = false
sp_do_brace_open = ignore
sp_brace_close_while = ignore
sp_while_paren_open = ignore
sp_arith = ignore
sp_arith_additive = ignore
sp_assign = ignore
sp_cpp_lambda_assign = ignore
sp_cpp_lambda_square_paren = ignore
sp_cpp_lambda_square_brace = ignore
sp_cpp_lambda_argument_list = ignore
sp_cpp_lambda_paren_brace = ignore
sp_cpp_lambda_fparen = ignore
sp_assign_default = ignore
@ -77,6 +76,9 @@ sp_inside_sparen_open = ignore
sp_inside_sparen_close = ignore
sp_after_sparen = ignore
sp_sparen_brace = ignore
sp_do_brace_open = ignore
sp_brace_close_while = ignore
sp_while_paren_open = ignore
sp_invariant_paren = ignore
sp_after_invariant_paren = ignore
sp_special_semi = ignore
@ -223,6 +225,7 @@ sp_after_for_colon = ignore
sp_before_for_colon = ignore
sp_extern_paren = ignore
sp_cmt_cpp_start = ignore
sp_cmt_cpp_region = ignore
sp_cmt_cpp_doxygen = false
sp_cmt_cpp_qttr = false
sp_endif_cmt = ignore
@ -263,6 +266,7 @@ indent_namespace_level = 0
indent_namespace_limit = 0
indent_extern = false
indent_class = false
indent_before_class_colon = 0
indent_class_colon = false
indent_class_on_colon = false
indent_constr_colon = false
@ -290,10 +294,10 @@ indent_sing_line_comments = 0
indent_sparen_extra = 0
indent_relative_single_line_comments = false
indent_switch_case = 0
indent_case_brace = 0
indent_switch_break_with_case = false
indent_switch_pp = true
indent_case_shift = 0
indent_case_brace = 0
indent_col1_comment = false
indent_col1_multi_string_literal = false
indent_label = 1
@ -304,6 +308,7 @@ indent_paren_close = 0
indent_paren_after_func_def = false
indent_paren_after_func_decl = false
indent_paren_after_func_call = false
indent_comma_brace = false
indent_comma_paren = false
indent_bool_paren = false
indent_semicolon_for_paren = false
@ -347,6 +352,7 @@ nl_func_leave_one_liners = false
nl_cpp_lambda_leave_one_liners = false
nl_if_leave_one_liners = false
nl_while_leave_one_liners = false
nl_do_leave_one_liners = false
nl_for_leave_one_liners = false
nl_oc_msg_leave_one_liner = false
nl_oc_mdef_brace = ignore
@ -650,8 +656,12 @@ align_oc_decl_colon = false
align_oc_msg_colon_xcode_like = false
cmt_width = 0
cmt_reflow_mode = 0
cmt_reflow_fold_regex_file = ""
cmt_reflow_indent_to_paragraph_start = false
cmt_convert_tab_to_spaces = false
cmt_indent_multi = true
cmt_align_doxygen_javadoc_tags = false
cmt_sp_before_doxygen_javadoc_tags = 1
cmt_c_group = false
cmt_c_nl_start = false
cmt_c_nl_end = false
@ -741,5 +751,6 @@ warn_level_tabs_found_in_verbatim_string_literals = 2
debug_max_number_of_loops = 0
debug_line_number_to_protocol = 0
debug_timeout = 0
debug_truncate = 0
# option(s) with 'not default' value: 0
#

@ -10,18 +10,17 @@ disable_processing_nl_cont = false
disable_processing_cmt = " *INDENT-OFF*"
enable_processing_cmt = " *INDENT-ON*"
enable_digraphs = false
processing_cmt_as_regex = false
utf8_bom = ignore
utf8_byte = false
utf8_force = false
sp_do_brace_open = ignore
sp_brace_close_while = ignore
sp_while_paren_open = ignore
sp_arith = ignore
sp_arith_additive = ignore
sp_assign = ignore
sp_cpp_lambda_assign = ignore
sp_cpp_lambda_square_paren = ignore
sp_cpp_lambda_square_brace = ignore
sp_cpp_lambda_argument_list = ignore
sp_cpp_lambda_paren_brace = ignore
sp_cpp_lambda_fparen = ignore
sp_assign_default = ignore
@ -77,6 +76,9 @@ sp_inside_sparen_open = ignore
sp_inside_sparen_close = ignore
sp_after_sparen = ignore
sp_sparen_brace = ignore
sp_do_brace_open = ignore
sp_brace_close_while = ignore
sp_while_paren_open = ignore
sp_invariant_paren = ignore
sp_after_invariant_paren = ignore
sp_special_semi = ignore
@ -223,6 +225,7 @@ sp_after_for_colon = ignore
sp_before_for_colon = ignore
sp_extern_paren = ignore
sp_cmt_cpp_start = ignore
sp_cmt_cpp_region = ignore
sp_cmt_cpp_doxygen = false
sp_cmt_cpp_qttr = false
sp_endif_cmt = ignore
@ -263,6 +266,7 @@ indent_namespace_level = 0
indent_namespace_limit = 0
indent_extern = false
indent_class = false
indent_before_class_colon = 0
indent_class_colon = false
indent_class_on_colon = false
indent_constr_colon = false
@ -290,10 +294,10 @@ indent_sing_line_comments = 0
indent_sparen_extra = 0
indent_relative_single_line_comments = false
indent_switch_case = 0
indent_case_brace = 0
indent_switch_break_with_case = false
indent_switch_pp = true
indent_case_shift = 0
indent_case_brace = 0
indent_col1_comment = false
indent_col1_multi_string_literal = false
indent_label = 1
@ -304,6 +308,7 @@ indent_paren_close = 0
indent_paren_after_func_def = false
indent_paren_after_func_decl = false
indent_paren_after_func_call = false
indent_comma_brace = false
indent_comma_paren = false
indent_bool_paren = false
indent_semicolon_for_paren = false
@ -347,6 +352,7 @@ nl_func_leave_one_liners = false
nl_cpp_lambda_leave_one_liners = false
nl_if_leave_one_liners = false
nl_while_leave_one_liners = false
nl_do_leave_one_liners = false
nl_for_leave_one_liners = false
nl_oc_msg_leave_one_liner = false
nl_oc_mdef_brace = ignore
@ -650,8 +656,12 @@ align_oc_decl_colon = false
align_oc_msg_colon_xcode_like = false
cmt_width = 0
cmt_reflow_mode = 0
cmt_reflow_fold_regex_file = ""
cmt_reflow_indent_to_paragraph_start = false
cmt_convert_tab_to_spaces = false
cmt_indent_multi = true
cmt_align_doxygen_javadoc_tags = false
cmt_sp_before_doxygen_javadoc_tags = 1
cmt_c_group = false
cmt_c_nl_start = false
cmt_c_nl_end = false
@ -741,5 +751,6 @@ warn_level_tabs_found_in_verbatim_string_literals = 2
debug_max_number_of_loops = 0
debug_line_number_to_protocol = 0
debug_timeout = 0
debug_truncate = 0
# option(s) with 'not default' value: 1
#

@ -11,7 +11,7 @@ newlines = crlf
# 1> PREPROC| PP_DEFINE| PARENT_NOT_SET[ 1/ 1/ 2/ 0][1/1/0][ 2001c0001][0-0] #
# 1> PP_DEFINE| NONE| PARENT_NOT_SET[ 2/ 2/ 8/ 0][1/1/0][ 20001][0-0] define
# 1> MACRO| NONE| PARENT_NOT_SET[ 9/ 9/ 10/ 1][1/1/0][ 20001][0-0] x
# 1> WORD| NONE| PARENT_NOT_SET[ 11/ 11/ 18/ 1][1/1/0][ 80001][0-0] s23_foo
# 1> WORD| NONE| PARENT_NOT_SET[ 11/ 11/ 18/ 1][1/1/0][ c0001][0-0] s23_foo
# 1> ASSIGN| NONE| PARENT_NOT_SET[ 19/ 19/ 21/ 1][1/1/0][ 200000001][0-0] +=
# 1> NL_CONT| NONE| PARENT_NOT_SET[ 22/ 22/ 1/ 1][1/1/0][ 80001][1-0] \
# 2> WORD| NONE| PARENT_NOT_SET[ 9/ 1/ 7/ 0][1/1/0][ 80001][0-0] s8_foo
@ -19,8 +19,8 @@ newlines = crlf
# 2> WORD| NONE| PARENT_NOT_SET[ 18/ 10/ 17/ 1][1/1/0][ 80001][0-0] s16_bar
# 2> SEMICOLON| NONE| PARENT_NOT_SET[ 25/ 17/ 18/ 0][1/1/0][ 200000001][0-0] ;
# 2> NEWLINE| NONE| PARENT_NOT_SET[ 26/ 18/ 1/ 0][0/0/0][ 0][2-0]
# 4> STRUCT| NONE| PARENT_NOT_SET[ 1/ 1/ 7/ 0][0/0/0][ 200e0000][0-0] struct
# 4> TYPE| STRUCT| PARENT_NOT_SET[ 8/ 8/ 21/ 1][0/0/0][ 20000000][0-0] TelegramIndex
# 4> STRUCT| NONE| PARENT_NOT_SET[ 1/ 1/ 7/ 0][0/0/0][ e0000][0-0] struct
# 4> TYPE| STRUCT| PARENT_NOT_SET[ 8/ 8/ 21/ 1][0/0/0][ 0][0-0] TelegramIndex
# 4> NEWLINE| NONE| PARENT_NOT_SET[ 21/ 21/ 1/ 0][0/0/0][ 0][1-0]
# 5> BRACE_OPEN| STRUCT| PARENT_NOT_SET[ 1/ 1/ 2/ 0][0/0/0][ 200000400][0-0] {
# 5> NEWLINE| NONE| PARENT_NOT_SET[ 2/ 2/ 1/ 0][1/1/0][ 2][1-0]

@ -0,0 +1,23 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Uncrustify: where do the Spaces options work</title>
</head>
<body lang="en-US">
<p>
</p>
<pre>
{
a = b + 111 - 55;
}
template<typename ... A, int... B>
struct foo1 : foo1<A..., (sizeof...(A) + B)...>
{
foo1() {
int x = sizeof...(A);
bool b = x > 1;
}
};
</pre>
</body>
</html>

@ -0,0 +1,16 @@
output_text : text() is '// 1 6789A123456789B123456789c12345678 ... <The string is truncated>', type is COMMENT_CPP, orig_line is 1, column is 1, nl is 0
output_cmt_start : no cmt_insert_file
output_comment_cpp : set cont_text to '// '
output_text : text() is '', type is NEWLINE, orig_line is 1, column is 74, nl is 1
output_text : text() is '// 2 678 ... <The string is truncated>', type is COMMENT_CPP, orig_line is 2, column is 1, nl is 0
output_cmt_start : no cmt_insert_file
output_comment_cpp : set cont_text to '// '
output_text : text() is '', type is NEWLINE, orig_line is 2, column is 40, nl is 1
output_text : text() is '// 3 6789A123456789B123456789c12345678', type is COMMENT_CPP, orig_line is 3, column is 1, nl is 0
output_cmt_start : no cmt_insert_file
output_comment_cpp : set cont_text to '// '
output_text : text() is '', type is NEWLINE, orig_line is 3, column is 39, nl is 1
output_text : text() is '// 4 6789A123456789B123456789c1234567', type is COMMENT_CPP, orig_line is 4, column is 1, nl is 0
output_cmt_start : no cmt_insert_file
output_comment_cpp : set cont_text to '// '
output_text : text() is '', type is NEWLINE, orig_line is 4, column is 38, nl is 1

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
"""
test_cli_options.py
@ -6,16 +6,16 @@ test_cli_options.py
Tests output generated by Uncrustifys commandline options
(excluding actual source code formatting)
:author: Daniel Chumak
:author: DanielChumak
:license: GPL v2+
"""
from __future__ import print_function
from sys import stderr, argv, exit as sys_exit, version_info as py_version_info
from sys import stderr, argv, exit as sys_exit
from os import mkdir, remove, name as os_name
from os.path import dirname, relpath, isdir, isfile, join as path_join, split as path_split
from shutil import rmtree, copyfile
from subprocess import Popen, PIPE, STDOUT
from subprocess import Popen, PIPE
from io import open
import re
import difflib
@ -32,13 +32,13 @@ else:
NULL_DEVICE = '/dev/null'
RE_CALLSTACK = r'\[CallStack:( \w+:\w+(, \w+:\w+)*|-DEBUG NOT SET-)?\]'
RE_DO_SPACE = (r'\n\ndo_space : WARNING: unrecognize do_space:'
RE_DO_SPACE = (r'\n\ndo_space : WARNING: unrecognized do_space:'
r'\n[^\n]+\n[^\n]+\n')
def eprint(*args, **kwargs):
"""
print() wraper that sets file=stderr
print() wrapper that sets file=stderr
"""
print(*args, file=stderr, **kwargs)
@ -185,8 +185,8 @@ def check_generated_output(gen_expected_path, gen_result_path,
f.write(gen_res_txt)
if program_args.apply and program_args.auto_output_path:
write_to_output_path(program_args.auto_output_path, gen_res_txt)
return True
write_to_output_path(program_args.auto_output_path, gen_res_txt)
return True
elif program_args.diff:
print("\n************************************")
print("Problem (1) with %s" % gen_result_path)
@ -200,7 +200,7 @@ def check_generated_output(gen_expected_path, gen_result_path,
return False
else:
print("\nProblem (1) with %s" % gen_result_path)
print("\nProblem (2) with %s" % gen_result_path)
print("use(gen): '--diff' to find out why %s %s are different"
% (gen_result_path, gen_expected_path))
return False
@ -260,7 +260,8 @@ def check_std_output(expected_path, result_path, result_str, result_manip=None,
if program_args.diff:
print("\n************************************")
print("Problem (2) with %s" % result_path)
print("Problem (3) with result_path is %s" % result_path)
print(" expected_path is %s" % expected_path)
print("************************************")
file_diff = difflib.ndiff(result_str.splitlines(False),
@ -273,7 +274,7 @@ def check_std_output(expected_path, result_path, result_str, result_manip=None,
for line in file_diff:
pprint.PrettyPrinter(indent=4, width=280).pprint(line)
else:
print("\nProblem (2) with %s" % result_path)
print("\nProblem (4) with %s" % result_path)
print("use: '--diff' to find out why %s %s are different"
% (result_path, expected_path))
return False
@ -290,7 +291,7 @@ def check_uncrustify_output(
"""
compares outputs generated by Uncrustify with files
Paramerters
Parameters
----------------------------------------------------------------------------
:param uncr_bin: string
path to the Uncrustify binary
@ -475,6 +476,9 @@ def main(args):
parser.add_argument('--build',
default=s_path_join(script_dir, '../../build'),
help='specify location of the build directory')
parser.add_argument('--config',
default='Release',
help='the build_type value (Release or Debug)')
parsed_args = parser.parse_args()
@ -560,6 +564,23 @@ def main(args):
):
return_flag = False
#
# Test the truncate option
#
if not check_uncrustify_output(
uncr_bin,
parsed_args,
args_arr=['-c', s_path_join(script_dir, 'config/truncate.cfg'),
'-f', s_path_join(script_dir, 'input/truncate.cpp'),
'-o', NULL_DEVICE,
'-L', '83'],
err_expected_path=s_path_join(script_dir, 'output/truncate.txt'),
err_result_path=s_path_join(script_dir, 'results/truncate.txt'),
err_result_manip=[reg_replace(r'\([0-9]+\)', ' '),
reg_replace(RE_DO_SPACE, '')]
):
return_flag = False
#
# Test --update-config
#
@ -637,11 +658,19 @@ def main(args):
gen_result_manip=reg_replace(r'\# Uncrustify.+[^\n\r]', '')
):
return_flag = False
#
# Test -p and -c with '-' input
#
if os_name != 'nt' and not check_uncrustify_output(
if not check_uncrustify_output(
uncr_bin,
parsed_args,
args_arr=['-f', s_path_join(script_dir, 'input/class_enum_struct_union.cpp'),
'-p', s_path_join(script_dir, 'results/class_enum_struct_union.txt')],
gen_expected_path=s_path_join(script_dir, 'output/class_enum_struct_union.txt'),
gen_result_path=s_path_join(script_dir, 'results/class_enum_struct_union.txt'),
gen_result_manip=reg_replace(r'\# Uncrustify.+[^\n\r]', '')
):
return_flag = False
if os_name == 'nt' or check_uncrustify_output(
uncr_bin,
parsed_args,
args_arr=['-c', '-',
@ -650,7 +679,12 @@ def main(args):
out_expected_path=s_path_join(script_dir, 'output/pc-.txt'),
out_result_manip=reg_replace(r'\# Uncrustify.+[^\n\r]', ''),
out_result_path=s_path_join(script_dir, 'results/pc-.txt')
):
):
pass
#
# Test -p and -c with '-' input
#
else:
return_flag = False
#
@ -668,6 +702,34 @@ def main(args):
):
return_flag = False
#
# Test --tracking_space FILE
#
if parsed_args.config == 'Release':
eprint("Release")
if not check_uncrustify_output(
uncr_bin,
parsed_args,
args_arr=['-c', s_path_join(script_dir, 'config/tracking_space.cfg'),
'-f', s_path_join(script_dir, 'input/tracking_space.cpp'),
'--tracking_space', s_path_join(script_dir, 'results/tracking_space.html')],
gen_expected_path=s_path_join(script_dir, 'output/tracking_space.html'),
gen_result_path=s_path_join(script_dir, 'results/tracking_space.html'),
):
return_flag = False
else:
eprint("Debug")
if not check_uncrustify_output(
uncr_bin,
parsed_args,
args_arr=['-c', s_path_join(script_dir, 'config/tracking_space.cfg'),
'-f', s_path_join(script_dir, 'input/tracking_space.cpp'),
'--tracking_space', s_path_join(script_dir, 'results/tracking_space.html')],
gen_expected_path=s_path_join(script_dir, 'output/Debug_tracking_space.html'),
gen_result_path=s_path_join(script_dir, 'results/tracking_space.html'),
):
return_flag = False
#
# Test --replace
#
@ -710,8 +772,6 @@ def main(args):
# -L
# look at src/log_levels.h
Ls_A = ['9', '21', '25', '28', '31', '36', '66', '92']
#Ls_A = ['9', '21', '25', '28', '31', '36', '92']
#Ls_A = ['66']
for L in Ls_A:
if not check_uncrustify_output(
uncr_bin,
@ -721,11 +781,13 @@ def main(args):
err_expected_path=s_path_join(script_dir, 'output/%s.txt' % L),
err_result_path=s_path_join(script_dir, 'results/%s.txt' % L),
err_result_manip=[reg_replace(r'\([0-9]+\)', ' '),
reg_replace(r'\:[0-9]+\)', ' '),
reg_replace(r'\[line [0-9]+', '[ '),
reg_replace(r' \[[_|,|1|A-Z]*\]', ' []'),
reg_replace(r', \[[_|,|1|A-Z]*\]', ', []'),
reg_replace(r', \[0[xX][0-9a-fA-F]+:[_|,|1|A-Z]*\]', ', []'),
reg_replace(r' \[0[xX][0-9a-fA-F]+:[_|,|1|A-Z]*\]', ' []'),
reg_replace(r'^[ \t]*[_A-Za-z][_A-Za-z0-9]*::', ''),
reg_replace(RE_CALLSTACK, '[CallStack]'),
reg_replace(RE_DO_SPACE, '')]
):

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save