具体来说,我想调用{% if typeof(myvar) == "boolean" %}
or {% set a = parseInt(myvar) %}
,但现在它给出了这个错误:
SyntaxError: Unexpected token !== at Object.Function () at Object.precompile (/home/aidan/Desktop/nodejs/turbo/node_modules/swig/lib/swig.js:465:11) at Object.compile (/home /aidan/Desktop/nodejs/turbo/node_modules/swig/lib/swig.js:560:16) 在 Function.exports.swig.render (/home/aidan/Desktop/nodejs/turbo/node_modules/consolidate/lib/consolidate .js:246:56) 在 /home/aidan/Desktop/nodejs/turbo/node_modules/consolidate/lib/consolidate.js:146:25 在 /home/aidan/Desktop/nodejs/turbo/node_modules/consolidate/lib/ consolidate.js:99:5 at fs.js:266:14 at Object.oncomplete (fs.js:107:15)