Yuescript
Yuescript copied to clipboard
Disable syntax check for import path literal
When adding any symbols except . to an import path literal, the compiler will complain about syntax error:
1: invalid import path literal, expected a dotted path like X.Y.Z
import x from "path:x"
This prevents for code reasoning, since the readers had to interpret what x = require "some custom path" is doing, or when they're trying to find specific import of x by searching import ... from.
Should be fixed in v0.30.3. I was massively refactoring the Yue parser these days, so just let me know if you find any more bad error message case.