comparison trunk/src/Parser.d @ 187:c977b8a78507

- Added code for parsing ExpressionStatement.
author aziz
date Sat, 14 Jul 2007 18:34:02 +0000
parents d4292a5a7b8b
children 5c6ebf9f60a9
comparison
equal deleted inserted replaced
186:d4292a5a7b8b 187:c977b8a78507
1213 default: 1213 default:
1214 goto case_Declaration; 1214 goto case_Declaration;
1215 } 1215 }
1216 assert(0); 1216 assert(0);
1217 default: 1217 default:
1218 // TODO: issue error msg and return IllegalStatement. 1218 bool failed;
1219 auto expression = try_(parseExpression(), failed);
1220 if (!failed)
1221 {
1222 require(T.Semicolon);
1223 s = new ExpressionStatement(expression);
1224 }
1225 else
1226 {
1227 // TODO: issue error msg and return IllegalStatement.
1228 }
1219 } 1229 }
1220 return s; 1230 return s;
1221 } 1231 }
1222 1232
1223 /+ 1233 /+