2018-11-08 09:47:44 +01:00
// Compiled by ClojureScript 1.10.439 {:static-fns true, :optimize-constants true}
2018-08-31 17:05:18 +02:00
goog . provide ( 'cljs.tools.reader.impl.errors' );
goog . require ( 'cljs.core' );
goog . require ( 'cljs.core.constants' );
goog . require ( 'cljs.tools.reader.reader_types' );
goog . require ( 'clojure.string' );
goog . require ( 'cljs.tools.reader.impl.inspect' );
cljs . tools . reader . impl . errors . ex_details = ( function cljs$tools$reader$impl$errors$ex_details ( rdr , ex_type ){
var details = new cljs . core . PersistentArrayMap ( null , 2 , [ cljs . core . cst$kw$type , cljs . core . cst$kw$reader_DASH_exception , cljs . core . cst$kw$ex_DASH_kind , ex_type ], null );
2018-11-08 09:47:44 +01:00
if ( cljs . tools . reader . reader_types . indexing_reader_QMARK_ ( rdr )){
2018-08-31 17:05:18 +02:00
return cljs . core . assoc . cljs$core$IFn$_invoke$arity$variadic ( details , cljs . core . cst$kw$file , cljs . tools . reader . reader_types . get_file_name ( rdr ), cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ cljs . core . cst$kw$line , cljs . tools . reader . reader_types . get_line_number ( rdr ), cljs . core . cst$kw$col , cljs . tools . reader . reader_types . get_column_number ( rdr )], 0 ));
} else {
return details ;
}
});
/**
* Throw an ex-info error.
*/
cljs . tools . reader . impl . errors . throw_ex = ( function cljs$tools$reader$impl$errors$throw_ex ( var_args ){
2018-11-08 09:47:44 +01:00
var args__4647__auto__ = [];
var len__4641__auto___6053 = arguments . length ;
var i__4642__auto___6054 = ( 0 );
2018-08-31 17:05:18 +02:00
while ( true ){
2018-11-08 09:47:44 +01:00
if (( i__4642__auto___6054 < len__4641__auto___6053 )){
args__4647__auto__ . push (( arguments [ i__4642__auto___6054 ]));
2018-08-31 17:05:18 +02:00
2018-11-08 09:47:44 +01:00
var G__6055 = ( i__4642__auto___6054 + ( 1 ));
i__4642__auto___6054 = G__6055 ;
2018-08-31 17:05:18 +02:00
continue ;
} else {
}
break ;
}
2018-11-08 09:47:44 +01:00
var argseq__4648__auto__ = (((( 2 ) < args__4647__auto__ . length )) ? ( new cljs . core . IndexedSeq ( args__4647__auto__ . slice (( 2 )),( 0 ), null )) : null );
return cljs . tools . reader . impl . errors . throw_ex . cljs$core$IFn$_invoke$arity$variadic (( arguments [( 0 )]),( arguments [( 1 )]), argseq__4648__auto__ );
2018-08-31 17:05:18 +02:00
});
cljs . tools . reader . impl . errors . throw_ex . cljs$core$IFn$_invoke$arity$variadic = ( function ( rdr , ex_type , msg ){
var details = cljs . tools . reader . impl . errors . ex_details ( rdr , ex_type );
var file = cljs . core . cst$kw$file . cljs$core$IFn$_invoke$arity$1 ( details );
var line = cljs . core . cst$kw$line . cljs$core$IFn$_invoke$arity$1 ( details );
var col = cljs . core . cst$kw$col . cljs$core$IFn$_invoke$arity$1 ( details );
var msg1 = ( cljs . core . truth_ ( file ) ? [ cljs . core . str . cljs$core$IFn$_invoke$arity$1 ( file ), " " ]. join ( '' ) : null );
var msg2 = ( cljs . core . truth_ ( line ) ? [ "[line " , cljs . core . str . cljs$core$IFn$_invoke$arity$1 ( line ), ", col " , cljs . core . str . cljs$core$IFn$_invoke$arity$1 ( col ), "]" ]. join ( '' ) : null );
2018-11-08 09:47:44 +01:00
var msg3 = ( cljs . core . truth_ (( function (){ var or__4047__auto__ = msg1 ;
if ( cljs . core . truth_ ( or__4047__auto__ )){
return or__4047__auto__ ;
2018-08-31 17:05:18 +02:00
} else {
return msg2 ;
}
})()) ? " " : null );
var full_msg = cljs . core . apply . cljs$core$IFn$_invoke$arity$5 ( cljs . core . str , msg1 , msg2 , msg3 , msg );
throw cljs . core . ex_info . cljs$core$IFn$_invoke$arity$2 ( full_msg , details );
});
cljs . tools . reader . impl . errors . throw_ex . cljs$lang$maxFixedArity = ( 2 );
/** @this {Function} */
2018-11-08 09:47:44 +01:00
cljs . tools . reader . impl . errors . throw_ex . cljs$lang$applyTo = ( function ( seq6050 ){
var G__6051 = cljs . core . first ( seq6050 );
var seq6050__$1 = cljs . core . next ( seq6050 );
var G__6052 = cljs . core . first ( seq6050__$1 );
var seq6050__$2 = cljs . core . next ( seq6050__$1 );
var self__4628__auto__ = this ;
return self__4628__auto__ . cljs$core$IFn$_invoke$arity$variadic ( G__6051 , G__6052 , seq6050__$2 );
2018-08-31 17:05:18 +02:00
});
/**
* Throws an ExceptionInfo with the given message.
* If rdr is an IndexingReader, additional information about column and line number is provided
*/
cljs . tools . reader . impl . errors . reader_error = ( function cljs$tools$reader$impl$errors$reader_error ( var_args ){
2018-11-08 09:47:44 +01:00
var args__4647__auto__ = [];
var len__4641__auto___6058 = arguments . length ;
var i__4642__auto___6059 = ( 0 );
2018-08-31 17:05:18 +02:00
while ( true ){
2018-11-08 09:47:44 +01:00
if (( i__4642__auto___6059 < len__4641__auto___6058 )){
args__4647__auto__ . push (( arguments [ i__4642__auto___6059 ]));
2018-08-31 17:05:18 +02:00
2018-11-08 09:47:44 +01:00
var G__6060 = ( i__4642__auto___6059 + ( 1 ));
i__4642__auto___6059 = G__6060 ;
2018-08-31 17:05:18 +02:00
continue ;
} else {
}
break ;
}
2018-11-08 09:47:44 +01:00
var argseq__4648__auto__ = (((( 1 ) < args__4647__auto__ . length )) ? ( new cljs . core . IndexedSeq ( args__4647__auto__ . slice (( 1 )),( 0 ), null )) : null );
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic (( arguments [( 0 )]), argseq__4648__auto__ );
2018-08-31 17:05:18 +02:00
});
cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic = ( function ( rdr , msgs ){
return cljs . tools . reader . impl . errors . throw_ex . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . cst$kw$reader_DASH_error , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ cljs . core . apply . cljs$core$IFn$_invoke$arity$2 ( cljs . core . str , msgs )], 0 ));
});
cljs . tools . reader . impl . errors . reader_error . cljs$lang$maxFixedArity = ( 1 );
/** @this {Function} */
2018-11-08 09:47:44 +01:00
cljs . tools . reader . impl . errors . reader_error . cljs$lang$applyTo = ( function ( seq6056 ){
var G__6057 = cljs . core . first ( seq6056 );
var seq6056__$1 = cljs . core . next ( seq6056 );
var self__4628__auto__ = this ;
return self__4628__auto__ . cljs$core$IFn$_invoke$arity$variadic ( G__6057 , seq6056__$1 );
2018-08-31 17:05:18 +02:00
});
/**
* Throws an ExceptionInfo with the given message.
* If rdr is an IndexingReader, additional information about column and line number is provided
*/
cljs . tools . reader . impl . errors . illegal_arg_error = ( function cljs$tools$reader$impl$errors$illegal_arg_error ( var_args ){
2018-11-08 09:47:44 +01:00
var args__4647__auto__ = [];
var len__4641__auto___6063 = arguments . length ;
var i__4642__auto___6064 = ( 0 );
2018-08-31 17:05:18 +02:00
while ( true ){
2018-11-08 09:47:44 +01:00
if (( i__4642__auto___6064 < len__4641__auto___6063 )){
args__4647__auto__ . push (( arguments [ i__4642__auto___6064 ]));
2018-08-31 17:05:18 +02:00
2018-11-08 09:47:44 +01:00
var G__6065 = ( i__4642__auto___6064 + ( 1 ));
i__4642__auto___6064 = G__6065 ;
2018-08-31 17:05:18 +02:00
continue ;
} else {
}
break ;
}
2018-11-08 09:47:44 +01:00
var argseq__4648__auto__ = (((( 1 ) < args__4647__auto__ . length )) ? ( new cljs . core . IndexedSeq ( args__4647__auto__ . slice (( 1 )),( 0 ), null )) : null );
return cljs . tools . reader . impl . errors . illegal_arg_error . cljs$core$IFn$_invoke$arity$variadic (( arguments [( 0 )]), argseq__4648__auto__ );
2018-08-31 17:05:18 +02:00
});
cljs . tools . reader . impl . errors . illegal_arg_error . cljs$core$IFn$_invoke$arity$variadic = ( function ( rdr , msgs ){
return cljs . tools . reader . impl . errors . throw_ex . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . cst$kw$illegal_DASH_argument , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ cljs . core . apply . cljs$core$IFn$_invoke$arity$2 ( cljs . core . str , msgs )], 0 ));
});
cljs . tools . reader . impl . errors . illegal_arg_error . cljs$lang$maxFixedArity = ( 1 );
/** @this {Function} */
2018-11-08 09:47:44 +01:00
cljs . tools . reader . impl . errors . illegal_arg_error . cljs$lang$applyTo = ( function ( seq6061 ){
var G__6062 = cljs . core . first ( seq6061 );
var seq6061__$1 = cljs . core . next ( seq6061 );
var self__4628__auto__ = this ;
return self__4628__auto__ . cljs$core$IFn$_invoke$arity$variadic ( G__6062 , seq6061__$1 );
2018-08-31 17:05:18 +02:00
});
/**
* Throws an ExceptionInfo with the given message.
* If rdr is an IndexingReader, additional information about column and line number is provided
*/
cljs . tools . reader . impl . errors . eof_error = ( function cljs$tools$reader$impl$errors$eof_error ( var_args ){
2018-11-08 09:47:44 +01:00
var args__4647__auto__ = [];
var len__4641__auto___6068 = arguments . length ;
var i__4642__auto___6069 = ( 0 );
2018-08-31 17:05:18 +02:00
while ( true ){
2018-11-08 09:47:44 +01:00
if (( i__4642__auto___6069 < len__4641__auto___6068 )){
args__4647__auto__ . push (( arguments [ i__4642__auto___6069 ]));
2018-08-31 17:05:18 +02:00
2018-11-08 09:47:44 +01:00
var G__6070 = ( i__4642__auto___6069 + ( 1 ));
i__4642__auto___6069 = G__6070 ;
2018-08-31 17:05:18 +02:00
continue ;
} else {
}
break ;
}
2018-11-08 09:47:44 +01:00
var argseq__4648__auto__ = (((( 1 ) < args__4647__auto__ . length )) ? ( new cljs . core . IndexedSeq ( args__4647__auto__ . slice (( 1 )),( 0 ), null )) : null );
return cljs . tools . reader . impl . errors . eof_error . cljs$core$IFn$_invoke$arity$variadic (( arguments [( 0 )]), argseq__4648__auto__ );
2018-08-31 17:05:18 +02:00
});
cljs . tools . reader . impl . errors . eof_error . cljs$core$IFn$_invoke$arity$variadic = ( function ( rdr , msgs ){
return cljs . tools . reader . impl . errors . throw_ex . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . cst$kw$eof , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ cljs . core . apply . cljs$core$IFn$_invoke$arity$2 ( cljs . core . str , msgs )], 0 ));
});
cljs . tools . reader . impl . errors . eof_error . cljs$lang$maxFixedArity = ( 1 );
/** @this {Function} */
2018-11-08 09:47:44 +01:00
cljs . tools . reader . impl . errors . eof_error . cljs$lang$applyTo = ( function ( seq6066 ){
var G__6067 = cljs . core . first ( seq6066 );
var seq6066__$1 = cljs . core . next ( seq6066 );
var self__4628__auto__ = this ;
return self__4628__auto__ . cljs$core$IFn$_invoke$arity$variadic ( G__6067 , seq6066__$1 );
2018-08-31 17:05:18 +02:00
});
cljs . tools . reader . impl . errors . throw_eof_delimited = ( function cljs$tools$reader$impl$errors$throw_eof_delimited ( var_args ){
2018-11-08 09:47:44 +01:00
var G__6072 = arguments . length ;
switch ( G__6072 ) {
2018-08-31 17:05:18 +02:00
case 4 :
return cljs . tools . reader . impl . errors . throw_eof_delimited . cljs$core$IFn$_invoke$arity$4 (( arguments [( 0 )]),( arguments [( 1 )]),( arguments [( 2 )]),( arguments [( 3 )]));
break ;
case 5 :
return cljs . tools . reader . impl . errors . throw_eof_delimited . cljs$core$IFn$_invoke$arity$5 (( arguments [( 0 )]),( arguments [( 1 )]),( arguments [( 2 )]),( arguments [( 3 )]),( arguments [( 4 )]));
break ;
default :
throw ( new Error ([ "Invalid arity: " , cljs . core . str . cljs$core$IFn$_invoke$arity$1 ( arguments . length )]. join ( '' )));
}
});
cljs . tools . reader . impl . errors . throw_eof_delimited . cljs$core$IFn$_invoke$arity$4 = ( function ( rdr , kind , column , line ){
return cljs . tools . reader . impl . errors . throw_eof_delimited . cljs$core$IFn$_invoke$arity$5 ( rdr , kind , line , column , null );
});
cljs . tools . reader . impl . errors . throw_eof_delimited . cljs$core$IFn$_invoke$arity$5 = ( function ( rdr , kind , line , column , n ){
return cljs . tools . reader . impl . errors . eof_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Unexpected EOF while reading " ,( cljs . core . truth_ ( n ) ? [ "item " , cljs . core . str . cljs$core$IFn$_invoke$arity$1 ( n ), " of " ]. join ( '' ) : null ), cljs . core . name ( kind ),( cljs . core . truth_ ( line ) ? [ ", starting at line " , cljs . core . str . cljs$core$IFn$_invoke$arity$1 ( line ), " and column " , cljs . core . str . cljs$core$IFn$_invoke$arity$1 ( column )]. join ( '' ) : null ), "." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_eof_delimited . cljs$lang$maxFixedArity = 5 ;
cljs . tools . reader . impl . errors . throw_odd_map = ( function cljs$tools$reader$impl$errors$throw_odd_map ( rdr , line , col , elements ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "The map literal starting with " , cljs . tools . reader . impl . inspect . inspect . cljs$core$IFn$_invoke$arity$1 ( cljs . core . first ( elements )),( cljs . core . truth_ ( line ) ? [ " on line " , cljs . core . str . cljs$core$IFn$_invoke$arity$1 ( line ), " column " , cljs . core . str . cljs$core$IFn$_invoke$arity$1 ( col )]. join ( '' ) : null ), " contains " , cljs . core . count ( elements ), " form(s). Map literals must contain an even number of forms." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_invalid_number = ( function cljs$tools$reader$impl$errors$throw_invalid_number ( rdr , token ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Invalid number: " , token , "." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_invalid_unicode_literal = ( function cljs$tools$reader$impl$errors$throw_invalid_unicode_literal ( rdr , token ){
throw cljs . tools . reader . impl . errors . illegal_arg_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Invalid unicode literal: \\" , token , "." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_invalid_unicode_escape = ( function cljs$tools$reader$impl$errors$throw_invalid_unicode_escape ( rdr , ch ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Invalid unicode escape: \\u" , ch , "." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_invalid = ( function cljs$tools$reader$impl$errors$throw_invalid ( rdr , kind , token ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Invalid " , cljs . core . name ( kind ), ": " , token , "." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_eof_at_start = ( function cljs$tools$reader$impl$errors$throw_eof_at_start ( rdr , kind ){
return cljs . tools . reader . impl . errors . eof_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Unexpected EOF while reading start of " , cljs . core . name ( kind ), "." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_bad_char = ( function cljs$tools$reader$impl$errors$throw_bad_char ( rdr , kind , ch ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Invalid character: " , ch , " found while reading " , cljs . core . name ( kind ), "." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_eof_at_dispatch = ( function cljs$tools$reader$impl$errors$throw_eof_at_dispatch ( rdr ){
return cljs . tools . reader . impl . errors . eof_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Unexpected EOF while reading dispatch character." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_bad_dispatch = ( function cljs$tools$reader$impl$errors$throw_bad_dispatch ( rdr , ch ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "No dispatch macro for " , ch , "." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_unmatch_delimiter = ( function cljs$tools$reader$impl$errors$throw_unmatch_delimiter ( rdr , ch ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Unmatched delimiter " , ch , "." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_eof_reading = ( function cljs$tools$reader$impl$errors$throw_eof_reading ( var_args ){
2018-11-08 09:47:44 +01:00
var args__4647__auto__ = [];
var len__4641__auto___6078 = arguments . length ;
var i__4642__auto___6079 = ( 0 );
2018-08-31 17:05:18 +02:00
while ( true ){
2018-11-08 09:47:44 +01:00
if (( i__4642__auto___6079 < len__4641__auto___6078 )){
args__4647__auto__ . push (( arguments [ i__4642__auto___6079 ]));
2018-08-31 17:05:18 +02:00
2018-11-08 09:47:44 +01:00
var G__6080 = ( i__4642__auto___6079 + ( 1 ));
i__4642__auto___6079 = G__6080 ;
2018-08-31 17:05:18 +02:00
continue ;
} else {
}
break ;
}
2018-11-08 09:47:44 +01:00
var argseq__4648__auto__ = (((( 2 ) < args__4647__auto__ . length )) ? ( new cljs . core . IndexedSeq ( args__4647__auto__ . slice (( 2 )),( 0 ), null )) : null );
return cljs . tools . reader . impl . errors . throw_eof_reading . cljs$core$IFn$_invoke$arity$variadic (( arguments [( 0 )]),( arguments [( 1 )]), argseq__4648__auto__ );
2018-08-31 17:05:18 +02:00
});
cljs . tools . reader . impl . errors . throw_eof_reading . cljs$core$IFn$_invoke$arity$variadic = ( function ( rdr , kind , start ){
2018-11-08 09:47:44 +01:00
var init = ( function (){ var G__6077 = kind ;
var G__6077__$1 = ((( G__6077 instanceof cljs . core . Keyword )) ? G__6077 . fqn : null );
switch ( G__6077__$1 ) {
2018-08-31 17:05:18 +02:00
case "regex" :
return "#\"" ;
break ;
case "string" :
return "\"" ;
break ;
default :
2018-11-08 09:47:44 +01:00
throw ( new Error ([ "No matching clause: " , cljs . core . str . cljs$core$IFn$_invoke$arity$1 ( G__6077__$1 )]. join ( '' )));
2018-08-31 17:05:18 +02:00
}
})();
return cljs . tools . reader . impl . errors . eof_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Unexpected EOF reading " , cljs . core . name ( kind ), " starting " , cljs . core . apply . cljs$core$IFn$_invoke$arity$3 ( cljs . core . str , init , start ), "." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_eof_reading . cljs$lang$maxFixedArity = ( 2 );
/** @this {Function} */
2018-11-08 09:47:44 +01:00
cljs . tools . reader . impl . errors . throw_eof_reading . cljs$lang$applyTo = ( function ( seq6074 ){
var G__6075 = cljs . core . first ( seq6074 );
var seq6074__$1 = cljs . core . next ( seq6074 );
var G__6076 = cljs . core . first ( seq6074__$1 );
var seq6074__$2 = cljs . core . next ( seq6074__$1 );
var self__4628__auto__ = this ;
return self__4628__auto__ . cljs$core$IFn$_invoke$arity$variadic ( G__6075 , G__6076 , seq6074__$2 );
2018-08-31 17:05:18 +02:00
});
cljs . tools . reader . impl . errors . throw_no_dispatch = ( function cljs$tools$reader$impl$errors$throw_no_dispatch ( rdr , ch ){
return cljs . tools . reader . impl . errors . throw_bad_dispatch ( rdr , ch );
});
cljs . tools . reader . impl . errors . throw_invalid_unicode_char = ( function cljs$tools$reader$impl$errors$throw_invalid_unicode_char ( rdr , token ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Invalid unicode character \\" , token , "." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_invalid_unicode_digit_in_token = ( function cljs$tools$reader$impl$errors$throw_invalid_unicode_digit_in_token ( rdr , ch , token ){
return cljs . tools . reader . impl . errors . illegal_arg_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Invalid digit " , ch , " in unicode character \\" , token , "." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_invalid_unicode_digit = ( function cljs$tools$reader$impl$errors$throw_invalid_unicode_digit ( rdr , ch ){
return cljs . tools . reader . impl . errors . illegal_arg_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Invalid digit " , ch , " in unicode character." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_invalid_unicode_len = ( function cljs$tools$reader$impl$errors$throw_invalid_unicode_len ( rdr , actual , expected ){
return cljs . tools . reader . impl . errors . illegal_arg_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Invalid unicode literal. Unicode literals should be " , expected , "characters long. " , "value suppled is " , actual , "characters long." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_invalid_character_literal = ( function cljs$tools$reader$impl$errors$throw_invalid_character_literal ( rdr , token ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Invalid character literal \\u" , token , "." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_invalid_octal_len = ( function cljs$tools$reader$impl$errors$throw_invalid_octal_len ( rdr , token ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Invalid octal escape sequence in a character literal:" , token , ". Octal escape sequences must be 3 or fewer digits." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_bad_octal_number = ( function cljs$tools$reader$impl$errors$throw_bad_octal_number ( rdr ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Octal escape sequence must be in range [0, 377]." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_unsupported_character = ( function cljs$tools$reader$impl$errors$throw_unsupported_character ( rdr , token ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Unsupported character: " , token , "." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_eof_in_character = ( function cljs$tools$reader$impl$errors$throw_eof_in_character ( rdr ){
return cljs . tools . reader . impl . errors . eof_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Unexpected EOF while reading character." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_bad_escape_char = ( function cljs$tools$reader$impl$errors$throw_bad_escape_char ( rdr , ch ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Unsupported escape character: \\" , ch , "." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_single_colon = ( function cljs$tools$reader$impl$errors$throw_single_colon ( rdr ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "A single colon is not a valid keyword." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_bad_metadata = ( function cljs$tools$reader$impl$errors$throw_bad_metadata ( rdr , x ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Metadata cannot be " , cljs . tools . reader . impl . inspect . inspect . cljs$core$IFn$_invoke$arity$1 ( x ), ". Metadata must be a Symbol, Keyword, String or Map." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_bad_metadata_target = ( function cljs$tools$reader$impl$errors$throw_bad_metadata_target ( rdr , target ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Metadata can not be applied to " , cljs . tools . reader . impl . inspect . inspect . cljs$core$IFn$_invoke$arity$1 ( target ), ". " , "Metadata can only be applied to IMetas." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_feature_not_keyword = ( function cljs$tools$reader$impl$errors$throw_feature_not_keyword ( rdr , feature ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Feature cannot be " , cljs . tools . reader . impl . inspect . inspect . cljs$core$IFn$_invoke$arity$1 ( feature ), " Features must be keywords." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_ns_map_no_map = ( function cljs$tools$reader$impl$errors$throw_ns_map_no_map ( rdr , ns_name ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Namespaced map with namespace " , ns_name , " does not specify a map." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_bad_ns = ( function cljs$tools$reader$impl$errors$throw_bad_ns ( rdr , ns_name ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Invalid value used as namespace in namespaced map: " , ns_name , "." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_bad_reader_tag = ( function cljs$tools$reader$impl$errors$throw_bad_reader_tag ( rdr , tag ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "Invalid reader tag: " , cljs . tools . reader . impl . inspect . inspect . cljs$core$IFn$_invoke$arity$1 ( tag ), ". Reader tags must be symbols." ], 0 ));
});
cljs . tools . reader . impl . errors . throw_unknown_reader_tag = ( function cljs$tools$reader$impl$errors$throw_unknown_reader_tag ( rdr , tag ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "No reader function for tag " , cljs . tools . reader . impl . inspect . inspect . cljs$core$IFn$_invoke$arity$1 ( tag ), "." ], 0 ));
});
cljs . tools . reader . impl . errors . duplicate_keys_error = ( function cljs$tools$reader$impl$errors$duplicate_keys_error ( msg , coll ){
var duplicates = ( function cljs$tools$reader$impl$errors$duplicate_keys_error_$_duplicates ( seq ){
2018-11-08 09:47:44 +01:00
var iter__4434__auto__ = ( function cljs$tools$reader$impl$errors$duplicate_keys_error_$_duplicates_$_iter__6092 ( s__6093 ){
2018-08-31 17:05:18 +02:00
return ( new cljs . core . LazySeq ( null ,( function (){
2018-11-08 09:47:44 +01:00
var s__6093__$1 = s__6093 ;
2018-08-31 17:05:18 +02:00
while ( true ){
2018-11-08 09:47:44 +01:00
var temp__5457__auto__ = cljs . core . seq ( s__6093__$1 );
2018-08-31 17:05:18 +02:00
if ( temp__5457__auto__ ){
2018-11-08 09:47:44 +01:00
var s__6093__$2 = temp__5457__auto__ ;
if ( cljs . core . chunked_seq_QMARK_ ( s__6093__$2 )){
var c__4432__auto__ = cljs . core . chunk_first ( s__6093__$2 );
var size__4433__auto__ = cljs . core . count ( c__4432__auto__ );
var b__6095 = cljs . core . chunk_buffer ( size__4433__auto__ );
if (( function (){ var i__6094 = ( 0 );
2018-08-31 17:05:18 +02:00
while ( true ){
2018-11-08 09:47:44 +01:00
if (( i__6094 < size__4433__auto__ )){
var vec__6096 = cljs . core . _nth . cljs$core$IFn$_invoke$arity$2 ( c__4432__auto__ , i__6094 );
var id = cljs . core . nth . cljs$core$IFn$_invoke$arity$3 ( vec__6096 ,( 0 ), null );
var freq = cljs . core . nth . cljs$core$IFn$_invoke$arity$3 ( vec__6096 ,( 1 ), null );
2018-08-31 17:05:18 +02:00
if (( freq > ( 1 ))){
2018-11-08 09:47:44 +01:00
cljs . core . chunk_append ( b__6095 , id );
2018-08-31 17:05:18 +02:00
2018-11-08 09:47:44 +01:00
var G__6102 = ( i__6094 + ( 1 ));
i__6094 = G__6102 ;
2018-08-31 17:05:18 +02:00
continue ;
} else {
2018-11-08 09:47:44 +01:00
var G__6103 = ( i__6094 + ( 1 ));
i__6094 = G__6103 ;
2018-08-31 17:05:18 +02:00
continue ;
}
} else {
return true ;
}
break ;
}
})()){
2018-11-08 09:47:44 +01:00
return cljs . core . chunk_cons ( cljs . core . chunk ( b__6095 ), cljs$tools$reader$impl$errors$duplicate_keys_error_$_duplicates_$_iter__6092 ( cljs . core . chunk_rest ( s__6093__$2 )));
2018-08-31 17:05:18 +02:00
} else {
2018-11-08 09:47:44 +01:00
return cljs . core . chunk_cons ( cljs . core . chunk ( b__6095 ), null );
2018-08-31 17:05:18 +02:00
}
} else {
2018-11-08 09:47:44 +01:00
var vec__6099 = cljs . core . first ( s__6093__$2 );
var id = cljs . core . nth . cljs$core$IFn$_invoke$arity$3 ( vec__6099 ,( 0 ), null );
var freq = cljs . core . nth . cljs$core$IFn$_invoke$arity$3 ( vec__6099 ,( 1 ), null );
2018-08-31 17:05:18 +02:00
if (( freq > ( 1 ))){
2018-11-08 09:47:44 +01:00
return cljs . core . cons ( id , cljs$tools$reader$impl$errors$duplicate_keys_error_$_duplicates_$_iter__6092 ( cljs . core . rest ( s__6093__$2 )));
2018-08-31 17:05:18 +02:00
} else {
2018-11-08 09:47:44 +01:00
var G__6104 = cljs . core . rest ( s__6093__$2 );
s__6093__$1 = G__6104 ;
2018-08-31 17:05:18 +02:00
continue ;
}
}
} else {
return null ;
}
break ;
}
}), null , null ));
});
2018-11-08 09:47:44 +01:00
return iter__4434__auto__ ( cljs . core . frequencies ( seq ));
2018-08-31 17:05:18 +02:00
});
var dups = duplicates ( coll );
return cljs . core . apply . cljs$core$IFn$_invoke$arity$5 ( cljs . core . str , msg ,((( cljs . core . count ( dups ) > ( 1 ))) ? "s" : null ), ": " , cljs . core . interpose . cljs$core$IFn$_invoke$arity$2 ( ", " , dups ));
});
cljs . tools . reader . impl . errors . throw_dup_keys = ( function cljs$tools$reader$impl$errors$throw_dup_keys ( rdr , kind , ks ){
return cljs . tools . reader . impl . errors . reader_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ cljs . tools . reader . impl . errors . duplicate_keys_error ([ cljs . core . str . cljs$core$IFn$_invoke$arity$1 ( clojure . string . capitalize ( cljs . core . name ( kind ))), " literal contains duplicate key" ]. join ( '' ), ks )], 0 ));
});
cljs . tools . reader . impl . errors . throw_eof_error = ( function cljs$tools$reader$impl$errors$throw_eof_error ( rdr , line ){
if ( cljs . core . truth_ ( line )){
return cljs . tools . reader . impl . errors . eof_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "EOF while reading, starting at line " , line , "." ], 0 ));
} else {
return cljs . tools . reader . impl . errors . eof_error . cljs$core$IFn$_invoke$arity$variadic ( rdr , cljs . core . prim_seq . cljs$core$IFn$_invoke$arity$2 ([ "EOF while reading." ], 0 ));
}
});