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

fix/better call argument with string literal #42

Merged
merged 2 commits into from Apr 23, 2022

Conversation

RayhanHamada
Copy link
Contributor

@RayhanHamada RayhanHamada commented Apr 22, 2022

This PR should fix #41

This allows passing string into multi-parameter function

Suppose we have function that takes 3 parameters

so about fungsiMultiParam a b c
    spill "argumen pertama: " + a
    spill "argumen kedua: " + b
    spill "argumen ketiga: " + c
thats it sih

when we call

literally nama2 itu "budi"

call fungsiMultiParam 2 nama2 "hello world"

it should outputs

argumen pertama: 2
argumen kedua: budi
argumen ketiga: hello world

it also support escaping quotes inside string literal

literally nama2 itu "budi"

call fungsiMultiParam 3 nama2 "and then Romeo says \"I love you\" to Juliet"

it should outputs

argumen pertama: 2
argumen kedua: budi
argumen ketiga: and then Romeo says "I love you" to Juliet

@RayhanHamada RayhanHamada changed the title Feat/better call argument fix/better call argument Apr 22, 2022
@RayhanHamada RayhanHamada changed the title fix/better call argument fix/better call argument with string literal Apr 22, 2022
@RioChndr
Copy link
Owner

Great. Thank you for this patch.

@RioChndr RioChndr merged commit d0dc2f2 into RioChndr:main Apr 23, 2022
@RayhanHamada RayhanHamada deleted the feat/better-call-argument branch April 23, 2022 10:24
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.

Bugs when passing string literal into multi-parameter function call
2 participants