Ejemplo n.º 1
0
 protected override void VisitProcessingInstructionFragment(HxlProcessingInstruction fragment)
 {
     // TODO This shouldn't be here (HxlDocument.CreatePI should init this)
     Activation.Initialize(fragment, HxlDirective.Parse(fragment.Data).Select(t => new KeyValuePair <string, object>(t.Key, t.Value)));
     fragment.GetInitCode("m", this, this.CurrentOutput);
     DoChildVisit(fragment, fragment.Target);
 }
Ejemplo n.º 2
0
        public HxlDirective Create(string directive)
        {
            if (directive == null)
            {
                throw new ArgumentNullException("directive");
            }
            if (directive.Length == 0)
            {
                throw Failure.EmptyString("directive");
            }

            var items = HxlDirective.Parse(directive).ToArray();

            if (items == null)
            {
                return(HxlDirective.Null);
            }

            Type type = GetDirectiveType(items[0].Key);

            if (type == null)
            {
                return(null);
            }

            throw new NotImplementedException();
            // return CreateDirectiveCore(type, items.Skip(1));
        }
Ejemplo n.º 3
0
 protected override void VisitDirective(HxlDirective directive)
 {
     // TODO Allow directives second pass preprocessing (emit code)
 }
Ejemplo n.º 4
0
 protected virtual void VisitDirective(HxlDirective directive)
 {
     DefaultVisit(directive);
 }
Ejemplo n.º 5
0
 void IHxlLanguageVisitor.Visit(HxlDirective directive)
 {
     VisitDirective(directive);
 }