aboutsummaryrefslogtreecommitdiffstats
path: root/QtVsTools.RegExpr/parser/Parser.cs
diff options
context:
space:
mode:
Diffstat (limited to 'QtVsTools.RegExpr/parser/Parser.cs')
-rw-r--r--QtVsTools.RegExpr/parser/Parser.cs6
1 files changed, 2 insertions, 4 deletions
diff --git a/QtVsTools.RegExpr/parser/Parser.cs b/QtVsTools.RegExpr/parser/Parser.cs
index e9394529..60c6a0f7 100644
--- a/QtVsTools.RegExpr/parser/Parser.cs
+++ b/QtVsTools.RegExpr/parser/Parser.cs
@@ -116,11 +116,9 @@ namespace QtVsTools.SyntaxAnalysis
foreach (var node in nodes.Where(n => n.Token != Pattern.Root)) {
// Get nodes captured by parent token
- Token parentToken;
- if (!node.Token.Parents.TryGetValue(node.CaptureId, out parentToken))
+ if (!node.Token.Parents.TryGetValue(node.CaptureId, out Token parentToken))
throw new ParseErrorException("Unknown capture ID");
- ParseTree.Node[] parentNodes;
- if (!nodesByToken.TryGetValue(parentToken, out parentNodes))
+ if (!nodesByToken.TryGetValue(parentToken, out ParseTree.Node[] parentNodes))
throw new ParseErrorException("Missing parent nodes");
// Find parent node
int idx = Array.BinarySearch(parentNodes, node, ParseTree.Node.Comparer);