|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Irony.Compiler;
using Irony.Runtime;
using System.Threading;
using Irony.Compiler.AST;
namespace WWWDSL
{
public class GotoJumpException : Exception
{
public Token LabelId { get; private set; }
public GotoJumpException(Token label)
{
LabelId = label;
}
}
public class LabelNode : AstNode
{
public LabelNode(NodeArgs args) : base(args)
{
}
}
public class GotoJumpNode : AstNode
{
private Token labelNode_;
public GotoJumpNode(NodeArgs args, AstNode labelNode)
: base(args)
{
ChildNodes.Clear();
labelNode_ = (Token)labelNode;
AddChild("label", labelNode_);
}
protected override void DoEvaluate(EvaluationContext context)
{
throw new GotoJumpException(labelNode_);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.