-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #204 from MarkusAmshove/natparse/expand-reduce
- Loading branch information
Showing
16 changed files
with
507 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
11 changes: 11 additions & 0 deletions
11
libs/natparse/src/main/java/org/amshove/natparse/natural/IExpandArrayNode.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.amshove.natparse.natural; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
public interface IExpandArrayNode extends IStatementNode | ||
{ | ||
IVariableReferenceNode arrayToExpand(); | ||
|
||
@Nullable | ||
IVariableReferenceNode errorVariable(); | ||
} |
13 changes: 13 additions & 0 deletions
13
libs/natparse/src/main/java/org/amshove/natparse/natural/IExpandDynamicNode.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.amshove.natparse.natural; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
public interface IExpandDynamicNode extends IStatementNode | ||
{ | ||
IVariableReferenceNode variableToExpand(); | ||
|
||
int sizeToExpandTo(); | ||
|
||
@Nullable | ||
IVariableReferenceNode errorVariable(); | ||
} |
11 changes: 11 additions & 0 deletions
11
libs/natparse/src/main/java/org/amshove/natparse/natural/IReduceArrayNode.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.amshove.natparse.natural; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
public interface IReduceArrayNode extends IStatementNode | ||
{ | ||
IVariableReferenceNode arrayToReduce(); | ||
|
||
@Nullable | ||
IVariableReferenceNode errorVariable(); | ||
} |
13 changes: 13 additions & 0 deletions
13
libs/natparse/src/main/java/org/amshove/natparse/natural/IReduceDynamicNode.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.amshove.natparse.natural; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
public interface IReduceDynamicNode extends IStatementNode | ||
{ | ||
IVariableReferenceNode variableToReduce(); | ||
|
||
int sizeToReduceTo(); | ||
|
||
@Nullable | ||
IVariableReferenceNode errorVariable(); | ||
} |
5 changes: 5 additions & 0 deletions
5
libs/natparse/src/main/java/org/amshove/natparse/natural/IResizeArrayNode.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
package org.amshove.natparse.natural; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
public interface IResizeArrayNode extends IStatementNode | ||
{ | ||
IVariableReferenceNode arrayToResize(); | ||
|
||
@Nullable | ||
IVariableReferenceNode errorVariable(); | ||
} |
5 changes: 5 additions & 0 deletions
5
libs/natparse/src/main/java/org/amshove/natparse/natural/IResizeDynamicNode.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
package org.amshove.natparse.natural; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
public interface IResizeDynamicNode extends IStatementNode | ||
{ | ||
IVariableReferenceNode variableToResize(); | ||
|
||
int sizeToResizeTo(); | ||
|
||
@Nullable | ||
IVariableReferenceNode errorVariable(); | ||
} |
32 changes: 32 additions & 0 deletions
32
libs/natparse/src/main/java/org/amshove/natparse/parsing/ExpandArrayNode.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.amshove.natparse.parsing; | ||
|
||
import org.amshove.natparse.natural.IExpandArrayNode; | ||
import org.amshove.natparse.natural.IVariableReferenceNode; | ||
|
||
class ExpandArrayNode extends StatementNode implements IExpandArrayNode | ||
{ | ||
private IVariableReferenceNode arrayToExpand; | ||
private IVariableReferenceNode errorVariable; | ||
|
||
@Override | ||
public IVariableReferenceNode arrayToExpand() | ||
{ | ||
return arrayToExpand; | ||
} | ||
|
||
@Override | ||
public IVariableReferenceNode errorVariable() | ||
{ | ||
return errorVariable; | ||
} | ||
|
||
void setArrayToExpand(IVariableReferenceNode array) | ||
{ | ||
arrayToExpand = array; | ||
} | ||
|
||
void setErrorVariable(IVariableReferenceNode errorVariable) | ||
{ | ||
this.errorVariable = errorVariable; | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
libs/natparse/src/main/java/org/amshove/natparse/parsing/ExpandDynamicNode.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package org.amshove.natparse.parsing; | ||
|
||
import org.amshove.natparse.natural.IExpandDynamicNode; | ||
import org.amshove.natparse.natural.IVariableReferenceNode; | ||
|
||
class ExpandDynamicNode extends StatementNode implements IExpandDynamicNode | ||
{ | ||
private IVariableReferenceNode variableToExpand; | ||
private IVariableReferenceNode errorVariable; | ||
private int sizeToExpandTo; | ||
|
||
@Override | ||
public IVariableReferenceNode variableToExpand() | ||
{ | ||
return variableToExpand; | ||
} | ||
|
||
@Override | ||
public int sizeToExpandTo() | ||
{ | ||
return sizeToExpandTo; | ||
} | ||
|
||
@Override | ||
public IVariableReferenceNode errorVariable() | ||
{ | ||
return errorVariable; | ||
} | ||
|
||
void setVariableToResize(IVariableReferenceNode variableToExpand) | ||
{ | ||
this.variableToExpand = variableToExpand; | ||
} | ||
|
||
void setSizeToResizeTo(int sizeToExpandTo) | ||
{ | ||
this.sizeToExpandTo = sizeToExpandTo; | ||
} | ||
|
||
void setErrorVariable(IVariableReferenceNode errorVariable) | ||
{ | ||
this.errorVariable = errorVariable; | ||
} | ||
} |
This file contains 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
32 changes: 32 additions & 0 deletions
32
libs/natparse/src/main/java/org/amshove/natparse/parsing/ReduceArrayNode.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.amshove.natparse.parsing; | ||
|
||
import org.amshove.natparse.natural.IReduceArrayNode; | ||
import org.amshove.natparse.natural.IVariableReferenceNode; | ||
|
||
class ReduceArrayNode extends StatementNode implements IReduceArrayNode | ||
{ | ||
private IVariableReferenceNode arrayToReduce; | ||
private IVariableReferenceNode errorVariable; | ||
|
||
@Override | ||
public IVariableReferenceNode arrayToReduce() | ||
{ | ||
return arrayToReduce; | ||
} | ||
|
||
@Override | ||
public IVariableReferenceNode errorVariable() | ||
{ | ||
return errorVariable; | ||
} | ||
|
||
void setArrayToReduce(IVariableReferenceNode array) | ||
{ | ||
arrayToReduce = array; | ||
} | ||
|
||
void setErrorVariable(IVariableReferenceNode errorVariable) | ||
{ | ||
this.errorVariable = errorVariable; | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
libs/natparse/src/main/java/org/amshove/natparse/parsing/ReduceDynamicNode.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package org.amshove.natparse.parsing; | ||
|
||
import org.amshove.natparse.natural.IReduceDynamicNode; | ||
import org.amshove.natparse.natural.IVariableReferenceNode; | ||
|
||
class ReduceDynamicNode extends StatementNode implements IReduceDynamicNode | ||
{ | ||
private IVariableReferenceNode variableToReduce; | ||
private IVariableReferenceNode errorVariable; | ||
private int sizeToReduceTo; | ||
|
||
@Override | ||
public IVariableReferenceNode variableToReduce() | ||
{ | ||
return variableToReduce; | ||
} | ||
|
||
@Override | ||
public IVariableReferenceNode errorVariable() | ||
{ | ||
return errorVariable; | ||
} | ||
|
||
@Override | ||
public int sizeToReduceTo() | ||
{ | ||
return sizeToReduceTo; | ||
} | ||
|
||
void setVariableToResize(IVariableReferenceNode variableToReduce) | ||
{ | ||
this.variableToReduce = variableToReduce; | ||
} | ||
|
||
void setSizeToResizeTo(int sizeToReduceTo) | ||
{ | ||
this.sizeToReduceTo = sizeToReduceTo; | ||
} | ||
|
||
void setErrorVariable(IVariableReferenceNode errorVariable) | ||
{ | ||
this.errorVariable = errorVariable; | ||
} | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.