[vala/0.36] parser: Don't include trailing semi-colon to ExpressionStatement
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.36] parser: Don't include trailing semi-colon to ExpressionStatement
- Date: Tue, 13 Aug 2019 15:18:53 +0000 (UTC)
commit b4ac913d71a053146059800642906ab2337cebb7
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Apr 10 14:12:21 2019 +0200
parser: Don't include trailing semi-colon to ExpressionStatement
vala/valaparser.vala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/vala/valaparser.vala b/vala/valaparser.vala
index a4345bf6e..aa290e084 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -1866,8 +1866,9 @@ public class Vala.Parser : CodeVisitor {
Statement parse_expression_statement () throws ParseError {
var begin = get_location ();
var expr = parse_statement_expression ();
+ var src = get_src (begin);
expect (TokenType.SEMICOLON);
- return new ExpressionStatement (expr, get_src (begin));
+ return new ExpressionStatement (expr, src);
}
Expression parse_statement_expression () throws ParseError {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]