Skip to content

Add import statements #3

@WilliamRagstad

Description

@WilliamRagstad

Add a new compile-time statement to import models and handlers from other module files.
This feature requires new syntax and semantics to be implemented in the parser and WXModule file logic.
A new analysis pass should also be added to detect circular dependencies.

Below is a suggestion for import syntax:

import { Todo, renderTodo } from "./todos"
include "../common.webx"

It would be nice if module file paths could be located automatically based on the standardized file extensions .webx and .wx.
Also the ./ could be omitted.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions