AutoTest -> 70.437%
This commit is contained in:
parent
fc966ba927
commit
5925132f21
1 changed files with 24 additions and 3 deletions
|
@ -340,9 +340,12 @@ public class JavaParser extends Parser<JavaElement> {
|
|||
.then((validator) -> validator.validate((token) -> token.getValue().equals(";")))
|
||||
.end((a,b) -> a);
|
||||
operation.then((validator) -> validator.validate((token) -> token.getValue().equals("do")))
|
||||
.then(new RedirectStateTree<>(value_container, (global, local) -> global.set(null)))
|
||||
.then((validator) -> validator.validate((token) -> token.getValue().equals(";")))
|
||||
.then((validator) -> validator.validate((token) -> token.getValue().equals("{")))
|
||||
.end((a,b) -> a)
|
||||
.multiple(function_container)
|
||||
.unique((validator) -> validator.validate((token) -> token.getValue().equals("}")))
|
||||
.end((a,b) -> a);
|
||||
|
||||
StateTree<JavaElement> operation_else = operation.then((validator) -> validator.validate((token) -> token.getValue().equals("else")))
|
||||
.end((a,b) -> a);
|
||||
operation_else.then(operation);
|
||||
|
@ -406,8 +409,22 @@ public class JavaParser extends Parser<JavaElement> {
|
|||
|
||||
StateTree<JavaElement> operation_for = operation.then((validator) -> validator.validate((token) -> token.getValue().equals("for")))
|
||||
.then((validator) -> validator.validate((token) -> token.getValue().equals("(")));
|
||||
StateTree<JavaElement> operation_for_first_part = operation_for.then((validator) -> validator.validate((token) -> token.getValue().equals(";")));
|
||||
StateTree<JavaElement> operation_for_second_part = operation_for_first_part.then((validator) -> validator.validate((token) -> token.getValue().equals(";")));
|
||||
operation_for_first_part.then(new RedirectStateTree<>(value_container, (global, local) -> global.set(null)))
|
||||
.then(operation_for_second_part);
|
||||
StateTree<JavaElement> operation_for_index = operation_for_second_part.then((validator) -> validator.validate((token) -> token.getValue().equals(")")));
|
||||
operation_for_index.end((a,b) -> a);
|
||||
operation_for_index.then((validator) -> validator.validate((token) -> token.getValue().equals("{")))
|
||||
.end((a,b) -> a)
|
||||
.multiple(function_container)
|
||||
.unique((validator) -> validator.validate((token) -> token.getValue().equals("}")))
|
||||
.end((a,b) -> a);
|
||||
operation_for_second_part.then(new RedirectStateTree<>(value_container, (global, local) -> global.set(null)))
|
||||
.then(operation_for_index);
|
||||
StateTree<JavaElement> operation_for_init = operation_for.then(new RedirectStateTree<>(type, (global, local) -> global.set(null)))
|
||||
.then((validator) -> validator.validate((token) -> token.getType().equals(TokenType.NAME)));
|
||||
.then(new RedirectStateTree<>(value_container, (global, local) -> global.set(null)));
|
||||
operation_for_init.then(operation_for_first_part);
|
||||
StateTree<JavaElement> operation_foreach = operation_for_init.then((validator) -> validator.validate((token) -> token.getValue().equals(":")))
|
||||
.then(new RedirectStateTree<>(value_container, (global, local) -> global.set(null)))
|
||||
.then((validator) -> validator.validate((token) -> token.getValue().equals(")")));
|
||||
|
@ -429,6 +446,9 @@ public class JavaParser extends Parser<JavaElement> {
|
|||
.unique((validator) -> validator.validate((token) -> token.getValue().equals("}")))
|
||||
.end((a,b) -> a);
|
||||
|
||||
operation_while.then((validator) -> validator.validate((token) -> token.getValue().equals(";")))
|
||||
.end((a,b) -> a);
|
||||
|
||||
operation.then((validator) -> validator.validate((token) -> token.getValue().equals("synchronized")))
|
||||
.then((validator) -> validator.validate((token) -> token.getValue().equals("(")))
|
||||
.then(new RedirectStateTree<>(value_container, (global, local) -> global.set(null)))
|
||||
|
@ -646,6 +666,7 @@ public class JavaParser extends Parser<JavaElement> {
|
|||
case "native": return Modifier.NATIVE;
|
||||
case "abstract": return Modifier.ABSTRACT;
|
||||
case "strictfp": return Modifier.STRICT;
|
||||
case "default": return Modifier.STRICT;
|
||||
default: break;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue