Skip to content
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

String Interpolation #38

Closed
bichanna opened this issue Mar 9, 2022 · 4 comments · Fixed by #46
Closed

String Interpolation #38

bichanna opened this issue Mar 9, 2022 · 4 comments · Fixed by #46
Labels
discussion Just discussion enhancement New feature or request

Comments

@bichanna
Copy link
Owner

bichanna commented Mar 9, 2022

I'm still a newbie on creating languages, so I don't know how to implement string interpolation.
Do you guys have any idea?

let name = "bichanna";
println("Hello, ${name}");
@bichanna bichanna added enhancement New feature or request help wanted Extra attention is needed discussion Just discussion labels Mar 9, 2022
@bichanna
Copy link
Owner Author

bichanna commented Mar 9, 2022

Should I handle that in the lexer?

@GalaxianMonster
Copy link

Probably handle in runtime since it could also be "{dosomething()}"

@bichanna
Copy link
Owner Author

bichanna commented Mar 11, 2022

Probably handle in runtime since it could also be "{dosomething()}"

Yup. It may be better.

@bichanna bichanna reopened this Mar 12, 2022
@bichanna
Copy link
Owner Author

The comment by munificent (Bob) on Reddit is very informative. And I decided to follow that.

@bichanna bichanna removed the help wanted Extra attention is needed label Mar 12, 2022
@bichanna bichanna linked a pull request Mar 12, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Just discussion enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants