1/** 2* Emscriptens interface for bound std::vectors 3*/ 4interface EmscriptenVector< T > 5{ 6 get( i : number ) : T 7 push_back( elem : T ); 8 resize( size : number, elem : T ); 9 size() : number; 10 get() : T; 11 set( elem : T ); 12//TODO: 13// isAliasOf(); 14// clone(); 15// delete(); 16// isDeleted() : boolean; 17// deleteLater(); 18} 19 20/** 21* Emscriptens interface for bound enum types 22*/ 23interface EmscriptenEnumType 24{ 25 //! returns list with value objects of an enum 26 values() : EmscriptenVector<EmscriptenEnumTypeObject>; 27} 28 29/** 30* Emscriptens interface for bound enum type value objects 31*/ 32interface EmscriptenEnumTypeObject 33{ 34 //! return value of an enum value object 35 value : number; 36} 37 38declare namespace LibUncrustify 39{ 40 // <editor-fold desc="enums"> 41 42 // Example how to iterate below options : forin iterate Options, 43 // skip 'values' key, [ s : Options_STRING ] : EmscriptenEnumTypeObject; 44 45 // region enum bindings 46 export interface OptionTypeValue extends EmscriptenEnumTypeObject {} 47 export interface OptionType extends EmscriptenEnumType 48 { 49 BOOL : OptionTypeValue; 50 IARF : OptionTypeValue; 51 LINEEND : OptionTypeValue; 52 TOKENPOS : OptionTypeValue; 53 NUM : OptionTypeValue; 54 UNUM : OptionTypeValue; 55 STRING : OptionTypeValue; 56 } 57 58 export interface IARFValue extends EmscriptenEnumTypeObject {} 59 export interface IARF extends EmscriptenEnumType 60 { 61 IGNORE : IARFValue; 62 ADD : IARFValue; 63 REMOVE : IARFValue; 64 FORCE : IARFValue; 65 } 66 67 export interface LineEndValue extends EmscriptenEnumTypeObject {} 68 export interface LineEnd extends EmscriptenEnumType 69 { 70 LF : LineEndValue; 71 CRLF : LineEndValue; 72 CR : LineEndValue; 73 AUTO : LineEndValue; 74 } 75 76 export interface TokenPosValue extends EmscriptenEnumTypeObject {} 77 export interface TokenPos extends EmscriptenEnumType 78 { 79 IGNORE : TokenPosValue; 80 BREAK : TokenPosValue; 81 FORCE : TokenPosValue; 82 LEAD : TokenPosValue; 83 TRAIL : TokenPosValue; 84 JOIN : TokenPosValue; 85 LEAD_BREAK : TokenPosValue; 86 LEAD_FORCE : TokenPosValue; 87 TRAIL_BREAK : TokenPosValue; 88 TRAIL_FORCE : TokenPosValue; 89 } 90 91 export interface LogTypeValue extends EmscriptenEnumTypeObject {} 92 export interface LogType extends EmscriptenEnumType 93 { 94 SYS : LogTypeValue; 95 ERR : LogTypeValue; 96 WARN : LogTypeValue; 97 NOTE : LogTypeValue; 98 INFO : LogTypeValue; 99 DATA : LogTypeValue; 100 FILELIST : LogTypeValue; 101 LINEENDS : LogTypeValue; 102 CASTS : LogTypeValue; 103 ALBR : LogTypeValue; 104 ALTD : LogTypeValue; 105 ALPP : LogTypeValue; 106 ALPROTO : LogTypeValue; 107 ALNLC : LogTypeValue; 108 ALTC : LogTypeValue; 109 ALADD : LogTypeValue; 110 ALASS : LogTypeValue; 111 FVD : LogTypeValue; 112 FVD2 : LogTypeValue; 113 INDENT : LogTypeValue; 114 INDENT2 : LogTypeValue; 115 INDPSE : LogTypeValue; 116 INDPC : LogTypeValue; 117 NEWLINE : LogTypeValue; 118 PF : LogTypeValue; 119 STMT : LogTypeValue; 120 TOK : LogTypeValue; 121 ALRC : LogTypeValue; 122 CMTIND : LogTypeValue; 123 INDLINE : LogTypeValue; 124 SIB : LogTypeValue; 125 RETURN : LogTypeValue; 126 BRDEL : LogTypeValue; 127 FCN : LogTypeValue; 128 FCNP : LogTypeValue; 129 PCU : LogTypeValue; 130 DYNKW : LogTypeValue; 131 OUTIND : LogTypeValue; 132 BCSAFTER : LogTypeValue; 133 BCSPOP : LogTypeValue; 134 BCSPUSH : LogTypeValue; 135 BCSSWAP : LogTypeValue; 136 FTOR : LogTypeValue; 137 AS : LogTypeValue; 138 PPIS : LogTypeValue; 139 TYPEDEF : LogTypeValue; 140 VARDEF : LogTypeValue; 141 DEFVAL : LogTypeValue; 142 PVSEMI : LogTypeValue; 143 PFUNC : LogTypeValue; 144 SPLIT : LogTypeValue; 145 FTYPE : LogTypeValue; 146 TEMPL : LogTypeValue; 147 PARADD : LogTypeValue; 148 PARADD2 : LogTypeValue; 149 BLANKD : LogTypeValue; 150 TEMPFUNC : LogTypeValue; 151 SCANSEMI : LogTypeValue; 152 DELSEMI : LogTypeValue; 153 FPARAM : LogTypeValue; 154 NL1LINE : LogTypeValue; 155 PFCHK : LogTypeValue; 156 AVDB : LogTypeValue; 157 SORT : LogTypeValue; 158 SPACE : LogTypeValue; 159 ALIGN : LogTypeValue; 160 ALAGAIN : LogTypeValue; 161 OPERATOR : LogTypeValue; 162 ASFCP : LogTypeValue; 163 INDLINED : LogTypeValue; 164 BCTRL : LogTypeValue; 165 RMRETURN : LogTypeValue; 166 PPIF : LogTypeValue; 167 MCB : LogTypeValue; 168 BRCH : LogTypeValue; 169 FCNR : LogTypeValue; 170 OCCLASS : LogTypeValue; 171 OCMSG : LogTypeValue; 172 BLANK : LogTypeValue; 173 OBJCWORD : LogTypeValue; 174 CHANGE : LogTypeValue; 175 CONTTEXT : LogTypeValue; 176 ANNOT : LogTypeValue; 177 OCBLK : LogTypeValue; 178 FLPAREN : LogTypeValue; 179 OCMSGD : LogTypeValue; 180 INDENTAG : LogTypeValue; 181 NFD : LogTypeValue; 182 JDBI : LogTypeValue; 183 SETPAR : LogTypeValue; 184 SETTYP : LogTypeValue; 185 SETFLG : LogTypeValue; 186 NLFUNCT : LogTypeValue; 187 CHUNK : LogTypeValue; 188 GUY98 : LogTypeValue; 189 GUY : LogTypeValue; 190 } 191 192 export interface TokenTypeValue extends EmscriptenEnumTypeObject {} 193 export interface TokenType extends EmscriptenEnumType 194 { 195 NONE : TokenTypeValue; 196 EOF : TokenTypeValue; 197 UNKNOWN : TokenTypeValue; 198 JUNK : TokenTypeValue; 199 WHITESPACE : TokenTypeValue; 200 SPACE : TokenTypeValue; 201 NEWLINE : TokenTypeValue; 202 NL_CONT : TokenTypeValue; 203 COMMENT_CPP : TokenTypeValue; 204 COMMENT : TokenTypeValue; 205 COMMENT_MULTI : TokenTypeValue; 206 COMMENT_EMBED : TokenTypeValue; 207 COMMENT_START : TokenTypeValue; 208 COMMENT_END : TokenTypeValue; 209 COMMENT_WHOLE : TokenTypeValue; 210 COMMENT_ENDIF : TokenTypeValue; 211 IGNORED : TokenTypeValue; 212 WORD : TokenTypeValue; 213 NUMBER : TokenTypeValue; 214 NUMBER_FP : TokenTypeValue; 215 STRING : TokenTypeValue; 216 STRING_MULTI : TokenTypeValue; 217 IF : TokenTypeValue; 218 ELSE : TokenTypeValue; 219 ELSEIF : TokenTypeValue; 220 FOR : TokenTypeValue; 221 WHILE : TokenTypeValue; 222 WHILE_OF_DO : TokenTypeValue; 223 SWITCH : TokenTypeValue; 224 CASE : TokenTypeValue; 225 DO : TokenTypeValue; 226 SYNCHRONIZED : TokenTypeValue; 227 VOLATILE : TokenTypeValue; 228 TYPEDEF : TokenTypeValue; 229 STRUCT : TokenTypeValue; 230 ENUM : TokenTypeValue; 231 ENUM_CLASS : TokenTypeValue; 232 SIZEOF : TokenTypeValue; 233 DECLTYPE : TokenTypeValue; 234 RETURN : TokenTypeValue; 235 BREAK : TokenTypeValue; 236 UNION : TokenTypeValue; 237 GOTO : TokenTypeValue; 238 CONTINUE : TokenTypeValue; 239 C_CAST : TokenTypeValue; 240 CPP_CAST : TokenTypeValue; 241 D_CAST : TokenTypeValue; 242 TYPE_CAST : TokenTypeValue; 243 TYPENAME : TokenTypeValue; 244 TEMPLATE : TokenTypeValue; 245 WHERE_SPEC : TokenTypeValue; 246 ASSIGN : TokenTypeValue; 247 ASSIGN_NL : TokenTypeValue; 248 SASSIGN : TokenTypeValue; 249 ASSIGN_DEFAULT_ARG : TokenTypeValue; 250 ASSIGN_FUNC_PROTO : TokenTypeValue; 251 COMPARE : TokenTypeValue; 252 SCOMPARE : TokenTypeValue; 253 BOOL : TokenTypeValue; 254 SBOOL : TokenTypeValue; 255 ARITH : TokenTypeValue; 256 SARITH : TokenTypeValue; 257 CARET : TokenTypeValue; 258 DEREF : TokenTypeValue; 259 INCDEC_BEFORE : TokenTypeValue; 260 INCDEC_AFTER : TokenTypeValue; 261 MEMBER : TokenTypeValue; 262 DC_MEMBER : TokenTypeValue; 263 C99_MEMBER : TokenTypeValue; 264 INV : TokenTypeValue; 265 DESTRUCTOR : TokenTypeValue; 266 NOT : TokenTypeValue; 267 D_TEMPLATE : TokenTypeValue; 268 ADDR : TokenTypeValue; 269 NEG : TokenTypeValue; 270 POS : TokenTypeValue; 271 STAR : TokenTypeValue; 272 PLUS : TokenTypeValue; 273 MINUS : TokenTypeValue; 274 AMP : TokenTypeValue; 275 BYREF : TokenTypeValue; 276 POUND : TokenTypeValue; 277 PREPROC : TokenTypeValue; 278 PREPROC_INDENT : TokenTypeValue; 279 PREPROC_BODY : TokenTypeValue; 280 PP : TokenTypeValue; 281 ELLIPSIS : TokenTypeValue; 282 RANGE : TokenTypeValue; 283 NULLCOND : TokenTypeValue; 284 SEMICOLON : TokenTypeValue; 285 VSEMICOLON : TokenTypeValue; 286 COLON : TokenTypeValue; 287 ASM_COLON : TokenTypeValue; 288 CASE_COLON : TokenTypeValue; 289 CLASS_COLON : TokenTypeValue; 290 CONSTR_COLON : TokenTypeValue; 291 D_ARRAY_COLON : TokenTypeValue; 292 COND_COLON : TokenTypeValue; 293 WHERE_COLON : TokenTypeValue; 294 QUESTION : TokenTypeValue; 295 COMMA : TokenTypeValue; 296 ASM : TokenTypeValue; 297 ATTRIBUTE : TokenTypeValue; 298 AUTORELEASEPOOL : TokenTypeValue; 299 OC_AVAILABLE : TokenTypeValue; 300 OC_AVAILABLE_VALUE : TokenTypeValue; 301 CATCH : TokenTypeValue; 302 WHEN : TokenTypeValue; 303 WHERE : TokenTypeValue; 304 CLASS : TokenTypeValue; 305 DELETE : TokenTypeValue; 306 EXPORT : TokenTypeValue; 307 FRIEND : TokenTypeValue; 308 NAMESPACE : TokenTypeValue; 309 PACKAGE : TokenTypeValue; 310 NEW : TokenTypeValue; 311 OPERATOR : TokenTypeValue; 312 OPERATOR_VAL : TokenTypeValue; 313 ASSIGN_OPERATOR : TokenTypeValue; 314 ACCESS : TokenTypeValue; 315 ACCESS_COLON : TokenTypeValue; 316 THROW : TokenTypeValue; 317 NOEXCEPT : TokenTypeValue; 318 TRY : TokenTypeValue; 319 BRACED_INIT_LIST : TokenTypeValue; 320 USING : TokenTypeValue; 321 USING_STMT : TokenTypeValue; 322 USING_ALIAS : TokenTypeValue; 323 D_WITH : TokenTypeValue; 324 D_MODULE : TokenTypeValue; 325 SUPER : TokenTypeValue; 326 DELEGATE : TokenTypeValue; 327 BODY : TokenTypeValue; 328 DEBUG : TokenTypeValue; 329 DEBUGGER : TokenTypeValue; 330 INVARIANT : TokenTypeValue; 331 UNITTEST : TokenTypeValue; 332 UNSAFE : TokenTypeValue; 333 FINALLY : TokenTypeValue; 334 FIXED : TokenTypeValue; 335 IMPORT : TokenTypeValue; 336 D_SCOPE : TokenTypeValue; 337 D_SCOPE_IF : TokenTypeValue; 338 LAZY : TokenTypeValue; 339 D_MACRO : TokenTypeValue; 340 D_VERSION : TokenTypeValue; 341 D_VERSION_IF : TokenTypeValue; 342 PAREN_OPEN : TokenTypeValue; 343 PAREN_CLOSE : TokenTypeValue; 344 ANGLE_OPEN : TokenTypeValue; 345 ANGLE_CLOSE : TokenTypeValue; 346 SPAREN_OPEN : TokenTypeValue; 347 SPAREN_CLOSE : TokenTypeValue; 348 FPAREN_OPEN : TokenTypeValue; 349 FPAREN_CLOSE : TokenTypeValue; 350 TPAREN_OPEN : TokenTypeValue; 351 TPAREN_CLOSE : TokenTypeValue; 352 BRACE_OPEN : TokenTypeValue; 353 BRACE_CLOSE : TokenTypeValue; 354 VBRACE_OPEN : TokenTypeValue; 355 VBRACE_CLOSE : TokenTypeValue; 356 SQUARE_OPEN : TokenTypeValue; 357 SQUARE_CLOSE : TokenTypeValue; 358 TSQUARE : TokenTypeValue; 359 MACRO_OPEN : TokenTypeValue; 360 MACRO_CLOSE : TokenTypeValue; 361 MACRO_ELSE : TokenTypeValue; 362 LABEL : TokenTypeValue; 363 LABEL_COLON : TokenTypeValue; 364 FUNCTION : TokenTypeValue; 365 FUNC_CALL : TokenTypeValue; 366 FUNC_CALL_USER : TokenTypeValue; 367 FUNC_DEF : TokenTypeValue; 368 FUNC_TYPE : TokenTypeValue; 369 FUNC_VAR : TokenTypeValue; 370 FUNC_PROTO : TokenTypeValue; 371 FUNC_START : TokenTypeValue; 372 FUNC_CLASS_DEF : TokenTypeValue; 373 FUNC_CLASS_PROTO : TokenTypeValue; 374 FUNC_CTOR_VAR : TokenTypeValue; 375 FUNC_WRAP : TokenTypeValue; 376 PROTO_WRAP : TokenTypeValue; 377 MACRO_FUNC : TokenTypeValue; 378 MACRO : TokenTypeValue; 379 QUALIFIER : TokenTypeValue; 380 EXTERN : TokenTypeValue; 381 DECLSPEC : TokenTypeValue; 382 ALIGN : TokenTypeValue; 383 TYPE : TokenTypeValue; 384 PTR_TYPE : TokenTypeValue; 385 TYPE_WRAP : TokenTypeValue; 386 CPP_LAMBDA : TokenTypeValue; 387 CPP_LAMBDA_RET : TokenTypeValue; 388 TRAILING_RET : TokenTypeValue; 389 BIT_COLON : TokenTypeValue; 390 OC_DYNAMIC : TokenTypeValue; 391 OC_END : TokenTypeValue; 392 OC_IMPL : TokenTypeValue; 393 OC_INTF : TokenTypeValue; 394 OC_PROTOCOL : TokenTypeValue; 395 OC_PROTO_LIST : TokenTypeValue; 396 OC_GENERIC_SPEC : TokenTypeValue; 397 OC_PROPERTY : TokenTypeValue; 398 OC_CLASS : TokenTypeValue; 399 OC_CLASS_EXT : TokenTypeValue; 400 OC_CATEGORY : TokenTypeValue; 401 OC_SCOPE : TokenTypeValue; 402 OC_MSG : TokenTypeValue; 403 OC_MSG_CLASS : TokenTypeValue; 404 OC_MSG_FUNC : TokenTypeValue; 405 OC_MSG_NAME : TokenTypeValue; 406 OC_MSG_SPEC : TokenTypeValue; 407 OC_MSG_DECL : TokenTypeValue; 408 OC_RTYPE : TokenTypeValue; 409 OC_ATYPE : TokenTypeValue; 410 OC_COLON : TokenTypeValue; 411 OC_DICT_COLON : TokenTypeValue; 412 OC_SEL : TokenTypeValue; 413 OC_SEL_NAME : TokenTypeValue; 414 OC_BLOCK : TokenTypeValue; 415 OC_BLOCK_ARG : TokenTypeValue; 416 OC_BLOCK_TYPE : TokenTypeValue; 417 OC_BLOCK_EXPR : TokenTypeValue; 418 OC_BLOCK_CARET : TokenTypeValue; 419 OC_AT : TokenTypeValue; 420 OC_PROPERTY_ATTR : TokenTypeValue; 421 PP_DEFINE : TokenTypeValue; 422 PP_DEFINED : TokenTypeValue; 423 PP_INCLUDE : TokenTypeValue; 424 PP_IF : TokenTypeValue; 425 PP_ELSE : TokenTypeValue; 426 PP_ENDIF : TokenTypeValue; 427 PP_ASSERT : TokenTypeValue; 428 PP_EMIT : TokenTypeValue; 429 PP_ENDINPUT : TokenTypeValue; 430 PP_ERROR : TokenTypeValue; 431 PP_FILE : TokenTypeValue; 432 PP_LINE : TokenTypeValue; 433 PP_SECTION : TokenTypeValue; 434 PP_ASM : TokenTypeValue; 435 PP_UNDEF : TokenTypeValue; 436 PP_PROPERTY : TokenTypeValue; 437 PP_BODYCHUNK : TokenTypeValue; 438 PP_PRAGMA : TokenTypeValue; 439 PP_REGION : TokenTypeValue; 440 PP_ENDREGION : TokenTypeValue; 441 PP_REGION_INDENT : TokenTypeValue; 442 PP_IF_INDENT : TokenTypeValue; 443 PP_IGNORE : TokenTypeValue; 444 PP_OTHER : TokenTypeValue; 445 CHAR : TokenTypeValue; 446 DEFINED : TokenTypeValue; 447 FORWARD : TokenTypeValue; 448 NATIVE : TokenTypeValue; 449 STATE : TokenTypeValue; 450 STOCK : TokenTypeValue; 451 TAGOF : TokenTypeValue; 452 DOT : TokenTypeValue; 453 TAG : TokenTypeValue; 454 TAG_COLON : TokenTypeValue; 455 LOCK : TokenTypeValue; 456 AS : TokenTypeValue; 457 IN : TokenTypeValue; 458 BRACED : TokenTypeValue; 459 THIS : TokenTypeValue; 460 BASE : TokenTypeValue; 461 DEFAULT : TokenTypeValue; 462 GETSET : TokenTypeValue; 463 GETSET_EMPTY : TokenTypeValue; 464 CONCAT : TokenTypeValue; 465 CS_SQ_STMT : TokenTypeValue; 466 CS_SQ_COLON : TokenTypeValue; 467 CS_PROPERTY : TokenTypeValue; 468 SQL_EXEC : TokenTypeValue; 469 SQL_BEGIN : TokenTypeValue; 470 SQL_END : TokenTypeValue; 471 SQL_WORD : TokenTypeValue; 472 SQL_ASSIGN : TokenTypeValue; 473 CONSTRUCT : TokenTypeValue; 474 LAMBDA : TokenTypeValue; 475 ASSERT : TokenTypeValue; 476 ANNOTATION : TokenTypeValue; 477 FOR_COLON : TokenTypeValue; 478 DOUBLE_BRACE : TokenTypeValue; 479 CNG_HASINC : TokenTypeValue; 480 CNG_HASINCN : TokenTypeValue; 481 Q_EMIT : TokenTypeValue; 482 Q_FOREACH : TokenTypeValue; 483 Q_FOREVER : TokenTypeValue; 484 Q_GADGET : TokenTypeValue; 485 Q_OBJECT : TokenTypeValue; 486 MODE : TokenTypeValue; 487 DI : TokenTypeValue; 488 HI : TokenTypeValue; 489 QI : TokenTypeValue; 490 SI : TokenTypeValue; 491 NOTHROW : TokenTypeValue; 492 WORD_ : TokenTypeValue; 493 } 494 495 export interface LanguageValue extends EmscriptenEnumTypeObject {} 496 export interface Language extends EmscriptenEnumType 497 { 498 C : LanguageValue; 499 CPP : LanguageValue; 500 D : LanguageValue; 501 CS : LanguageValue; 502 JAVA : LanguageValue; 503 OC : LanguageValue; 504 VALA : LanguageValue; 505 PAWN : LanguageValue; 506 ECMA : LanguageValue; 507 } 508 509 // endregion enum bindings 510 // </editor-fold> 511 512 export interface GenericOptionPtr 513 { 514 type(): OptionTypeValue; 515 description(): string; 516 name(): string; 517 possibleValues(): EmscriptenVector<string>; 518 defaultStr(): string; 519 minStr(): string; 520 maxStr(): string; 521 isDefault: boolean; 522 reset(): void 523 set(value: string): boolean; 524 value(): string; 525 } 526 527 export interface OptionGroupPtr 528 { 529 description: string 530 options: EmscriptenVector<GenericOptionPtr>; 531 } 532 533 export interface Uncrustify 534 { 535 OptionType: OptionType; 536 IARF: IARF; 537 LineEnd: LineEnd; 538 TokenPos: TokenPos; 539 LogType: LogType; 540 TokenType: TokenType; 541 Language: Language; 542 543 //! get groups vector 544 get_groups() : EmscriptenVector <OptionGroupPtr> 545 546 //! get options vector 547 get_options() : EmscriptenVector <GenericOptionPtr> 548 549 //! destroys the current libUncrustify instance 550 destruct() : void; 551 552 //! returns the UNCRUSTIFY_VERSION string 553 get_version() : string; 554 555 //! adds a new keyword to Uncrustifys dynamic keyword map (dkwm, keywords.cpp) 556 add_keyword( tag : string, type : TokenType ) : void 557 558 //! removes a keyword from Uncrustifys dynamic keyword map (dkwm, keywords.cpp) 559 // remove_keyword( tag : string ) 560 561 // clears Uncrustifys dynamic keyword map (dkwm, keywords.cpp) 562 clear_keywords() : void; 563 564 //! sets all option values to their default values 565 reset_options() : void; 566 567 /** 568 * resets value of an option to its default 569 * 570 * @param name: name of the option 571 * @return options enum value of the found option or -1 if option was not found 572 */ 573 option_reset_value( name : string ) : number; 574 575 /** 576 * sets value of an option 577 * 578 * @param name name of the option 579 * @param value value that is going to be set 580 * @return options enum value of the found option or -1 if option was not found 581 */ 582 option_set_value( name : string, value : string ) : number; 583 584 /** 585 * returns value of an option 586 * 587 * @param name name of the option 588 * @return currently set value of the option 589 */ 590 option_get_value( name : string ) : string; 591 592 /** 593 * reads option file string, sets the defined options 594 * 595 * @return returns EXIT_SUCCESS on success 596 */ 597 load_config( cfg : string ) : number; 598 599 /** 600 * returns the config file string based on the current configuration 601 * 602 * @param withDoc false= without documentation true=with documentation text lines 603 * @param only_not_default false=containing all options true=containing only options with non default values 604 * @return returns the config file string based on the current configuration 605 */ 606 show_config( withDoc : boolean, only_not_default : boolean ) : string; 607 608 /** 609 * returns the config file string with all options based on the current configuration 610 * 611 * @param withDoc false= without documentation true=with documentation text lines 612 * @return returns the config file string with all options based on the current configuration 613 */ 614 show_config( withDoc : boolean ) : string; 615 616 /** 617 * returns the config file string with all options and without documentation based on the current configuration 618 * 619 * @return returns the config file string with all options without documentation based on the current configuration 620 */ 621 show_config() : string; 622 623 //! enable or disable logging of a specific LogType 624 log_type_enable(type : LogType, value : bool) : void 625 626 /** 627 * Show or hide the severity prefix "<1>" 628 * 629 * @param b true=show false=hide 630 */ 631 log_type_show_name( b : boolean ) : void; 632 633 //! disables all logging messages 634 quiet() : void; 635 636 /** 637 * format text 638 * 639 * @param file file string that is going to be formated 640 * @param lang specifies in which language the input file is written (see LangFlag) 641 * @param frag [optional] true=fragmented code input 642 * false=unfragmented code input [default] 643 * 644 * @return formatted file string 645 */ 646 uncrustify( file : string, lang : LanguageValue, frag : boolean ) : string; 647 uncrustify( file : string, lang : LanguageValue ) : string; 648 649 /** 650 * generate debug output 651 * 652 * @param file file string that is going to be formated 653 * @param lang specifies in which language the input file is written (see LangFlag) 654 * @param frag [optional] true=fragmented code input 655 * false=unfragmented code input [default] 656 * 657 * @return debug output string 658 */ 659 debug( file : string, lang : LanguageValue, frag : boolean ) : string; 660 debug( file : string, lang : LanguageValue ) : string; 661 } 662 663 var Uncrustify : { 664 (module?: Object): Uncrustify; 665 new (module?: Object): Uncrustify; 666 }; 667} 668 669declare var uncrustify : LibUncrustify.Uncrustify; 670 671declare module "libUncrustify" 672{ 673 export = uncrustify; 674} 675