ezno
ezno copied to clipboard
feat: Add import meta
This Fixes #140.
In this pr is implemented the expression import.meta
in parser and checker. Also fix some parsing errors related to dynamic import.
Primary features
import.meta
is setted to type ImportMeta
.
import.meta.env
is setted to type ImportEnv
.
Secondary fix
Before, dynamic import was searching OpenParentheses instead of CloseParentheses.
const _ = import("file");
^ Expected OpenParentheses, ...
Before, dynamic import search for string literals, but do nothing in other cases. After, dynamic import throws error if encounter another thing
This opens an issue. Limit dynamic import to string literals, no variables or expressions