Yuescript icon indicating copy to clipboard operation
Yuescript copied to clipboard

Disable syntax check for import path literal

Open fuzzko opened this issue 1 month ago • 1 comments

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.

fuzzko avatar Dec 07 '25 04:12 fuzzko

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.

pigpigyyy avatar Dec 08 '25 02:12 pigpigyyy