Commit Graph
19 Commits
Author SHA1 Message Date
Islon SchererandDan Chao c480cc8118 Fix bug in parsing of super expression (#1364) 2025-12-15 10:23:16 -08:00
Spencer Phillip YoungandJen Basch c63b8d3965 Fix newline checks in parser (#1328) 2025-12-03 09:45:28 -08:00
Spencer Phillip YoungandJen Basch 5516cdb210 Fix empty parenthesized type unexpected error (#1323) 2025-12-03 09:44:45 -08:00
Daniel ChaoandGitHub d29ae07e14 Fix formatting of argument lists (#1283)
This fixes several issues:

1. Leading/trailing line comments surrounding a lambda should make that
   lambda not "trailing", because the formatting otherwise looks bad and
   also isn't stable
2. Fix incorrect algorithm for detecting trailing lambda (currently,
   any number of lambdas makes the alg return `true`)
2025-11-03 09:15:58 -08:00
Islon SchererandGitHub 9469dd885d Handle trailing commas in types (#1272) 2025-10-30 13:36:56 +01:00
Jen BaschandGitHub 1d6261b263 Correctly handle trailing commas in function type literals in the generic parser (#1267) 2025-10-29 15:08:26 -07:00
fdb2bd8c75 Fix Lexer EOF sentinel collision with valid Unicode code points (#1251)
Fixes an issue where sentinel value (U+7FFF) occurring literally in the source could cause a premature termination of parsing, leading to potential EOF injection attacks.

---------

Co-authored-by: Dan Chao <dan.chao@apple.com>
2025-10-26 15:53:48 -07:00
Daniel ChaoandGitHub a8f76d6209 Adjust formatting of qualified access chains (#1252)
This adjusts formatting of qualified access chains so that leading
dot calls are kept in the same line if possible.
2025-10-24 16:48:21 -07:00
Daniel ChaoandGitHub 3223083324 Format interpolated expressions as single line (#1247)
This forces iterpolated expressions to be single-line, so that newline
literals within the bounds of two string delimiters can be seen as
verbatime newlines in the resulting string.

Edge case: in the case of a line comment, it's not possible to keep
this as a single line expression.
These are kept as multi-line expressions.

Also:

* Remove `ForceWrap`, this node is not used.
* Rename `StringConstant` -> `StringChars`
2025-10-24 03:23:41 -07:00
Islon SchererandGitHub f6d3fb1228 Fix let formatting (#1246) 2025-10-21 09:45:27 +02:00
Islon SchererandGitHub 222741dccd Fix broken test (#1208) 2025-09-17 13:53:15 -07:00
Islon SchererandGitHub fdc501a35c Implement canonical formatter (#1107)
CLI commands also added: `pkl format check` and `pkl format apply`.
2025-09-17 11:12:04 +02:00
Jen BaschandGitHub a8806416b9 Correctly handle EOF after unmatched backtick (#1187) 2025-08-25 14:31:26 -07:00
Jen BaschandGitHub ae5f02b285 Allow trailing commas in comma-separated syntax elements (#1137) 2025-08-21 06:43:38 -07:00
Islon SchererandGitHub ba82c5c6d6 Only allow shebangs in the beginning of a module (#1126) 2025-07-18 11:18:45 +02:00
Islon SchererandGitHub 3a35be6311 Remove ANTLR from the repo (#1114) 2025-07-08 09:43:35 +02:00
Jen BaschandGitHub dbf57280ba Fix crash due to parse error in module header (#1112) 2025-07-01 10:05:16 +02:00
Islon SchererandGitHub fe2e4aa1a4 Simplify precedence and associativity parsing (#1066) 2025-05-12 14:59:26 +02:00
Islon SchererandGitHub aad530b9a8 move parser out of pkl-core (#1024) 2025-03-18 20:23:53 +01:00