• 大小: 2.88MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-08-10
  • 语言: 其他
  • 标签: KEIL  

资源简介

AStyle是一款代码格式化工具,可安装在KEIL软件中,可实现一件格式化代码。

资源截图

代码片段和文件信息

// ASBeautifier.cpp
// Copyright (c) 2018 by Jim Pattee .
// This code is licensed under the MIT License.
// License.md describes the conditions under which this software may be distributed.

//-----------------------------------------------------------------------------
// headers
//-----------------------------------------------------------------------------

#include “astyle.h“

#include 

//-----------------------------------------------------------------------------
// astyle namespace
//-----------------------------------------------------------------------------

namespace astyle {
//
// this must be global
static int g_preprocessorCppExternCBrace;

//-----------------------------------------------------------------------------
// ASBeautifier class
//-----------------------------------------------------------------------------

/**
 * ASBeautifier‘s constructor
 * This constructor is called only once for each source file.
 * The cloned ASBeautifier objects are created with the copy constructor.
 */
ASBeautifier::ASBeautifier()
{
waitingBeautifierStack = nullptr;
activeBeautifierStack = nullptr;
waitingBeautifierStackLengthStack = nullptr;
activeBeautifierStackLengthStack = nullptr;

headerStack = nullptr;
tempStacks = nullptr;
parenDepthStack = nullptr;
blockStatementStack = nullptr;
parenStatementStack = nullptr;
braceBlockStateStack = nullptr;
continuationIndentStack = nullptr;
continuationIndentStackSizeStack = nullptr;
parenIndentStack = nullptr;
preprocIndentStack = nullptr;
sourceIterator = nullptr;
isModeManuallySet = false;
shouldForceTabIndentation = false;
setSpaceIndentation(4);
setContinuationIndentation(1);
setMinConditionalIndentOption(MINCOND_TWO);
setMaxContinuationIndentLength(40);
classInitializerIndents = 1;
tabLength = 0;
setClassIndent(false);
setModifierIndent(false);
setSwitchIndent(false);
setCaseIndent(false);
setBlockIndent(false);
setBraceIndent(false);
setBraceIndentVtk(false);
setNamespaceIndent(false);
setAfterParenIndent(false);
setLabelIndent(false);
setEmptyLineFill(false);
setCstyle();
setPreprocDefineIndent(false);
setPreprocConditionalIndent(false);
setAlignMethodColon(false);

// initialize ASBeautifier member vectors
beautifierFileType = 9; // reset to an invalid type
headers = new vector;
nonParenHeaders = new vector;
assignmentOperators = new vector;
nonAssignmentOperators = new vector;
preBlockStatements = new vector;
preCommandHeaders = new vector;
indentableHeaders = new vector;
}

/**
 * ASBeautifier‘s copy constructor
 * Copy the vector objects to vectors in the new ASBeautifier
 * object so the new object can be destroyed without deleting
 * the vector objects in the copied vector.
 * This is the reason a copy constructor is ne

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     595456  2018-01-12 02:42  Astyle_3.1_windows\Astyle\bin\Astyle.exe

     文件        355  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\cb-bcc32c\Bcc Astyle All.workspace

     文件       2118  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\cb-bcc32c\Bcc Astyle Dll.cbp

     文件       2242  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\cb-bcc32c\Bcc Astyle Java.cbp

     文件       1620  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\cb-bcc32c\Bcc Astyle Lib.cbp

     文件       2214  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\cb-bcc32c\Bcc Astyle.cbp

     文件        347  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\cb-mingw\MinGW Astyle All.workspace

     文件       3198  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\cb-mingw\MinGW Astyle Dll.cbp

     文件       3426  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\cb-mingw\MinGW Astyle Java.cbp

     文件       1864  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\cb-mingw\MinGW Astyle Lib.cbp

     文件       3518  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\cb-mingw\MinGW Astyle.cbp

     文件       5558  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2010\All Astyle.sln

     文件      14621  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2010\Astyle\Astyle.vcxproj

     文件       1493  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2010\Astyle\Astyle.vcxproj.filters

     文件      13734  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2010\Astyle Dll\Astyle Dll.vcxproj

     文件       1273  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2010\Astyle Dll\Astyle Dll.vcxproj.filters

     文件       1622  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2010\Astyle Dll.sln

     文件      14034  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2010\Astyle Java\Astyle Java.vcxproj

     文件       1273  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2010\Astyle Java\Astyle Java.vcxproj.filters

     文件       1625  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2010\Astyle Java.sln

     文件      10716  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2010\Astyle Lib\Astyle Lib.vcxproj

     文件       1273  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2010\Astyle Lib\Astyle Lib.vcxproj.filters

     文件       1622  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2010\Astyle Lib.sln

     文件       1610  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2010\Astyle.sln

     文件       4839  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2012\All Astyle.sln

     文件      14308  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2012\Astyle\Astyle.vcxproj

     文件       1867  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2012\Astyle\Astyle.vcxproj.filters

     文件      13871  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2012\Astyle Dll\Astyle Dll.vcxproj

     文件       1647  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2012\Astyle Dll\Astyle Dll.vcxproj.filters

     文件       1615  2018-01-12 02:42  Astyle_3.1_windows\Astyle\build\vs2012\Astyle Dll.sln

............此处省略150个文件信息

评论

共有 条评论