| 1 | /* Some Comment */ |
| 2 | int foo(); |
| 3 | // empty strings are preserved |
| 4 | |
| 5 | // line with misc content is preserved |
| 6 | #define KEPT_VALUE no substitution |
| 7 | |
| 8 | // empty @ sigils are preserved |
| 9 | #define AT_SIGIL_1 @ |
| 10 | #define AT_SIGIL_2 @@ |
| 11 | #define AT_SIGIL_3 @@@ |
| 12 | #define AT_SIGIL_4 @@@@ |
| 13 | |
| 14 | // simple substitution |
| 15 | #define SIMPLE_UNDEFINED @undefined@ |
| 16 | #define SIMPLE_DEFINED @defined@ |
| 17 | #define SIMPLE_BOOL_TRUE @boolean_true@ |
| 18 | #define SIMPLE_BOOL_FALSE @boolean_false@ |
| 19 | #define SIMPLE_INTEGER @integer@ |
| 20 | #define SIMPLE_STRING @string@ |
| 21 | |
| 22 | // double packed substitution |
| 23 | #define DOUBLE_PACKED @string@@string@ |
| 24 | |
| 25 | // triple packed substitution |
| 26 | #define TRIPLE_PACKED @string@@integer@@string@ |
| 27 | |
| 28 | // double separated substitution |
| 29 | #define DOUBLE_SEPARATED @integer@.@integer@ |
| 30 | |
| 31 | // triple separated substitution |
| 32 | #define TRIPLE_SEPARATED @integer@.@boolean_true@.@integer@ |
| 33 | |
| 34 | // misc prefix is preserved |
| 35 | #define MISC_PREFIX false is @boolean_false@ |
| 36 | |
| 37 | // misc suffix is preserved |
| 38 | #define MISC_SUFFIX @boolean_true@ is true |
| 39 | |
| 40 | // surrounding content is preserved |
| 41 | #define SURROUNDING what is 6*7? @integer@! |
| 42 | |
| 43 | // incomplete key is preserved |
| 44 | #define INCOMPLETE_KEY @undefined |
| 45 | |
| 46 | // @-vars resolved only when they wrap valid characters, otherwise considered literals |
| 47 | #define DOUBLE_WRAPPED @@string@@ |
| 48 | |
| 49 | // expanded variables are considered strings after expansion |
| 50 | #define EXPANDED_STRING @string_at@ |
| 51 | |
| 52 | // variable name with underscores |
| 53 | #define UNDERSCORED_VAR @underscored_var@ |
| 54 | |
| 55 | // backslash before at-sigil does not prevent resolution |
| 56 | #define BACKSLASH_AT \@string@ |
| 57 | |
| 58 | // value that is an at-sign itself |
| 59 | #define AT_SIGN_VALUE @at_sign@ |
| 60 | |
| 61 | // incomplete key mid-line is preserved, trailing content kept |
| 62 | #define INCOMPLETE_MID @incomplete trailing content |