소스 검색

Rename create_parser_context with create_parser_state

tags/0.5.0-vsc
Sahab Yazdani 15 년 전
부모
커밋
cde6dc3332
1개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. +6
    -6
      mustache.js

+ 6
- 6
mustache.js 파일 보기

@@ -126,7 +126,7 @@ var Mustache = (function(undefined) {
} }


var default_tokenizer = /(\r?\n)|({{![\s\S]*?!}})|({{[#\^\/&{>=]?\s*\S*?\s*}?}})|({{=\S*?\s*\S*?=}})/; var default_tokenizer = /(\r?\n)|({{![\s\S]*?!}})|({{[#\^\/&{>=]?\s*\S*?\s*}?}})|({{=\S*?\s*\S*?=}})/;
function create_parser_context(template, partials, openTag, closeTag) {
function create_parser_state(template, partials, openTag, closeTag) {
openTag = openTag || '{{'; openTag = openTag || '{{';
closeTag = closeTag || '}}'; closeTag = closeTag || '}}';


@@ -267,7 +267,7 @@ var Mustache = (function(undefined) {
template = parserContext.partials[variable]; // remember what the partial was template = parserContext.partials[variable]; // remember what the partial was
parserContext.partials[variable] = noop; // avoid infinite recursion parserContext.partials[variable] = noop; // avoid infinite recursion
program = parse(create_parser_context(
program = parse(create_parser_state(
template template
, parserContext.partials , parserContext.partials
)); ));
@@ -296,7 +296,7 @@ var Mustache = (function(undefined) {
function section(parserContext) { function section(parserContext) {
function create_section_context(template) { function create_section_context(template) {
var context = create_parser_context(template,
var context = create_parser_state(template,
parserContext.partials, parserContext.partials,
parserContext.openTag, parserContext.openTag,
parserContext.closeTag); parserContext.closeTag);
@@ -349,7 +349,7 @@ var Mustache = (function(undefined) {
var o = [], var o = [],
user_send_func = function(str) { o.push(str); }; user_send_func = function(str) { o.push(str); };
parse(create_parser_context(hosFragment, partials))(context, user_send_func);
parse(create_parser_state(hosFragment, partials))(context, user_send_func);
return o.join(''); return o.join('');
})); }));
@@ -417,7 +417,7 @@ var Mustache = (function(undefined) {
throw new Error('Malformed change delimiter token: ' + token); throw new Error('Malformed change delimiter token: ' + token);
} }
var context = create_parser_context(
var context = create_parser_state(
parserContext.tokens.slice(parserContext.cursor+1).join('') parserContext.tokens.slice(parserContext.cursor+1).join('')
, parserContext.partials , parserContext.partials
, matches[1] , matches[1]
@@ -583,7 +583,7 @@ var Mustache = (function(undefined) {
} }
} }
var program = parse(create_parser_context(template, p));
var program = parse(create_parser_state(template, p));
return function(view, send_func) { return function(view, send_func) {
var o = [], var o = [],
user_send_func = send_func || function(str) { user_send_func = send_func || function(str) {


불러오는 중...
취소
저장