Created
January 2, 2014 17:54
-
-
Save langford/8223205 to your computer and use it in GitHub Desktop.
This format file does 99% of what I want out of my code's formatting It's only big flaw is that it overindents blocks (which will need to be fixed by the tool writer). There is a workaround for for another bug as well in the spec. All and all, pretty good. strictcodeapp.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! DO NOT CHANGE THIS FILE MANUALLY ! | |
STYLE_NAME=Apple | |
S_NAME=array | |
S_BEG | |
name[SOME] | |
S_END | |
S_NAME=asm | |
S_BEG | |
asm(SOME); | |
S_END | |
S_NAME=autoreleasepool | |
S_BEG | |
@autoreleasepool { | |
SOME | |
} | |
S_END | |
S_NAME=binary operator '.' | |
S_BEG | |
SOME.SOME | |
S_END | |
S_NAME=binary operator '->' | |
S_BEG | |
SOME->SOME | |
S_END | |
S_NAME=binary operator '&' | |
S_BEG | |
SOME & SOME | |
S_END | |
S_NAME=binary operator 'bitand' | |
S_BEG | |
SOME bitand SOME | |
S_END | |
S_NAME=binary operator '|' | |
S_BEG | |
SOME | SOME | |
S_END | |
S_NAME=binary operator 'bitor' | |
S_BEG | |
SOME bitor SOME | |
S_END | |
S_NAME=binary operator '=' | |
S_BEG | |
SOME = SOME | |
S_END | |
S_NAME=binary operator '==' | |
S_BEG | |
SOME == SOME | |
S_END | |
S_NAME=binary operator '!=' | |
S_BEG | |
SOME != SOME | |
S_END | |
S_NAME=binary operator 'not_eq' | |
S_BEG | |
SOME not_eq SOME | |
S_END | |
S_NAME=binary operator '||' | |
S_BEG | |
SOME || SOME | |
S_END | |
S_NAME=binary operator 'or' | |
S_BEG | |
SOME or SOME | |
S_END | |
S_NAME=binary operator '&&' | |
S_BEG | |
SOME && SOME | |
S_END | |
S_NAME=binary operator 'and' | |
S_BEG | |
SOME and SOME | |
S_END | |
S_NAME=binary operator '*' | |
S_BEG | |
SOME*SOME | |
S_END | |
S_NAME=binary operator '/' | |
S_BEG | |
SOME/SOME | |
S_END | |
S_NAME=binary operator '+' | |
S_BEG | |
SOME+SOME | |
S_END | |
S_NAME=binary operator '-' | |
S_BEG | |
SOME-SOME | |
S_END | |
S_NAME=binary operator '*=' | |
S_BEG | |
SOME *= SOME | |
S_END | |
S_NAME=binary operator '/=' | |
S_BEG | |
SOME /= SOME | |
S_END | |
S_NAME=binary operator '+=' | |
S_BEG | |
SOME += SOME | |
S_END | |
S_NAME=binary operator '-=' | |
S_BEG | |
SOME -= SOME | |
S_END | |
S_NAME=binary operator '<' | |
S_BEG | |
SOME < SOME | |
S_END | |
S_NAME=binary operator '>' | |
S_BEG | |
SOME > SOME | |
S_END | |
S_NAME=binary operator '<=' | |
S_BEG | |
SOME <= SOME | |
S_END | |
S_NAME=binary operator '>=' | |
S_BEG | |
SOME >= SOME | |
S_END | |
S_NAME=binary operator '^' | |
S_BEG | |
SOME ^ SOME | |
S_END | |
S_NAME=binary operator 'xor' | |
S_BEG | |
SOME xor SOME | |
S_END | |
S_NAME=binary operator '<<' | |
S_BEG | |
SOME << SOME | |
S_END | |
S_NAME=binary operator '<<=' | |
S_BEG | |
SOME <<= SOME | |
S_END | |
S_NAME=binary operator '>>' | |
S_BEG | |
SOME >> SOME | |
S_END | |
S_NAME=binary operator '>>=' | |
S_BEG | |
SOME >>= SOME | |
S_END | |
S_NAME=binary operator '%' | |
S_BEG | |
SOME % SOME | |
S_END | |
S_NAME=binary operator '%=' | |
S_BEG | |
SOME %= SOME | |
S_END | |
S_NAME=binary operator '&=' | |
S_BEG | |
SOME &= SOME | |
S_END | |
S_NAME=binary operator 'and_eq' | |
S_BEG | |
SOME and_eq SOME | |
S_END | |
S_NAME=binary operator '|=' | |
S_BEG | |
SOME |= SOME | |
S_END | |
S_NAME=binary operator 'or_eq' | |
S_BEG | |
SOME or_eq SOME | |
S_END | |
S_NAME=binary operator '^=' | |
S_BEG | |
SOME ^= SOME | |
S_END | |
S_NAME=binary operator 'xor_eq' | |
S_BEG | |
SOME xor_eq SOME | |
S_END | |
S_NAME=block | |
S_BEG | |
^(SOME, SOME) { | |
SOME} | |
S_END | |
S_NAME=boxed expression | |
S_BEG | |
@(SOME) | |
S_END | |
S_NAME=documentation comment block | |
S_BEG | |
/** | |
* SOME | |
*/ | |
S_END | |
S_NAME=compatibility_alias | |
S_BEG | |
@compatibility_alias type type; | |
S_END | |
S_NAME=defs | |
S_BEG | |
@defs(type) | |
S_END | |
S_NAME=do-while | |
S_BEG | |
do { | |
SOME | |
} while (SOME); | |
S_END | |
S_NAME=encode | |
S_BEG | |
@encode(type) | |
S_END | |
S_NAME=enum | |
S_BEG | |
enum name { | |
SOME, | |
SOME | |
} | |
S_END | |
S_NAME=for | |
S_BEG | |
for (SOME; SOME; SOME) { | |
SOME | |
} | |
S_END | |
S_NAME=for-in | |
S_BEG | |
for (SOME in SOME) { | |
SOME | |
} | |
S_END | |
S_NAME=function call | |
S_BEG | |
name(SOME, SOME) | |
S_END | |
S_NAME=function declaration | |
S_BEG | |
type name(SOME, SOME) | |
S_END | |
S_NAME=function definition | |
S_BEG | |
type name(SOME, SOME) { | |
SOME | |
} | |
S_END | |
S_NAME=goto | |
S_BEG | |
goto label; | |
S_END | |
S_NAME=goto label | |
S_BEG | |
{ | |
label: | |
} | |
S_END | |
S_NAME=if-else | |
S_BEG | |
if (SOME) { | |
SOME | |
} else if (SOME) { | |
SOME | |
} else { | |
SOME | |
} | |
S_END | |
S_NAME=instance variable directive | |
S_BEG | |
{ | |
@private | |
@protected | |
@public | |
@package | |
} | |
S_END | |
S_NAME=interface class | |
S_BEG | |
@interface name : name protocols { | |
SOME | |
} | |
SOME | |
@end | |
S_END | |
S_NAME=implementation class | |
S_BEG | |
@implementation name : name { | |
SOME | |
} | |
SOME | |
@end | |
S_END | |
S_NAME=interface category | |
S_BEG | |
@interface name (name) protocols | |
SOME | |
@end | |
S_END | |
S_NAME=implementation category | |
S_BEG | |
@implementation name (name) | |
SOME | |
@end | |
S_END | |
S_NAME=message | |
S_BEG | |
[SOME name_long_part:SOME name_part:SOME] | |
S_END | |
S_NAME=method argument | |
S_BEG | |
(type)name | |
S_END | |
S_NAME=method declaration | |
S_BEG | |
- (type)name_long_part:argument name_part:argument; | |
S_END | |
S_NAME=method definition | |
S_BEG | |
- (type)name_long_part:argument name_part:argument | |
{ | |
SOME | |
} | |
S_END | |
S_NAME=NSArray literal | |
S_BEG | |
@[SOME, SOME] | |
S_END | |
S_NAME=NSDictionary literal | |
S_BEG | |
@{SOME, SOME} | |
S_END | |
S_NAME=pointer type | |
S_BEG | |
type* name | |
S_END | |
S_NAME=preprocessor directive | |
S_BEG | |
#directive | |
S_END | |
S_NAME=preprocessor directive backslash | |
S_BEG | |
#directive SOME \ | |
SOME_LONG \ | |
SOME | |
S_END | |
S_NAME=property declaration | |
S_BEG | |
@property (attribute, attribute) SOME name; | |
S_END | |
S_NAME=protocols list | |
S_BEG | |
<name, name> | |
S_END | |
S_NAME=protocol declaration | |
S_BEG | |
@protocol name protocols | |
SOME | |
@end | |
S_END | |
S_NAME=protocol declaration directive | |
S_BEG | |
@protocol ... | |
@optional | |
@required | |
@end | |
S_END | |
S_NAME=protocol object | |
S_BEG | |
@protocol(name) | |
S_END | |
S_NAME=selector | |
S_BEG | |
@selector(SOME) | |
S_END | |
S_NAME=struct | |
S_BEG | |
struct name { | |
SOME | |
} | |
S_END | |
S_NAME=switch | |
S_BEG | |
switch (SOME) { | |
SOME | |
case SOME: | |
SOME | |
} | |
S_END | |
S_NAME=synchronized | |
S_BEG | |
@synchronized (name) { | |
SOME | |
} | |
S_END | |
S_NAME=unary operator '&' | |
S_BEG | |
&SOME | |
S_END | |
S_NAME=unary operator '*' | |
S_BEG | |
*SOME | |
S_END | |
S_NAME=unary operator '+' | |
S_BEG | |
+SOME | |
S_END | |
S_NAME=unary operator '++' | |
S_BEG | |
++SOME | |
S_END | |
S_NAME=unary operator '++' postfix | |
S_BEG | |
SOME++ | |
S_END | |
S_NAME=unary operator '-' | |
S_BEG | |
-SOME | |
S_END | |
S_NAME=unary operator '--' | |
S_BEG | |
--SOME | |
S_END | |
S_NAME=unary operator '--' postfix | |
S_BEG | |
SOME-- | |
S_END | |
S_NAME=unary operator '~' | |
S_BEG | |
~SOME | |
S_END | |
S_NAME=unary operator 'compl' | |
S_BEG | |
compl SOME | |
S_END | |
S_NAME=unary operator '!' | |
S_BEG | |
!SOME | |
S_END | |
S_NAME=unary operator 'not' | |
S_BEG | |
not SOME | |
S_END | |
S_NAME=unary operator 'sizeof' | |
S_BEG | |
sizeof (SOME) | |
S_END | |
S_NAME=ternary operator | |
S_BEG | |
SOME ? SOME : SOME | |
S_END | |
S_NAME=try-catch-finally | |
S_BEG | |
@try { | |
SOME | |
} @catch (SOME) { | |
SOME | |
} @finally { | |
SOME | |
} | |
S_END | |
S_NAME=union | |
S_BEG | |
union name { | |
SOME | |
} | |
S_END | |
S_NAME=while | |
S_BEG | |
while (SOME) { | |
SOME | |
} | |
S_END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment