Skip to content

Parse input/output lines that contain an expression - #24

Merged
mikebarkmin merged 1 commit into
openpatch:mainfrom
mattibat:fix/output-expression
Sep 28, 2026
Merged

mikebarkmin merged 1 commit into
openpatch:mainfrom
mattibat:fix/output-expression

Conversation

@mattibat

Copy link
Copy Markdown
Contributor

The input/output regex didn't allow quotes inside the parentheses, so output("Hello " + name) (the example from the docs and the editor demo) was parsed as a plain statement, and Python got output("Hello " + name) verbatim.

Now:

  • It is parsed as an input/output node. A lone string literal still loses its quotes as before; anything else is kept as written.
  • treeToPseudocode no longer wraps text that already contains quotes, so the pseudocode stays stable when switching between diagram and code.

Every line that was recognized before parses to the same node and serializes to the same pseudocode.

@mikebarkmin

Copy link
Copy Markdown
Member

thx

@mikebarkmin
mikebarkmin merged commit 0d729a3 into openpatch:main Sep 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants