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; }
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); }
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; }