LearnBoost/stylus — Issue #536: Bug: function name throws with "--" prefix
Author: jasonkuhrt
Created: 2012-01-20 15:00:12+00:00
State: open

This function

--test--moo()
color red

throws:

ParseError: /Users/KUHRT/code/artfox/app/assets/stylesheets/the-website/modules/ui.styl:59
55| .ui-label
56| user-select none
57|
58|
> 59| --test--moo()
60| color red
61|
62| // This is a technique to customize input[tpye=file] ui

unexpected "indent"

at Parser.error (/usr/local/lib/node_modules/stylus/lib/parser.js:158:11)
at Parser.stmt (/usr/local/lib/node_modules/stylus/lib/parser.js:564:32)
at Parser.statement (/usr/local/lib/node_modules/stylus/lib/parser.js:448:21)
at Parser.parse (/usr/local/lib/node_modules/stylus/lib/parser.js:137:23)
at Evaluator.visitImport (/usr/local/lib/node_modules/stylus/lib/visitor/evaluator.js:653:20)
at Evaluator. (/usr/local/lib/node_modules/stylus/lib/visitor/index.js:28:39)
at Evaluator.visit (/usr/local/lib/node_modules/stylus/lib/visitor/evaluator.js:74:18)
at Evaluator.visitBlock (/usr/local/lib/node_modules/stylus/lib/visitor/evaluator.js:516:39)
at Evaluator. (/usr/local/lib/node_modules/stylus/lib/visitor/index.js:28:39)
at Evaluator.visit (/usr/local/lib/node_modules/stylus/lib/visitor/evaluator.js:74:18)

For comparison this version of the function is fine:

-test--moo()
color red