robertkrimen / otto

A JavaScript interpreter in Go (golang)
http://godoc.org/github.com/robertkrimen/otto
MIT License
8.04k stars 584 forks source link

fix: allow semicolon in nested do-while statements. #463

Closed stevenh closed 1 year ago

stevenh commented 1 year ago

In nested do-while statements, a semicolon after the inner while threw a parsing error. This change checks for the optional semicolon.

Fixes #309