Ejemplo n.º 1
0
 public static IMaybe <(Block expression, Block block, int position)> GetExpressionThenBlock(string source, int index)
 {
     return
         (from expression in GetExpression(source, index, Stop.ExpressionThenBlock())
          from oneOrMore in GetOneOrMultipleBlock(source, expression.position)
          select(expression.block, oneOrMore.block, oneOrMore.position));
 }
Ejemplo n.º 2
0
 public static IMaybe <(Block, Block, int)> GetExpressionThenBlock(string source, int index)
 {
     return(GetExpression(source, index, Stop.ExpressionThenBlock())
            .Map(t => GetOneOrMultipleBlock(source, t.Item2).Map(t2 => (t.Item1, t2.Item1, t2.Item2))));
 }