private Expr SaveOrAppend(IToken file, JPathParser.ExprContext input, bool append) { return(new FuncAppExpr( func: new FuncObj(append ? LibraryFunctions.AppendFunction : LibraryFunctions.SaveFunction), args: new Expr[] { new StrLit(ExtractStringFromStringLiteralToken(file)), input.Accept(this) })); }
private static Possible <Expr> TryConvertInternal(JPathParser.ExprContext expr) { try { return(expr.Accept(new AstConverter())); } catch (Exception e) { return(new Failure <string>(e.ToString())); } }