ParseInternal() 개인적인 메소드

private ParseInternal ( string text, string sourceFilePath ) : void
text string
sourceFilePath string
리턴 void
예제 #1
0
파일: Template.cs 프로젝트: yzbai/scriban
        public static Template Parse(string text, string sourceFilePath = null, ParserOptions?parserOptions = null, LexerOptions?lexerOptions = null)
        {
            var template = new Template(parserOptions, lexerOptions, sourceFilePath);

            template.ParseInternal(text, sourceFilePath);
            return(template);
        }
예제 #2
0
 /// <summary>
 /// Parses the specified scripting text into a <see cref="Template"/> .
 /// </summary>
 /// <param name="text">The scripting text.</param>
 /// <param name="sourceFilePath">The source file path. Optional, used for better error reporting if the source file has a location on the disk</param>
 /// <param name="options">The templating parsing options.</param>
 /// <returns>A template</returns>
 public static Template Parse(string text, string sourceFilePath = null, ParserOptions options = null)
 {
     var template = new Template(options, sourceFilePath);
     template.ParseInternal(text, sourceFilePath);
     return template;
 }