Skip to content

fix: add support for named param type $name #475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 14, 2025
Merged

Conversation

psteinroe
Copy link
Collaborator

What kind of change does this PR introduce?

closes #474

from #454 (comment)

@psteinroe psteinroe changed the title fix: add support for named param ala $name fix: add support for named param type $name Aug 12, 2025
match self.first() {
'$' => {
self.bump();
break self.dollar_quoted_string(start);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
break self.dollar_quoted_string(start);
return self.dollar_quoted_string(start);

Copy link
Collaborator

Choose a reason for hiding this comment

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

hat mich kurz irritiert, weil der breaked value ja auch aus der obrigen fn returned wird

start.push(c);
}
_ => {
break TokenKind::NamedParam {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
break TokenKind::NamedParam {
return TokenKind::NamedParam {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this would actually behave differently. we need break, and the value is then returned from the loop. with return, we would return the value from the function.

@psteinroe psteinroe merged commit e2bbe42 into main Aug 14, 2025
7 checks 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.

add support for $name in the lexer
2 participants