Esempio n. 1
0
        internal static SyntaxContext ReadContext(KeyValuePair <YamlNode, YamlNode> mapping, Dictionary <string, string> variables)
        {
            var result = new SyntaxContext(((YamlScalarNode)mapping.Key).Value);

            result.ParseMapping(mapping.Value as YamlSequenceNode, variables);
            return(result);
        }
Esempio n. 2
0
        internal static ContextReference ReadAnonymousMatchContextReference(YamlSequenceNode seq, Dictionary <string, string> variables)
        {
            var ctx = new SyntaxContext("__Anonymous__", new List <object> (), metaIncludePrototype: false);

            foreach (var c in seq.Children.OfType <YamlMappingNode> ())
            {
                ctx.ParseMapping(c, variables);
            }

            return(new AnonymousMatchContextReference(ctx));
        }