Пример #1
0
 private static ParameterDeclaration?ParseParameterDeclaration(ASTNode argument)
 {
     return(argument switch
     {
         IdentifierNode identifierNode => new ParameterDeclaration(identifierNode.TextValue),
         BinaryASTNode binaryNode => ParseArgumentDefinition(binaryNode),
         _ => throw new NotImplementedException(),
     });
Пример #2
0
 public IEnumerable <bool> Transform(BinaryASTNode item)
 {
     return(TransformAll(item.Left.YieldOne().Concat(item.Right)));
 }
Пример #3
0
 public object?Transform(BinaryASTNode item)
 {
     return(item.Operator.Transform(OperatorTransformer, new[] { item.Left, item.Right }));
 }
 public Expression Transform(BinaryASTNode item)
 {
     return(item.Operator.Transform(OperatorTransformer, new ASTNode[] { item.Left, item.Right }));
 }