Exemplo n.º 1
0
 public ScopedDeclaration(Declaration decleration, Selector selector)
 {
     Decleration = decleration;
     Scope = new ScopedDeclarationRank(selector, decleration.Important);
 }
Exemplo n.º 2
0
 public ScopedDeclarationRank(Selector selector, bool IsImportant)
 {
     foreach (var s in selector.SimpleSelectors)
         Add(s);
     if (IsImportant)
         Important++;
 }
Exemplo n.º 3
0
        void selector(out Selector sel)
        {
            sel = new Selector();											// Build a C# Selector
            SimpleSelector ss = null;
            Combinator? cb = null;

            simpleselector(out ss);
            sel.SimpleSelectors.Add(ss);
            while (la.kind == 4) {
            Get();
            }
            while (StartOf(12)) {
            if (la.kind == 29 || la.kind == 30 || la.kind == 31) {
                if (la.kind == 29) {
                    Get();
                    cb = Combinator.PrecededImmediatelyBy;
                } else if (la.kind == 30) {
                    Get();
                    cb = Combinator.ChildOf;
                } else {
                    Get();
                    cb = Combinator.PrecededBy;
                }
            }
            while (la.kind == 4) {
                Get();
            }
            simpleselector(out ss);
            if (cb.HasValue) { ss.Combinator = cb.Value; }					// Set the combinator and selector
            sel.SimpleSelectors.Add(ss);

            cb = null;
            while (la.kind == 4) {
                Get();
            }
            }
        }