wu-lang / wu

🐉 A practical game and data language
https://wu-lang.gitbook.io/guide/
MIT License
467 stars 17 forks source link

how to escape quotes in a string? #47

Closed w1kee closed 1 year ago

w1kee commented 1 year ago

i have some code, that looks like this:

print("something \"something\" something else")

but when i compile i get this error:

Compiling init.wu

wrong: bumped into weird character
     --> ./init.wu
      │
    1 │ print("something \"something\" something else")
      │                             ^
  Finished things in 0ms

how can i fix the code?

evolbug commented 1 year ago

~Weird, that should have worked, I think the delimiter escape might be broken. You can try using ' delimited strings instead, like 'something "something" something else'~ ' delimited strings aren't a thing, sorry, I'll try and see why this is broken

evolbug commented 1 year ago

I have pushed a fix for it, the escapes were indeed broken, it should work if you try now

w1kee commented 1 year ago

Thanks!