| | | 1 | | namespace NanoCLang { |
| | | 2 | | /// <summary> |
| | | 3 | | /// Provides a class for passing options to the source formatter for NanoC. |
| | | 4 | | /// </summary> |
| | | 5 | | #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member |
| | | 6 | | public class NanoCSourceFormat { |
| | 1621 | 7 | | public bool SpaceAfterFunctionName { get; internal set; } = false; |
| | 1956 | 8 | | public bool SpaceInEmptyArgList { get; internal set; } = false; |
| | 1470 | 9 | | public bool SpaceBeforeBindingAssignment { get; internal set; } = true; |
| | 1470 | 10 | | public bool SpaceAfterBindingAssignment { get; internal set; } = true; |
| | 1349 | 11 | | public bool SpaceBeforeInInBinding { get; internal set; } = true; |
| | 1504 | 12 | | public int NewlinesAfterFunctionBinding { get; internal set; } = 2; |
| | 1569 | 13 | | public bool SpaceBetweenIndexOffsetAndPlus { get; internal set; } = false; |
| | 1569 | 14 | | public bool SpaceBetweenIndexPlusAndStep { get; internal set; } = false; |
| | 1389 | 15 | | public bool SpaceBeforeFoldingKeywords { get; internal set; } = false; |
| | 1389 | 16 | | public bool SpaceAfterFoldingKeywords { get; internal set; } = false; |
| | 1362 | 17 | | public bool SpaceBetweenUnfoldAndExpression { get; internal set; } = false; |
| | 1388 | 18 | | public int NewlinesAfterUnfoldExpression { get; internal set; } = 1; |
| | 1355 | 19 | | public int NewlinesAfterIf { get; internal set; } = 0; |
| | 1367 | 20 | | public int NewlinesBeforeThen { get; internal set; } = 1; |
| | 1355 | 21 | | public int NewlinesAfterThen { get; internal set; } = 0; |
| | 1367 | 22 | | public int NewlinesBeforeElse { get; internal set; } = 1; |
| | 1355 | 23 | | public int NewlinesAfterElse { get; internal set; } = 0; |
| | 1373 | 24 | | public bool SpaceAfterFunKeyword { get; internal set; } = false; |
| | 1369 | 25 | | public bool FunctionParamNamesInDefinition { get; internal set; } = true; |
| | 1373 | 26 | | public bool NewlineBeforeFunctionBody { get; internal set; } = false; |
| | | 27 | | /// <summary> |
| | | 28 | | /// Overridden if <see cref="NewlineBeforeFunctionBody"/> is set. |
| | | 29 | | /// </summary> |
| | 1373 | 30 | | public bool SpaceBeforeFunctionBody { get; internal set; } = true; |
| | 1349 | 31 | | public bool IndentFunctionBodyOpenBrace { get; internal set; } = false; |
| | 1373 | 32 | | public bool NewlineBeforeFunctionBodyCloseBrace { get; internal set; } = true; |
| | | 33 | | /// <summary> |
| | | 34 | | /// Overridden if <see cref="NewlineBeforeFunctionBodyCloseBrace"/> is set. |
| | | 35 | | /// </summary> |
| | 1349 | 36 | | public bool SpaceBeforeFunctionBodyCloseBrace { get; internal set; } = true; |
| | 1373 | 37 | | public bool IndentFunctionBodyCloseBrace { get; internal set; } = false; |
| | 1373 | 38 | | public bool NewlineBeforeFunctionSchemaColon { get; internal set; } = false; |
| | 1349 | 39 | | public bool IndentFunctionSchemaColon { get; internal set; } = false; |
| | 1373 | 40 | | public bool SpaceBeforeFunctionSchemaColon { get; internal set; } = true; |
| | 1373 | 41 | | public bool NewlineAfterFunctionSchemaColon { get; internal set; } = false; |
| | 1349 | 42 | | public bool IndentFunctionSchema { get; internal set; } = true; |
| | 1373 | 43 | | public bool SpaceAfterFunctionSchemaColon { get; internal set; } = true; |
| | 1373 | 44 | | public int FunctionBodyIndent { get; internal set; } = 4; |
| | 1369 | 45 | | public int FunctionSchemaIndent { get; internal set; } = 0; |
| | | 46 | | /// <summary> |
| | | 47 | | /// Amount of indent on body of then and else blocks. |
| | | 48 | | /// </summary> |
| | 1361 | 49 | | public int IfBodyIndent { get; internal set; } = 5; |
| | 1517 | 50 | | public int NewlinesAfterBindingExpression { get; internal set; } = 1; |
| | 1379 | 51 | | public bool SpaceAfterDerefOperator { get; internal set; } = false; |
| | 2206 | 52 | | public string ParameterListSeparator { get; internal set; } = ", "; |
| | 1397 | 53 | | public string BlockSeparator { get; internal set; } = ", "; |
| | 1397 | 54 | | public bool SpaceBetweenBindOperatorAndBlock { get; internal set; } = true; |
| | 1397 | 55 | | public bool SpaceBetweenLocationAndBindOperator { get; internal set; } = true; |
| | 2416 | 56 | | public bool SpaceBeforeBinOp { get; internal set; } = true; |
| | 2416 | 57 | | public bool SpaceAfterBinOp { get; internal set; } = true; |
| | 1713 | 58 | | public bool SpaceBeforeTypeOperator { get; internal set; } = true; |
| | 1713 | 59 | | public bool SpaceAfterTypeOperator { get; internal set; } = true; |
| | 1614 | 60 | | public bool SpaceBeforeRefineOperator { get; internal set; } = true; |
| | 1614 | 61 | | public bool SpaceAfterRefineOperator { get; internal set; } = true; |
| | 1365 | 62 | | public int NewlinesBeforeBindingListOperator { get; internal set; } = 1; |
| | 1357 | 63 | | public int IndentHeapListOperator { get; internal set; } = 0; |
| | 1394 | 64 | | public string HeapBindingListSeparator { get; internal set; } = "* "; |
| | 1490 | 65 | | public int NewlinesBeforeWorldOperator { get; internal set; } = 1; |
| | 1443 | 66 | | public int NewlinesAfterWorldOperator { get; internal set; } = 0; |
| | 1349 | 67 | | public bool SpaceBeforeWorldOperator { get; internal set; } = false; |
| | 1396 | 68 | | public bool SpaceAfterWorldOperator { get; internal set; } = true; |
| | 1349 | 69 | | public bool SpaceBeforeFunctionWorld { get; internal set; } = false; |
| | 1415 | 70 | | public int NewlinesBeforeFunctionWorld { get; internal set; } = 1; |
| | 1371 | 71 | | public bool SpaceAfterFunctionWorld { get; internal set; } = true; |
| | 1393 | 72 | | public int NewlinesAfterFunctionWorld { get; internal set; } = 0; |
| | 1381 | 73 | | public bool SpaceBetweenLocationsAndFunctionName { get; internal set; } = false; |
| | 1349 | 74 | | public bool SpaceBetweenLocationsAndFunctionParams { get; internal set; } = false; |
| | 1415 | 75 | | public int NewlinesBeforeFunctionParams { get; internal set; } = 1; |
| | 1365 | 76 | | public int NewlinesAfterStructBinding { get; internal set; } = 2; |
| | | 77 | | } |
| | | 78 | | #pragma warning restore CS1591 // Missing XML comment for publicly visible type or member |
| | | 79 | | } |