コード例 #1
0
 private static UnifiedExpression CreateDot3(XElement node)
 {
     Contract.Requires(node != null);
     Contract.Requires(node.Name() == "dot3");
     return(UnifiedRange.Create(
                CreateExpresion(node.FirstElement()),
                CreateExpresion(node.LastElement())));
 }
コード例 #2
0
 private static UnifiedExpression CreateRange(XElement node)
 {
     Contract.Requires(node != null);
     Contract.Requires(node.Name() == "Range");
     if (node.Value.Contains("..."))
     {
         var numbers = node.Value.Split(
             new[] { "..." }, StringSplitOptions.None);
         return(UnifiedRange.CreateNotContainingMax(
                    UnifiedIntegerLiteral.CreateInt32(
                        LiteralFuzzyParser.ParseBigInteger(numbers[0])),
                    UnifiedIntegerLiteral.CreateInt32(
                        LiteralFuzzyParser.ParseBigInteger(numbers[1]))));
     }
     {
         var numbers = node.Value.Split(
             new[] { ".." }, StringSplitOptions.None);
         return(UnifiedRange.Create(
                    UnifiedIntegerLiteral.CreateInt32(
                        LiteralFuzzyParser.ParseBigInteger(numbers[0])),
                    UnifiedIntegerLiteral.CreateInt32(
                        LiteralFuzzyParser.ParseBigInteger(numbers[1]))));
     }
 }