9 changed files with 103 additions and 26 deletions
@ -0,0 +1,35 @@
@@ -0,0 +1,35 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.Reporting.PageBuilder.ExportColumns; |
||||
using Irony.Ast; |
||||
using Irony.Interpreter; |
||||
using Irony.Interpreter.Ast; |
||||
using Irony.Parsing; |
||||
|
||||
namespace ICSharpCode.Reporting.Expressions.Irony.Ast |
||||
{ |
||||
/// <summary>
|
||||
/// Description of FieldsNode.
|
||||
/// </summary>
|
||||
public class FieldsNode: AstNode |
||||
{ |
||||
AstNode fieldNode; |
||||
|
||||
public override void Init(AstContext context,ParseTreeNode treeNode) |
||||
{ |
||||
base.Init(context, treeNode); |
||||
var nodes = treeNode.GetMappedChildNodes(); |
||||
fieldNode = AddChild("Args", nodes[2]); |
||||
} |
||||
|
||||
protected override object DoEvaluate(ScriptThread thread) |
||||
{ |
||||
thread.CurrentNode = this; //standard prolog
|
||||
var c = thread.GetCurrentContainer(); |
||||
var cc = (ExportText)c.ExportedItems.Where(x => x.Name == fieldNode.AsString).FirstOrDefault(); |
||||
return cc.Text; |
||||
} |
||||
} |
||||
} |
||||
Loading…
Reference in new issue