-
Notifications
You must be signed in to change notification settings - Fork 0
Error Handling and Diagnostics
egyptron edited this page Sep 25, 2026
·
2 revisions
Awake Simple S1 incorporates an intelligent runtime diagnostic engine powered by the Levenshtein Distance algorithm. It checks every line against canonical command patterns before execution.
The engine uses ANSI terminal coloring:
- Errors & Typos: Bold Red
- Did-You-Mean Suggestions: Bold Green
- Warnings: Bold Yellow
If a command contains a spelling mistake or typo, the engine calculates string similarity and recommends the correct syntax.
disply("Hello World!")
========================================================
SYNTAX ERROR on line 1:
"disply("Hello World!")" is not recognized;
did you mean "display("...")"?
========================================================
If a line cannot be matched to any language command or property:
xyz_completely_random_statement
========================================================
SYNTAX ERROR on line 1:
"xyz_completely_random_statement" is not recognized
========================================================
The validator also inspects lines inside window templates:
show window template "rpg-battle":
player_hp = 100
finish window;
========================================================
SYNTAX ERROR on line 2:
"playr_hp = 100" is not recognized;
did you mean "player_hp = <number>"?
========================================================