Skip to content

First line is somewhat special. Maybe it should be treated as such? #1107

@lenscas

Description

@lenscas

Currently when you compile a teal program it adds the code to load the compatibility library in the first line. Pushing whatever you wrote there way to the left.

This makes it pretty easy to miss that bit of code when looking at the compiled output. As such, maybe it isn't a bad idea for the compiler to emit a warning when this line is used?

In addition, Lua has support for a file to start with #!. This makes it possible to make a lua file that can just be executed from the terminal without invoking Lua yourself.

Teal has no way to emit this line nor a way to have it be inside the teal file as a way to invoke the teal compiler automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions