コード例 #1
0
ファイル: Parser.cs プロジェクト: davidsiaw/inabascript
 void IntegerRange(Scope scope, out IntegerRange range)
 {
     Expect(3);
     long min = long.Parse(t.val); long max = long.Parse(t.val);
     if (la.kind == 9) {
         Get();
         Expect(3);
         max = long.Parse(t.val);
     }
     range = new IntegerRange(min, max);
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: davidsiaw/inabascript
 public bool IsWithin(IntegerRange other)
 {
     return (min >= other.min && max <= other.max);
 }