1
Fork 0

Long lines

This commit is contained in:
Brian Anderson 2012-09-26 18:23:05 -07:00
parent a08919a522
commit 8f0e9ff029

View file

@ -2285,7 +2285,8 @@ impl parser {
let stmt = self.parse_stmt(initial_attrs); let stmt = self.parse_stmt(initial_attrs);
initial_attrs = ~[]; initial_attrs = ~[];
match stmt.node { match stmt.node {
stmt_expr(e, stmt_id) => { // Expression without semicolon: stmt_expr(e, stmt_id) => {
// Expression without semicolon
match self.token { match self.token {
token::SEMI => { token::SEMI => {
self.bump(); self.bump();
@ -2297,9 +2298,11 @@ impl parser {
} }
t => { t => {
if classify::stmt_ends_with_semi(*stmt) { if classify::stmt_ends_with_semi(*stmt) {
self.fatal(~"expected `;` or `}` after \ self.fatal(
expression but found `" ~"expected `;` or `}` after \
+ token_to_str(self.reader, t) + ~"`"); expression but found `"
+ token_to_str(self.reader, t)
+ ~"`");
} }
stmts.push(stmt); stmts.push(stmt);
} }