RioChndr / jaksel-language

Jaksel Script, Programming language very modern and Indonesian style
MIT License
926 stars 91 forks source link

Bugs when passing string literal into multi-parameter function call #41

Closed RayhanHamada closed 2 years ago

RayhanHamada commented 2 years ago

Currently i encounter some bugs when passing string literal into multi-parameter function call

Suppose we have a function that takes 3 parameters

so about fungsiMultiParam a b c
    spill "a: " + a
    spill "b: " + b
    spill "c: " + c
thats it sih

When fungsiMultiParam called like

call fungsiMultiParam "hello" 4 5

It outputs

a: hello
b: undefined // should be 4
c: undefined // should be 5

Or when i switch the position like such

call fungsiMultiParam 3 "hello" 5

It outputs

a: 3
b: undefined
c: undefined

It seems that only parse the first argument. Function with only one parameter works fine with string literal.

RayhanHamada commented 2 years ago

gonna make PR for this asap.