.before(SEMICOLON).spaceIf(false) .after(SEMICOLON).spaceIf(true) .beforeInside(DOT, IMPORT_SPEC).none() .afterInside(DOT, IMPORT_SPEC).spaces(1) .around(DOT).none() .around(ASSIGN).spaces(1) .around(VAR_ASSIGN).spaces(1) .aroundInside(MUL, POINTER_TYPE).none() .before(ARGUMENT_LIST).none() .before(BUILTIN_ARGUMENT_LIST).none() .afterInside(LPAREN, ARGUMENT_LIST).none() .beforeInside(RPAREN, ARGUMENT_LIST).none() .afterInside(LPAREN, BUILTIN_ARGUMENT_LIST).none() .beforeInside(RPAREN, BUILTIN_ARGUMENT_LIST).none() .before(SIGNATURE).none() .afterInside(LPAREN, TYPE_ASSERTION_EXPR).none() .beforeInside(RPAREN, TYPE_ASSERTION_EXPR).none() .afterInside(LPAREN, PARAMETERS).none() .beforeInside(RPAREN, PARAMETERS).none() .afterInside(LPAREN, RESULT).none() .beforeInside(RPAREN, RESULT).none() .between(PARAMETERS, RESULT).spaces(1) .before(BLOCK).spaces(1) .after(RANGE).spaces(1) .after(SWITCH).spaces(1) .afterInside(SEND_CHANNEL, UNARY_EXPR).none() .aroundInside(SEND_CHANNEL, SEND_STATEMENT).spaces(1) .afterInside(CHAN, CHANNEL_TYPE).spaces(1)
).spacing(aroundArrowOperatorSpaceCount, aroundArrowOperatorSpaceCount, 0, false, 0) .around(ElixirTypes.ASSOCIATION_OPERATOR).spaceIf(elixirCustomSettings.SPACE_AROUND_ASSOCIATION_OPERATOR) .after(ElixirTypes.AT_OPERATOR).none() .withinPair(ElixirTypes.OPENING_BIT, ElixirTypes.CLOSING_BIT).spaceIf(elixirCustomSettings.SPACE_WITHIN_BITS) .withinPair(ElixirTypes.OPENING_BRACKET, ElixirTypes.CLOSING_BRACKET).spaceIf(elixirCommonSettings.SPACE_WITHIN_BRACKETS) .around(ElixirTypes.COMPARISON_OPERATOR).spaceIf(elixirCommonSettings.SPACE_AROUND_EQUALITY_OPERATORS) .withinPair(ElixirTypes.OPENING_CURLY, ElixirTypes.CLOSING_CURLY).spaceIf(elixirCommonSettings.SPACE_WITHIN_BRACES) .around(ElixirTypes.DOT_OPERATOR).none() .after(ElixirTypes.FN).spaces(1) .aroundInside(ElixirTypes.DIVISION_OPERATOR, CAPTURE_NON_NUMERIC_OPERATION_TOKEN_SET).none() .around( MULTIPLICATIVE_OPERATOR_TOKEN_SET
.before(HEREDOC_END).none() .around(OPERATORS_STR).spaces(1)
static SpacingBuilder createSpacingBuilder(CodeStyleSettings settings) { return new SpacingBuilder(settings, CypherLanguage.INSTANCE) .before(OP_COLON).none() .afterInside(OP_COLON, MAP_LITERAL).spaces(1) .after(OP_COLON).none() .withinPair(PARENTHESE_OPEN, PARENTHESE_CLOSE).none() .withinPair(BRACKET_CURLYOPEN, BRACKET_CURLYCLOSE).none() .before(OP_COMMA).none() .after(OP_COMMA).spaces(1) .between(PARENTHESIZED_EXPRESSION, PATTERN).none() .between(NODE_LABEL, NODE_LABEL).none() .between(REL_TYPE, REL_TYPE).none() .between(NODE_PATTERN, RELATIONSHIP_PATTERN).none() .between(NODE_PATTERN, PATTERN_ELEMENT_CHAIN).none() .between(RELATIONSHIP_PATTERN, NODE_PATTERN).none() .between(PATTERN_ELEMENT_CHAIN, NODE_PATTERN).none() .between(VARIABLE, NODE_LABELS).none() .aroundInside(PATTERN_ELEMENT, PATTERN_PART).none() .aroundInside(DASH, RELATIONSHIP_PATTERN).none() .aroundInside(LEFT_ARROW_HEAD, RELATIONSHIP_PATTERN).none() .aroundInside(RIGHT_ARROW_HEAD, RELATIONSHIP_PATTERN).none() .afterInside(NODE_LABEL, HINT).none() .afterInside(OP_MUL, MAYBE_VARIABLE_LENGTH).none()
static SpacingBuilder getSpacingBuilder(CommonCodeStyleSettings settings, MathematicaCodeStyleSettings mathematicaSettings) { return new SpacingBuilder(settings.getRootSettings(), MathematicaLanguage.INSTANCE) .around(ourAssignments).spaceIf(mathematicaSettings.SPACE_AROUND_ASSIGNMENT_OPERATIONS) .around(ourArithmeticOperations).spaceIf(mathematicaSettings.SPACE_AROUND_ARITHMETIC_OPERATIONS) .aroundInside(MINUS, MINUS_EXPRESSION).spaceIf(mathematicaSettings.SPACE_AROUND_ARITHMETIC_OPERATIONS) .around(ourRelationalOperations).spaceIf(mathematicaSettings.SPACE_AROUND_RELATION_OPERATIONS) .around(ourRuleOperations).spaceIf(mathematicaSettings.SPACE_AROUND_RULE_OPERATIONS) .around(ourFunctionalOperations).spaceIf(mathematicaSettings.SPACE_AROUND_FUNCTIONAL_OPERATIONS) .around(ourOtherOperations).spaceIf(mathematicaSettings.SPACE_AROUND_OTHER_OPERATIONS) .after(COMMA).spaceIf(settings.SPACE_AFTER_COMMA) .before(LEFT_BRACKET).none() .after(RIGHT_BRACKET).none() ; } }