If/else chaining requires multiple "end" keywords

This issue has been tracked since 2022-08-08.

The documentation says "You can chain if/else commands together in the usual manner." I understand "the usual manner" is to either allow "if ... else if ... else if ... else ... end" or to have a separate "elif", "elsif", "elseif" or similar keyword for chaining. Instead of chaining, the Hyperscript implementation seems to require nesting. Because "end" can sometimes but not always be elided, this is not always clear but can result in parse errors in following code.

Example: https://jsfiddle.net/_jks/hsqtw243/

This outputs an error message in the console that includes "Expected 'end' but found 'catch'".

Fixed example: https://jsfiddle.net/_jks/hsqtw243/3/

Note how the "end end" allows parsing to continue as a clue that the statements are nested instead of chained.

More Details About Repo
Owner Name bigskysoftware
Repo Name _hyperscript
Full Name bigskysoftware/_hyperscript
Language JavaScript
Created Date 2020-05-27
Updated Date 2022-11-25
Star Count 1265
Watcher Count 18
Fork Count 75
Issue Count 86


Issue Title Created Date Updated Date