Skip to content

Fix: Symbols starting with '--'#438

Merged
jeaye merged 2 commits into
jank-lang:mainfrom
stmonty:fix/symbol-starting-with-dash
Aug 31, 2025
Merged

Fix: Symbols starting with '--'#438
jeaye merged 2 commits into
jank-lang:mainfrom
stmonty:fix/symbol-starting-with-dash

Conversation

@stmonty

@stmonty stmonty commented Aug 31, 2025

Copy link
Copy Markdown
Contributor

Fixes #198

@stmonty stmonty requested a review from jeaye August 31, 2025 02:57

@jeaye jeaye left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, Monty. Hopefully we can get one more test. Aside from that, this is good to merge.

Comment on lines +1499 to +1507
SUBCASE("Symbol with double hyphen")
{
processor p{ "--a" };
native_vector<jtl::result<token, error_ref>> const tokens(p.begin(), p.end());
CHECK(tokens
== make_results({
token{ 0, 3, token_kind::symbol, "--a" }
}));
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just for my own sanity, would you mind adding one for --?

@stmonty stmonty requested a review from jeaye August 31, 2025 18:58
@jeaye jeaye merged commit af27b45 into jank-lang:main Aug 31, 2025
7 checks passed
@jeaye

jeaye commented Aug 31, 2025

Copy link
Copy Markdown
Member

Nice work, Monty!

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.

Symbol cannot start with --

2 participants