[vala/wip/ricotz/lsp: 6/13] langserver: Handle ObjectCreationExpression calls.



commit 0bd5d6743cce65c183eb365e33135cd4bdd9d26d
Author: Princeton Ferro <princetonferro gmail com>
Date:   Wed Dec 25 18:49:51 2019 -0500

    langserver: Handle ObjectCreationExpression calls.

 vala/valaparser.vala | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/vala/valaparser.vala b/vala/valaparser.vala
index a0704b047..7c89f87a2 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -929,7 +929,13 @@ public class Vala.Parser : CodeVisitor {
                member.creation_member = true;
                bool extra_comma;
                var arg_list = parse_argument_list (out extra_comma);
-               expect (TokenType.CLOSE_PARENS);
+               if (context.keep_going) {
+                       if (!accept (TokenType.CLOSE_PARENS)) {
+                               report_parse_error (new ParseError.SYNTAX ("expected %s", 
TokenType.CLOSE_PARENS.to_string ()), false);
+                       }
+               } else {
+                       expect (TokenType.CLOSE_PARENS);
+               }
                var src = get_src (begin);
 
                var init_list = parse_object_initializer ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]