提交 6cbcb2ef authored 作者: Owner's avatar Owner

Added comment for new method parseIfAll()

上级 0ce7bc4e
...@@ -3441,7 +3441,10 @@ public class Parser { ...@@ -3441,7 +3441,10 @@ public class Parser {
addExpected(token); addExpected(token);
return false; return false;
} }
/*
* Reads every token in list, in order - returns true if all are found.
* If any are not found, returns false - AND resets parsing back to state when called.
*/
private boolean readIfAll(List<String> tokens) { private boolean readIfAll(List<String> tokens) {
// save parse location in case we have to fail this test // save parse location in case we have to fail this test
int start = lastParseIndex; int start = lastParseIndex;
...@@ -3451,7 +3454,7 @@ public class Parser { ...@@ -3451,7 +3454,7 @@ public class Parser {
read(); read();
} }
else{ else{
// revert parse location // revert parse location to when called
parseIndex = start; parseIndex = start;
read(); read();
return false; return false;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论