Class ParametersInParentheses
java.lang.Object
org.ek9lang.compiler.repair.ParametersInParentheses
- All Implemented Interfaces:
TextRule
Parameters declared the way other languages declare them (was
ParameterDeclarations.inParentheses):
add(name as String) / label(first: String, last: String) - Java's parameter list on a DECLARATION
line. EK9's parentheses on a declaration are always empty, so the parser stops on the first parameter expecting
) - which also proves the line is a declaration, not a call (a call with named arguments parses). The
parameters move under ->, one per line. CommaSeparatedParameters is the other such rule.-
Nested Class Summary
Nested classes/interfaces inherited from interface TextRule
TextRule.Rewrite -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(List<String> lines, SyntaxProbe.SyntaxError failure) add(name as String) as pure- the parameters moved under->, the parentheses left empty.
-
Constructor Details
-
ParametersInParentheses
ParametersInParentheses()
-
-
Method Details