// MarkupExtension ::= '{' TYPENAME Arguments? '}' // Arguments ::= (PositionalArgs ( ',' NamedArgs)?) | NamedArgs // NamedArgs ::= NamedArg ( ',' NamedArg )* // NamedArg ::= PROPERTYNAME '=' (STRING | QUOTEDMARKUPEXTENSION | MarkupExtension) // PositionalArgs ::= (Value (',' PositionalArgs)?) | NamedArg // Value ::= STRING | QUOTEDMARKUPEXTENSION |MarkupExtension public IEnumerable <XamlNode> Parse(string text, int lineNumber, int linePosition) { _tokenizer = new MeScanner(_context, text, lineNumber, linePosition); _originalText = text; Found f = new Found(); NextToken(); foreach (XamlNode node in P_MarkupExtension(f)) { yield return(node); } if (!f.found) { string brokenRule = _brokenRule; _brokenRule = null; throw new XamlParseException(_tokenizer, brokenRule); } if (_tokenizer.Token != MeTokenType.None) { throw new XamlParseException(_tokenizer, SR.Get(SRID.UnexpectedTokenAfterME)); } if (_tokenizer.HasTrailingWhitespace) { throw new XamlParseException(_tokenizer, SR.Get(SRID.WhitespaceAfterME)); } }
public IEnumerable <XamlNode> Parse(string text, int lineNumber, int linePosition) { this._tokenizer = new MeScanner(this._context, text, lineNumber, linePosition); this._originalText = text; Found f = new Found(); this.NextToken(); foreach (XamlNode iteratorVariable1 in this.P_MarkupExtension(f)) { yield return(iteratorVariable1); } if (!f.found) { string message = this._brokenRule; this._brokenRule = null; throw new XamlParseException(this._tokenizer, message); } if (this._tokenizer.Token != MeTokenType.None) { throw new XamlParseException(this._tokenizer, System.Xaml.SR.Get("UnexpectedTokenAfterME")); } if (this._tokenizer.HasTrailingWhitespace) { throw new XamlParseException(this._tokenizer, System.Xaml.SR.Get("WhitespaceAfterME")); } }
public IEnumerable<XamlNode> Parse(string text, int lineNumber, int linePosition) { this._tokenizer = new MeScanner(this._context, text, lineNumber, linePosition); this._originalText = text; Found f = new Found(); this.NextToken(); foreach (XamlNode iteratorVariable1 in this.P_MarkupExtension(f)) { yield return iteratorVariable1; } if (!f.found) { string message = this._brokenRule; this._brokenRule = null; throw new XamlParseException(this._tokenizer, message); } if (this._tokenizer.Token != MeTokenType.None) { throw new XamlParseException(this._tokenizer, System.Xaml.SR.Get("UnexpectedTokenAfterME")); } if (this._tokenizer.HasTrailingWhitespace) { throw new XamlParseException(this._tokenizer, System.Xaml.SR.Get("WhitespaceAfterME")); } }
internal XamlParseException(MeScanner meScanner, string message) : base(message, null, meScanner.LineNumber, meScanner.LinePosition) { }