Skip to content

Commit

Permalink
fix(traversal): dereference should have an optional Identifier, not S…
Browse files Browse the repository at this point in the history
…tring
  • Loading branch information
sgulseth committed Aug 26, 2024
1 parent 8d48295 commit ba1c8ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/08-traversal-operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ EvaluateProjection(base, scope):

## Dereference traversal

Dereference : `->` String?
Dereference : `->` Identifier?

EvaluateDereference(base, scope):

Expand All @@ -170,8 +170,8 @@ EvaluateDereference(base, scope):
- If {Equal(ref, id)} is {true}:
- Set {result} to {document}.
- Stop the loop.
- If the dereference expression contains a {String}:
- Let {name} be the string value of the {String}.
- If the dereference expression contains a {Identifier}:
- Let {name} be the string value of the {Identifier}.
- If {result} is an object and contains an attribute {name}:
- Return the {value} of the attribute {name} in {result}.
- Otherwise:
Expand Down

0 comments on commit ba1c8ef

Please sign in to comment.