for(i=4;;)
This commit is contained in:
parent
be31006978
commit
55589ad499
1 changed files with 9 additions and 1 deletions
|
@ -3,6 +3,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import be.jeffcheasey88.peeratcode.parser.Parser;
|
||||
import be.jeffcheasey88.peeratcode.parser.TokenType;
|
||||
import be.jeffcheasey88.peeratcode.parser.TokenValidator;
|
||||
import be.jeffcheasey88.peeratcode.parser.Tokenizer;
|
||||
import be.jeffcheasey88.peeratcode.parser.java.JavaElement;
|
||||
|
@ -21,7 +22,14 @@ public class ForCase {
|
|||
.then((validator) -> validator.validate((token) -> token.getValue().equals("(")));
|
||||
|
||||
StateTree<JavaElement> operation_for_first_part = operation_for.then((validator) -> validator.validate((token) -> token.getValue().equals(";")));
|
||||
|
||||
|
||||
|
||||
operation_for.then((validator) -> validator.validate((token) -> token.getType().equals(TokenType.NAME)))
|
||||
.then((validator) -> validator.validate((token) -> token.getValue().equals("=")))
|
||||
.then((validator) -> validator.validate((token) -> token.getType().equals(TokenType.NAME)))
|
||||
.then(operation_for_first_part);
|
||||
|
||||
|
||||
StateTree<JavaElement> operation_for_second_part = operation_for_first_part.then((validator) -> validator.validate((token) -> token.getValue().equals(";")));
|
||||
|
||||
StateTree<JavaElement> operation_for_end = operation_for_second_part.then((validator) -> validator.validate((token) -> token.getValue().equals(")")))
|
||||
|
|
Loading…
Add table
Reference in a new issue