Skip to content

Require commas between moshscript arguments - #6

Merged
ralyodio merged 1 commit into
moshcoder:mainfrom
aiirvizionz:clientkit/require-arg-commas
Jul 11, 2026
Merged

Require commas between moshscript arguments#6
ralyodio merged 1 commit into
moshcoder:mainfrom
aiirvizionz:clientkit/require-arg-commas

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Fixes another moshscript parser edge case: call arguments were accepted without commas even though the documented grammar requires comma-separated arguments.

Before this change, say("one" "two"); parsed as two arguments instead of failing. The parser also accepted leading and trailing commas in calls.

This PR makes argument parsing explicit:

  • rejects missing commas between arguments
  • rejects leading commas
  • rejects trailing commas
  • keeps valid comma-separated calls working

Validation:

  • npm test
  • node bin/moshcode.mjs run examples/alive.mosh --dry-run --max 1
  • git diff --check

@ralyodio
ralyodio merged commit 1800d12 into moshcoder:main Jul 11, 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