[vala/0.44] 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.44] parser: Don't include trailing semi-colon to ExpressionStatement
- Date: Wed, 1 May 2019 17:19:11 +0000 (UTC)
commit 9747ca40a7896ec37c16449a7a312ecd28c375da
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 2fcb92a99..93b3a7984 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -1880,8 +1880,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]