Beispiel #1
0
        public static TextBlock Parse(string str, out string errorString)
        {
            if (str == null)
            {
                throw new Exception("TextBlock: Parse: \"str\" is null.");
            }

            TextBlockParser parser = new TextBlockParser();

            parser.input           = str;
            parser.currentPosition = 0;
            parser.errorMessage    = null;
            parser.lineNumber      = 1;
            parser.output          = new TextBlock();
            if (!parser.NextToken(parser.output, true))
            {
                errorString = parser.errorMessage;
                return(null);
            }
            errorString = "";
            return(parser.output);
        }
Beispiel #2
0
 public static TextBlock Parse(string str, out string errorString)
 {
     return(TextBlockParser.Parse(str, out errorString));
 }