Fixed for MissingMethodException in Parser running

Aug 10, 2009 at 10:37 AM
Edited Aug 17, 2009 at 7:45 AM

if a NonTerminal instance as Parser.Root, and that permit nullable, the Compiler occars MissingMethodException in parsing.

The patch is to fix the problem.

 

Index: StatementListNode.cs
===================================================================
--- StatementListNode.cs (revision 31660)
+++ StatementListNode.cs (working copy)
@@ -19,9 +19,10 @@
namespace Irony.Scripting.Ast {

public class StatementListNode : AstNode {
-
- public StatementListNode(NodeArgs args) : base(args) { }

+ public StatementListNode() { }
+ public StatementListNode(NodeArgs args) : base(args) { }
+
public StatementListNode(NodeArgs args, AstNodeList statements) : base(args) {
ChildNodes.Clear();
foreach (AstNode stmt in statements)

 

Coordinator
Aug 11, 2009 at 5:23 PM

So as far as I undertstand, the node class was missing parameter-less (default) constructor, which is required for automatically created nodes.

Thanks for reporting this, the fix seems to be right

Roman