コード例 #1
0
def parse_and_instantiate(parent_to, text, indent):
    """Parses a snippet definition in UltiSnips format from 'text' assuming the
    current 'indent'. Will instantiate all the objects and link them as
    children to parent_to. Will also put the initial text into Vim."""
    all_tokens, seen_ts = tokenize_snippet_text(parent_to, text, indent,
            __ALLOWED_TOKENS, __ALLOWED_TOKENS, _TOKEN_TO_TEXTOBJECT)
    _resolve_ambiguity(all_tokens, seen_ts)
    _create_transformations(all_tokens, seen_ts)
    finalize(all_tokens, seen_ts, parent_to)
コード例 #2
0
ファイル: snipmate.py プロジェクト: endfighting/.vim
def parse_and_instantiate(parent_to, text, indent):
    """Parses a snippet definition in snipMate format from 'text' assuming the
    current 'indent'. Will instantiate all the objects and link them as
    children to parent_to. Will also put the initial text into Vim."""
    all_tokens, seen_ts = tokenize_snippet_text(
        parent_to, text, indent, __ALLOWED_TOKENS, __ALLOWED_TOKENS_IN_TABSTOPS, _TOKEN_TO_TEXTOBJECT
    )
    _create_mirrors(all_tokens, seen_ts)
    finalize(all_tokens, seen_ts, parent_to)
コード例 #3
0
ファイル: snipmate.py プロジェクト: oolong32/dotfiles
def parse_and_instantiate(parent_to, text, indent):
    """Parses a snippet definition in snipMate format from 'text' assuming the
    current 'indent'. Will instantiate all the objects and link them as
    children to parent_to. Will also put the initial text into Vim."""
    all_tokens, seen_ts = tokenize_snippet_text(parent_to, text, indent,
                                                __ALLOWED_TOKENS,
                                                __ALLOWED_TOKENS_IN_TABSTOPS,
                                                _TOKEN_TO_TEXTOBJECT)
    _create_mirrors(all_tokens, seen_ts)
    finalize(all_tokens, seen_ts, parent_to)
コード例 #4
0
ファイル: ultisnips.py プロジェクト: oolong32/dotfiles
def parse_and_instantiate(parent_to, text, indent):
    """Parses a snippet definition in UltiSnips format from 'text' assuming the
    current 'indent'. Will instantiate all the objects and link them as
    children to parent_to. Will also put the initial text into Vim."""
    all_tokens, seen_ts = tokenize_snippet_text(parent_to, text, indent,
                                                __ALLOWED_TOKENS,
                                                __ALLOWED_TOKENS,
                                                _TOKEN_TO_TEXTOBJECT)
    _resolve_ambiguity(all_tokens, seen_ts)
    _create_transformations(all_tokens, seen_ts)
    finalize(all_tokens, seen_ts, parent_to)