示例#1
0
 // or_test: and_test ('or' and_test)*
 private Expression ParseOrTest() {
     Expression ret = ParseAndTest();
     while (MaybeEat(TokenKind.KeywordOr)) {
         var start = ret.StartIndex;
         ret = new OrExpression(ret, ParseAndTest());
         ret.SetLoc(_globalParent, start, GetEnd());
     }
     return ret;
 }
示例#2
0
 // or_test: and_test ('or' and_test)*
 private Expression ParseOrTest() {
     Expression ret = ParseAndTest();
     while (MaybeEat(TokenKind.KeywordOr)) {
         SourceLocation start = ret.Start;
         ret = new OrExpression(ret, ParseAndTest());
         ret.SetLoc(start, GetEnd());
     }
     return ret;
 }