Code coverage report for sc/lang/compiler/parser/hashed-expr.js

Statements: 100% (10 / 10)      Branches: 100% (4 / 4)      Functions: 100% (2 / 2)      Lines: 100% (10 / 10)      Ignored: none     

All files » sc/lang/compiler/parser/ » hashed-expr.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 261     1   1             1 14   14 9   5 4     1      
(function(sc) {
  "use strict";
 
  require("./parser");
 
  var Parser = sc.lang.compiler.Parser;
 
  /*
    HashedExpression :
      ImmutableListExpression
      ClosedFunctionExpression
  */
  Parser.addParseMethod("HashedExpression", function() {
    var token = this.expect("#");
 
    if (this.match("[")) {
      return this.unlex(token).parseImmutableListExpression();
    }
    if (this.match("{")) {
      return this.unlex(token).parseClosedFunctionExpression();
    }
 
    return this.throwUnexpected(token);
  });
})(sc);