From abf11b5823cd42c72320cb0aa9f186153337d1ea Mon Sep 17 00:00:00 2001 From: Hyunjoon-Kim Date: Wed, 17 Jan 2024 11:19:05 +0900 Subject: [PATCH] Fix propRef of parser to pass test262 (#200) --- src/main/scala/esmeta/lang/util/Parser.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/scala/esmeta/lang/util/Parser.scala b/src/main/scala/esmeta/lang/util/Parser.scala index de15844c0f..e2ac8b761b 100644 --- a/src/main/scala/esmeta/lang/util/Parser.scala +++ b/src/main/scala/esmeta/lang/util/Parser.scala @@ -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(_, _))