know which parenthesis isn't closed #15

Open
opened 2024-06-17 08:39:28 +02:00 by ni · 2 comments
ni commented 2024-06-17 08:39:28 +02:00 (Migrated from git.w21.org)

The Reader needs to track open/close parentheses in a stack of locations:
each open parenthesis pushes a location to the stack, each closed one pops one off the stack. The remaining locations on the stack are thoses of parentheses not yet closed.

I could use the size of that stack to set the prompt of the ConsoleReader to "(((> ", showing the number of still open parentheses. Nifty! (This is already done. But I am not quite sure if I want to keep that, as it is a bit distracting.)

The prompt change works, but knowing which parentheses aren't closed doesn't. Postponed for now.

The Reader needs to track open/close parentheses in a stack of locations: each open parenthesis pushes a location to the stack, each closed one pops one off the stack. The remaining locations on the stack are thoses of parentheses not yet closed. I could use the size of that stack to set the prompt of the ConsoleReader to "(((> ", showing the number of still open parentheses. Nifty! (This is already done. But I am not quite sure if I want to keep that, as it is a bit distracting.) The prompt change works, but knowing which parentheses aren't closed doesn't. Postponed for now.
ni commented 2024-06-17 08:40:19 +02:00 (Migrated from git.w21.org)

changed the description

changed the description
ni commented 2024-06-17 15:30:52 +02:00 (Migrated from git.w21.org)

changed the description

changed the description
ni self-assigned this 2026-05-07 17:55:09 +02:00
Sign in to join this conversation.
No description provided.