Block UI errors could generate 'undefined' instead of errors
- Vorherrschende Sprache
- Haskell
- Sterne
- 1.3k
- Forks
- 201
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Currently, missing blocks generate empty strings in codegen, leading to code that doesn't compile. Instead, they and other errors that break code generation could generate `undefined`, which would lead to runnable code. There are a few possibilities:
1. Generate the code with undefined, but still refuse to run it. I'd probably want to accompany this with different syntax highlighting for `undefined` to make it clear that it's a placeholder for an error.
2. Generate and actually run the code! Add a regexp matcher that replaces the resulting runtime errors with clearer ones and highlights or flashes the blocks that are responsible. This requires some kind of map from source locations to blocks, which could be tricky to build -- but which would also be awesome.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.