ezno icon indicating copy to clipboard operation
ezno copied to clipboard

feat: Add import meta

Open Brayan-724 opened this issue 2 months ago • 0 comments

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

Brayan-724 avatar May 12 '24 07:05 Brayan-724