From 548c1cebfa487f3517e2fd0130311c7a265b45eb Mon Sep 17 00:00:00 2001 From: b3b00 Date: Tue, 16 Jul 2024 13:29:09 +0200 Subject: [PATCH] fix https://github.com/b3b00/cslycli/issues/36 --- .../parser/parser/llparser/EBNFRecursiveDescentSyntaxParser.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sly/parser/parser/llparser/EBNFRecursiveDescentSyntaxParser.cs b/src/sly/parser/parser/llparser/EBNFRecursiveDescentSyntaxParser.cs index dfba9019..0547b972 100644 --- a/src/sly/parser/parser/llparser/EBNFRecursiveDescentSyntaxParser.cs +++ b/src/sly/parser/parser/llparser/EBNFRecursiveDescentSyntaxParser.cs @@ -149,7 +149,7 @@ public override SyntaxParseResult Parse(IList> tokens, Rule ru else { node = new SyntaxNode( nonTerminalName, children); - node.Name = rule.NodeName ?? nonTerminalName; + node.Name = string.IsNullOrEmpty(rule.NodeName) ? nonTerminalName : rule.NodeName; node.ExpressionAffix = rule.ExpressionAffix; node = ManageExpressionRules(rule, node); result.Root = node;