public void Visit(JavascriptCode code, CommonTree tree) { SetLine(code, tree); Parent(tree).Children.Add(code); VisitChildren(tree); code.Code = ParseQuoteLiteral(tree.GetChild(0).Text); }
public void Invoke(LocatedElements elements, string value) => elements .ConstraintCount(c => c > 0) .Elements .ForEach( x => Context .Driver .ExecuteScriptWithArguments(JavascriptCode.SetValue(value), x));
/// <inheritdoc /> public override string ToLS(bool indent = true) { var writer = new BlockWriter(GetType(), indent, Disabled); writer .Label(Label) .Token("EXECUTEJS") .Literal(JavascriptCode.Replace("\r\n", " ").Replace("\n", " ")); if (!writer.CheckDefault(OutputVariable, "OutputVariable")) { writer .Arrow() .Token(IsCapture ? "CAP" : "VAR") .Literal(OutputVariable); } return(writer.ToString()); }
public void Visit(JavascriptCode code) { }