veged / xjst

Extensible JavaScript Transformations
http://veged.github.com/xjst/
203 stars 19 forks source link

applyNext() bug #13

Closed tadatuta closed 11 years ago

tadatuta commented 11 years ago
  1. Setup new project from https://github.com/bem/project-stub
  2. Add b-page.bemhtml width
block b-page {
     content: {
         elem: 'inner',
         content: this.ctx.content
     }
  }

It works fine.

  1. Change it to
block b-page {
     content: {
         elem: 'inner',
         content: applyNext()
     }
  }

results in error:

 20:20:31.643 - warn: *** HTTP error: 500, Error: xjst to js compilation failed:
  Error
     at new JS_Parse_Error (/Volumes/Macintosh_2/Sites/magicDesktop/bemhtml/node_modules/xjst/node_modules/uglify-js/lib/parse-js.js:263:18)
     at js_error (/Volumes/Macintosh_2/Sites/magicDesktop/bemhtml/node_modules/xjst/node_modules/uglify-js/lib/parse-js.js:271:11)
     at croak (/Volumes/Macintosh_2/Sites/magicDesktop/bemhtml/node_modules/xjst/node_modules/uglify-js/lib/parse-js.js:733:9)
     at token_error (/Volumes/Macintosh_2/Sites/magicDesktop/bemhtml/node_modules/xjst/node_modules/uglify-js/lib/parse-js.js:740:9)
     at expect_token (/Volumes/Macintosh_2/Sites/magicDesktop/bemhtml/node_modules/xjst/node_modules/uglify-js/lib/parse-js.js:753:9)
     at expect (/Volumes/Macintosh_2/Sites/magicDesktop/bemhtml/node_modules/xjst/node_modules/uglify-js/lib/parse-js.js:756:36)
     at object_ (/Volumes/Macintosh_2/Sites/magicDesktop/bemhtml/node_modules/xjst/node_modules/uglify-js/lib/parse-js.js:1158:17)
     at /Volumes/Macintosh_2/Sites/magicDesktop/bemhtml/node_modules/xjst/node_modules/uglify-js/lib/parse-js.js:1110:35
     at maybe_unary (/Volumes/Macintosh_2/Sites/magicDesktop/bemhtml/node_modules/xjst/node_modules/uglify-js/lib/parse-js.js:1209:19)
     at expr_ops (/Volumes/Macintosh_2/Sites/magicDesktop/bemhtml/node_modules/xjst/node_modules/uglify-js/lib/parse-js.js:1236:24)
     at Object.translate (/Volumes/Macintosh_2/Sites/magicDesktop/bemhtml/node_modules/bemc/lib/bemc.js:25:15)
     at exports.techMixin.getTranslatedTemplates (/Volumes/Macintosh_2/Sites/magicDesktop/bemhtml/.bem/techs/bemhtml.js:9:21)
     at exports.techMixin.getBuildResult (/Volumes/Macintosh_2/Sites/magicDesktop/bemhtml/.bem/techs/bemc.js:34:30)
     at _fulfilled (/Volumes/Macintosh_2/Sites/magicDesktop/node_modules/bem/node_modules/qq/node_modules/q/q.js:551:32)
     at makePromise.promise.promiseSend (/Volumes/Macintosh_2/Sites/magicDesktop/node_modules/bem/node_modules/qq/node_modules/q/q.js:271:38)
     at resolve.promiseSend.done (/Volumes/Macintosh_2/Sites/magicDesktop/node_modules/bem/node_modules/qq/node_modules/q/q.js:573:18)
  From previous event:
     at Array.reduce (native)
indutny commented 11 years ago

Fixed in xjst@0.3.16. Thanks