Skip to content

Clarify command parsing with ##5370

Open
Kratacoa wants to merge 1 commit intomawww:masterfrom
Kratacoa:master
Open

Clarify command parsing with ##5370
Kratacoa wants to merge 1 commit intomawww:masterfrom
Kratacoa:master

Conversation

@Kratacoa
Copy link
Copy Markdown

@Kratacoa Kratacoa commented Aug 9, 2025

Not sure if this is the best way of specifying that, so corrections are welcome.

== Comments parsing

Commands are commented out after `#` until end of line (not `;`).
`#` takes effect _after_ the expansions are parsed.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds incorrect to me, decl str foo 'foo # bar'; echo %opt{foo} does echo foo # bar, or maybe you meant something different with "after the expansions are parsed"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant that it's only executed, if it is, only after the expansions are parsed. But reading this again and after your observation, it's clearly poorly worded.

How about:
The parsing of strings and expansions happens before # is evaluated as commenting out the rest of the line, hence its meaning might change according to command-parsing.

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