mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
LexParseException: No viable alternative at input (Regex(#"[ --�𐀀-\r\n\t]
#75
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @masp on GitHub (Feb 18, 2024).
Version
break.pklSee playground: https://pkl-playground.vercel.app/?share=individual-pure-stomach
Expected behavior
I would expect using
#"..."#would avoid any such issues with lexing, even if the characters are unprintable.Here's a stack trace from
pkl project package:@masp commented on GitHub (Feb 18, 2024):
Looking at the language spec more, I realize the issue is the
\nin the raw literal. To do a multiline raw literal, you need to use#"""..."""#instead. I'm leaving this open in case the error message can be improved to match what's reported with pkl eval.@stackoverflow commented on GitHub (Feb 19, 2024):
We plan to move out of ANTLR at some point which should improve parser errors. You are right that the message could be better.
@bioball commented on GitHub (Feb 21, 2024):
I'm going to close this as it's behaving correctly. We will improve these error messages when we manage to get off of ANTLR as our parser as Islon mentioned.