コード例 #1
0
ファイル: MePullParser.cs プロジェクト: Athari/Alba.Jaml
 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, SR.Get("UnexpectedTokenAfterME"));
     }
     if (this._tokenizer.HasTrailingWhitespace) {
         throw new XamlParseException(this._tokenizer, SR.Get("WhitespaceAfterME"));
     }
 }
コード例 #2
0
 internal XamlParseException (MeScanner meScanner, string message)
     : base(message, null, meScanner.LineNumber, meScanner.LinePosition)
 {}