Skip to content

Allow var=; as valid syntax - #126

Closed
naclsn wants to merge 1 commit into
tree-sitter:masterfrom
naclsn:assignment-semi
Closed

naclsn wants to merge 1 commit into
tree-sitter:masterfrom
naclsn:assignment-semi

Conversation

@naclsn

@naclsn naclsn commented Jun 17, 2022

Copy link
Copy Markdown

The ; marks the end of a simple command and hence it is not that uncommon to use it to separate variable assignments too:

loop=; variables=; here=;
while [ ... ]
  do ...
done

This adds the ; as a valid character (along with whitespaces).
As an aside, technically the following characters can be used the same way: |, &, <, > (but I don't know who would...).

@amaanq amaanq mentioned this pull request Aug 12, 2023
@amaanq amaanq closed this Aug 13, 2023
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