private XamlElement Parse()
        {
            this.tokens = new ReadOnlyStack <Token>(lexer.GetTokens(text));

            XamlElement root = MatchElement();

            if (!tokens.IsEmpty)
            {
                throw new Granular.Exception("Can't parse \"{0}\", end of stream is expected at index {1}", text, tokens.Peek().Start);
            }

            return(root);
        }
        public IEnumerable<IPropertyPathElement> Parse()
        {
            this.tokens = new ReadOnlyStack<Token>(lexer.GetTokens(text));

            List<IPropertyPathElement> elements = new List<IPropertyPathElement>();

            elements.Add(MatchElement(namespaces));

            while (!tokens.IsEmpty)
            {
                MatchTerminal(".");
                elements.Add(MatchElement(namespaces));
            }

            return elements;
        }
Exemple #3
0
        public IEnumerable <IPropertyPathElement> Parse()
        {
            this.tokens = new ReadOnlyStack <Token>(lexer.GetTokens(text));

            List <IPropertyPathElement> elements = new List <IPropertyPathElement>();

            elements.Add(MatchElement(namespaces));

            while (!tokens.IsEmpty)
            {
                MatchTerminal(".");
                elements.Add(MatchElement(namespaces));
            }

            return(elements);
        }
Exemple #4
0
 internal Channel()
 {
     _stack = ReadOnlyStack <SnapshotLineRange> .Empty;
 }
        private XamlElement Parse()
        {
            this.tokens = new ReadOnlyStack<Token>(lexer.GetTokens(text));

            XamlElement root = MatchElement();

            if (!tokens.IsEmpty)
            {
                throw new Granular.Exception("Can't parse \"{0}\", end of stream is expected at index {1}", text, tokens.Peek().Start);
            }

            return root;
        }