From 68a546f16b6dc89f05d8f81b64182ad2f54d27e5 Mon Sep 17 00:00:00 2001 From: Joseph Guenther Date: Thu, 26 Oct 2023 22:43:15 -0400 Subject: [PATCH] Fix state bug --- DeveloperCore.REPL/DeveloperCore.REPL.vbproj | 10 +++++----- DeveloperCore.REPL/REPL.vb | 4 ++-- VBRepl/VBRepl.vbproj | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/DeveloperCore.REPL/DeveloperCore.REPL.vbproj b/DeveloperCore.REPL/DeveloperCore.REPL.vbproj index 178589a..8dc684c 100644 --- a/DeveloperCore.REPL/DeveloperCore.REPL.vbproj +++ b/DeveloperCore.REPL/DeveloperCore.REPL.vbproj @@ -6,11 +6,11 @@ - - - - - + + + + + diff --git a/DeveloperCore.REPL/REPL.vb b/DeveloperCore.REPL/REPL.vb index a0af855..c3c923f 100644 --- a/DeveloperCore.REPL/REPL.vb +++ b/DeveloperCore.REPL/REPL.vb @@ -58,9 +58,9 @@ Public Class REPL For Each var As VariableDeclaratorSyntax In vars Dim name As String = var.Names.First.Identifier.Text If Not _state.ContainsKey(name) Then - varUpdates.Add(SyntaxFactory.ExpressionStatement(SyntaxFactory.ParseExpression($"{stateName}.Add(""{name}"", {name})"))) + varUpdates.Add(SyntaxFactory.ParseExecutableStatement($"{stateName}.Add(""{name}"", {name})")) Else - varUpdates.Add(SyntaxFactory.ExpressionStatement(SyntaxFactory.ParseExpression($"{stateName}(""{name}"") = {name}"))) + varUpdates.Add(SyntaxFactory.ParseExecutableStatement($"{stateName}(""{name}"") = {name}")) End If Next method = method.WithStatements(method.Statements.InsertRange(retIndex, varUpdates)) diff --git a/VBRepl/VBRepl.vbproj b/VBRepl/VBRepl.vbproj index 2356592..533a446 100644 --- a/VBRepl/VBRepl.vbproj +++ b/VBRepl/VBRepl.vbproj @@ -7,9 +7,9 @@ - - - + + +