static IRenderizable ParseBlock(Token currentToken, List <Token> tokens, ref int index, Template mainTemplate) { var item = new TemplateBlock(); var nextToken = tokens [index]; if (nextToken.Type != TokenType.Parameter) { throw new TemplateException(string.Format("Invalid include at: {0}. Name not specified", currentToken.Position)); } item.Path = nextToken.Value.Trim(); item.MainTemplate = mainTemplate; item.Body = Parse(mainTemplate, tokens, ref index); return(item); }
static IRenderizable ParseBlock(Token currentToken, List<Token> tokens, ref int index, Template mainTemplate) { var item = new TemplateBlock(); var nextToken = tokens [index]; if (nextToken.Type != TokenType.Parameter) { throw new TemplateException(string.Format("Invalid include at: {0}. Name not specified", currentToken.Position)); } item.Path = nextToken.Value.Trim(); item.MainTemplate = mainTemplate; item.Body = Parse(mainTemplate, tokens, ref index); return item; }