Skip to content

Commit

Permalink
Fix $loc in yield* token
Browse files Browse the repository at this point in the history
  • Loading branch information
edemaine committed Jan 5, 2025
1 parent 9f1534a commit c07f970
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/parser.hera
Original file line number Diff line number Diff line change
Expand Up @@ -967,9 +967,8 @@ PipelineHeadItem

PipelineTailItem
( AwaitOp / Return / Throw ) !AccessStart !MaybeParenNestedExpression -> $1
Yield $( _? Star )? !AccessStart !MaybeParenNestedExpression ->
if (!$2) return $1
return { ...$1, token: $1.token + $2 }
$( Yield ( _? Star )? ) !AccessStart !MaybeParenNestedExpression ->
return { $loc, token: $1, type: "Yield" }
"import" !AccessStart ->
return {
type: "Identifier",
Expand Down

0 comments on commit c07f970

Please sign in to comment.