You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LineDirective (C.line_directive), ErrorDirective (C.error_directive), WarningDirective (C.warning_directive), and PragmaDirective (C.pragma_directive)
Automatic preprocessor directive indentation options in StyleOptions (indent_pp_directives: PPDirectiveIndent and pp_indent_width) with top-level include-guard detection
Support passing a Function object directly to FunctionCall / C.fn_call with argument count validation
Support passing a function body (Sequence) directly as the second argument (content) of Declaration / C.declaration
Convenience factory method C.declaration_statement(element, content=None) as shorthand for C.statement(C.declaration(element, content))
Multi-variable declarations and comma-chained statements:
MultiDeclaration (C.multi_declaration(*items) and C.multi_declaration_statement(*items))
C.multi_statement(*expressions) for comma-separated expressions in standalone statements and for-loop headers
Support Element initializers (such as FunctionCall) in variable Declaration
__str__ helper on Variable, StructMember, Function, TypeDef, NamedLabel, and EnumMember returning the identifier name
Package version attribute cfile.__version__
Style options:
BraceWrapping.after_control_statement
StyleOptions.indent_case_labels
StyleOptions.indent_case_blocks
StyleOptions.indent_goto_labels
Changed
Retire core.Block and C.block() in favor of core.Sequence and C.sequence() (brace wrapping is determined automatically from context)
Replace adjust on Comment, LineComment (C.line_comment), and BlockComment (C.block_comment) with padding: int = 1, margin: int = 1, and absolute: bool = False, plus multi-line alignment support
Rename func_call to fn_call and func_return to fn_return (keeping old names as aliases)
Refactor preprocessor directive factory methods and indentation: