Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix typo; dimension uses lambda

  • Loading branch information...
commit f84f19c0279c24bb75081b9741290ffc82579223 1 parent 3c72414
@gordonwoodhull gordonwoodhull authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 htdocs/dcrchart.js
View
7 htdocs/dcrchart.js
@@ -16,7 +16,7 @@ var dcrchart = (function() {
return function(args) {
return args.length==2
? disp + translate_expr(args[1])
- : bin_op(disp`)(args);
+ : bin_op(disp)(args);
}
}
@@ -32,6 +32,7 @@ var dcrchart = (function() {
"+": una_or_bin_op('+'),
"*": bin_op('*'),
"/": bin_op('/'),
+ "[": function(args) { return translate_expr(args[1]) + '[' + translate_expr(args[2]) + ']'; },
"hash": function(args) { return '{' + _.map(args.slice(1), translate_kv) + '}'; },
default : function(args) { return translate_expr(args[0]) + '(' + _.map(args.slice(1), translate_expr) + ')'; }
};
@@ -119,8 +120,8 @@ var dcrchart = (function() {
var statements = {
dimension: function(result, sexp) {
- result.decls.push(make_var(sexp[1]) + "ndx.dimension(function(d) { return " +
- translate_dimension(sexp[2]) + "; })");
+ result.decls.push(make_var(sexp[1]) + "ndx.dimension(" +
+ translate_expr(sexp[2]) + ")");
return result;
},
domain: function(result, sexp) {
Please sign in to comment.
Something went wrong with that request. Please try again.