Skip to content

[Typescript Compiler] Add for loops to typescript compiler #174

@atucker

Description

@atucker

The typescript compiler doesn't seem to handle for loops right now.

It seems like one way to handle it would be to:

  1. Make a new loop name
  2. Set up the iterator variable assignment once
  3. Set up the iterator variable increment in the body of the loop
  4. Set up the end condition computation, and jump back after

One issue I guess with adding for loops is that it's not super obvious which loops users should expect to work or not, and so it might create a lot of implied work (to handle other loops), but maybe a decent way of handling it would just be to see if the user seems to be using some type of loop, and have the error message explain which type of loop they can do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions