File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -549,6 +549,25 @@ name of compatibility, perhaps with a warning.)
549
549
arises from ` (set! pred char-hex?) ` in ` parse-number ` accepting hex exponent
550
550
digits, all of which are detected as invalid except for a trailing ` f ` when
551
551
processed by ` isnumtok_base ` .
552
+ * ` begin ` and ` end ` are not parsed as keywords when indexing. Typed comprehensions
553
+ initially look the same, but can be distinguished from indexing once we handle
554
+ a ` for ` token; it is safe to treat ` begin ` and ` end ` as keywords afterwards. The
555
+ reference parser * only* handles this well when there's a newline before ` for ` :
556
+ ``` julia
557
+ Any[foo (i)
558
+ for i in x if begin
559
+ true
560
+ end
561
+ ]
562
+ ```
563
+ works, while
564
+ ``` julia
565
+ Any[foo (i) for i in x if begin
566
+ true
567
+ end
568
+ ]
569
+ ```
570
+ does not. JuliaSyntax handles both cases.
552
571
553
572
## Parsing / AST oddities and warts
554
573
You can’t perform that action at this time.
0 commit comments