Skip to content

Commit

Permalink
Fixed bug in the stringify rule for spec versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jhnaldo committed Feb 25, 2022
1 parent 169296f commit d561212
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/esmeta/spec/util/Stringifier.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ object Stringifier {
val Spec(version, grammar, algorithms, tables, typeModel, _) = spec
val Grammar(prods, prodsForWeb) = grammar
val prodsBy = prods.groupBy(_.kind)
version.map(app >> _ >> LINE_SEP)
version.map(app >> "* version: " >> _ >> LINE_SEP)
app >> "* grammar:"
app :> " - productions: " >> prods.length
app :> " - lexical: " >> prodsBy(Lexical).length
Expand Down Expand Up @@ -67,7 +67,7 @@ object Stringifier {
// for versions of specifications
given versionRule: Rule[Spec.Version] = (app, version) =>
val Spec.Version(name, hash) = version
app >> version
app >> hash
if (name != hash) app >> " (" >> name >> ")" else app

// for grammars
Expand Down

0 comments on commit d561212

Please sign in to comment.