Skip to content

Commit

Permalink
Fix propRef of parser to pass test262 (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
d01c2 authored Jan 17, 2024
1 parent 5d7fe6e commit abf11b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/scala/esmeta/lang/util/Parser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,9 @@ trait Parsers extends IndentParsers {
}.named("lang.Reference")

// property references
lazy val propRef: PL[PropertyReference] = opt("the value of") ~> {
lazy val propRef: PL[PropertyReference] = opt(
"the" ~ opt("String") ~ "value" ~ opt("of"),
) ~> {
baseRef ~ prop ~ rep(prop) ^^ {
case base ~ p ~ ps =>
ps.foldLeft(PropertyReference(base, p))(PropertyReference(_, _))
Expand Down

0 comments on commit abf11b5

Please sign in to comment.