Long lines
This commit is contained in:
parent
a08919a522
commit
8f0e9ff029
1 changed files with 7 additions and 4 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue