예제 #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
파일: Parser.cs 프로젝트: techarch/ironruby
 // 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;
 }