Skip to content

Commit

Permalink
Merge pull request #6 from JinDX/patch-2
Browse files Browse the repository at this point in the history
如果插入分号后成为空语句,就不插入分号。
  • Loading branch information
wintercn committed Jul 7, 2012
2 parents 27a66e1 + 59c3c62 commit b17890e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/SyntacticalParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function SyntacticalParser()
this.insertSymbol(new Symbol(";", ";"));
return this.insertSymbol(symbol);
}
if(!current[symbol.name] && current[";"] && current[";"]["$reduce"] && (haveLineTerminator || symbol.name == "}"))
if(!current[symbol.name] && current[";"] && current[";"]["$reduce"] && current[";"]["$reduce"] != "EmptyStatement" && (haveLineTerminator || symbol.name == "}"))
{
this.insertSymbol(new Symbol(";", ";"));
return this.insertSymbol(symbol);
Expand Down

0 comments on commit b17890e

Please sign in to comment.