MCPcopy Index your code
hub / github.com/clojure/clojure / analyzeSeq

Method analyzeSeq

src/jvm/clojure/lang/Compiler.java:7661–7704  ·  view source on GitHub ↗
(C context, ISeq form, String name)

Source from the content-addressed store, hash-verified

7659}
7660
7661private static Expr analyzeSeq(C context, ISeq form, String name) {
7662 Object line = lineDeref();
7663 Object column = columnDeref();
7664 if(RT.meta(form) != null && RT.meta(form).containsKey(RT.LINE_KEY))
7665 line = RT.meta(form).valAt(RT.LINE_KEY);
7666 if(RT.meta(form) != null && RT.meta(form).containsKey(RT.COLUMN_KEY))
7667 column = RT.meta(form).valAt(RT.COLUMN_KEY);
7668 Var.pushThreadBindings(
7669 RT.map(LINE, line, COLUMN, column));
7670 Object op = null;
7671 try
7672 {
7673 Object me = macroexpand1(form);
7674 if(me != form)
7675 return analyze(context, me, name);
7676
7677 op = RT.first(form);
7678 if(op == null)
7679 throw new IllegalArgumentException("Can't call nil, form: " + form);
7680 IFn inline = isInline(op, RT.count(RT.next(form)));
7681 if(inline != null)
7682 return analyze(context, preserveTag(form, inline.applyTo(RT.next(form))));
7683 IParser p;
7684 if(op.equals(FN))
7685 return FnExpr.parse(context, form, name);
7686 else if((p = (IParser) specials.valAt(op)) != null)
7687 return p.parse(context, form);
7688 else
7689 return InvokeExpr.parse(context, form);
7690 }
7691 catch(Throwable e)
7692 {
7693 Symbol s = (op != null && op instanceof Symbol) ? (Symbol)op : null;
7694 if(!(e instanceof CompilerException)) {
7695 throw new CompilerException((String) SOURCE_PATH.deref(), lineDeref(), columnDeref(), s, e);
7696 }
7697 else
7698 throw (CompilerException) e;
7699 }
7700 finally
7701 {
7702 Var.popThreadBindings();
7703 }
7704}
7705
7706// DEPRECATED
7707static String errorMsg(String source, int line, int column, String s){

Callers 2

analyzeMethod · 0.95
buildThunkMethod · 0.80

Calls 15

lineDerefMethod · 0.95
columnDerefMethod · 0.95
metaMethod · 0.95
pushThreadBindingsMethod · 0.95
mapMethod · 0.95
macroexpand1Method · 0.95
analyzeMethod · 0.95
firstMethod · 0.95
isInlineMethod · 0.95
countMethod · 0.95
nextMethod · 0.95
preserveTagMethod · 0.95

Tested by

no test coverage detected