Exemplo n.º 1
0
        public void Visit(JavascriptCode code, CommonTree tree)
        {
            SetLine(code, tree);
            Parent(tree).Children.Add(code);
            VisitChildren(tree);

            code.Code = ParseQuoteLiteral(tree.GetChild(0).Text);
        }
Exemplo n.º 2
0
 public void Invoke(LocatedElements elements, string value)
 => elements
 .ConstraintCount(c => c > 0)
 .Elements
 .ForEach(
     x => Context
     .Driver
     .ExecuteScriptWithArguments(JavascriptCode.SetValue(value), x));
Exemplo n.º 3
0
        /// <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());
        }
Exemplo n.º 4
0
 public void Visit(JavascriptCode code)
 {
 }