filename
not set in nodes of the root ast when doing Evaluator.evaluate()
#2699
Labels
filename
not set in nodes of the root ast when doing Evaluator.evaluate()
#2699
Disclaimer : I don't know the stylus code base enough to tell if this is a bug or a feature...
To reproduce:
Current behavior:
evaluator.global.scope.locals.aaa.filename
is nullExpected behavior:
evaluator.global.scope.locals.aaa.filename
should be "virtual_file.styl"Environment information:
stylus
version: 0.58.1nodejs
version: 16.9.1Since you can pass a "filename" as option to the
Evaluator
, I would expect it to be used when generating nodes from the ast given as constructor argument. That may also be used to distinguish builtin / js-provided globals from the one declared in the stylus code.What conforts me into thinking it's a bug is that setting
filename
to null as option could then result in the current behavior.The text was updated successfully, but these errors were encountered: