|
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 PostDataItemNode : AstNode
{
private AstNode paramNode_;
private AstNode valueNode_;
public PostDataItemNode(NodeArgs args, AstNode paramNode, AstNode valueNode)
: base(args)
{
ChildNodes.Clear();
paramNode_ = paramNode;
if (paramNode_ is VarRefNode)
{
paramNode_.Flags |= AstNodeFlags.AllocateSlot | AstNodeFlags.NotRValue;
}
AddChild("param", paramNode_);
valueNode_ = valueNode;
if (valueNode_ is VarRefNode)
{
valueNode_.Flags |= AstNodeFlags.AllocateSlot | AstNodeFlags.NotRValue;
}
AddChild("value", valueNode_);
}
protected override void DoEvaluate(EvaluationContext context)
{
paramNode_.Evaluate(context);
string left = (string)context.CurrentResult;
valueNode_.Evaluate(context);
string right = (string)context.CurrentResult;
context.CurrentResult = left + "=" + right;
}
}
}
|
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.