Example #1
0
#!/usr/bin/python3
# -*- coding: utf8 -*-

from Python import syntax

syntax['name'] = 'Cython'
syntax['scopeName'] = 'source.cython'
syntax['fileTypes'] = ['pyx', 'pxi', 'pxd']
syntax['keyEquivalent'] = '^~C'
syntax['foldingStartMarker'] = (
    r'^\s*((cp?)?def|class|property|struct|enum|union)'
    r'\s+([.\w>]+)\s*(\((.*)\))?\s*:|\{\s*$|\(\s*$|\[\s*$|^\s*"""(?=.)(?!.*""")'
)
syntax['uuid'] = 'D085155B-E40A-40B3-8FEC-6865318CDEEA'

if __name__ == '__main__':
    import convert
    convert.dict_to_lang(
        dictionary = syntax,
        name  = 'Cython',
        path  = '~/Library/Application Support/Sublime Text 3/Packages/Cython',
        local = True
    )
Example #2
0
                    "beginCaptures": {1: {"name": "keyword.operator.negation.regex.python"}},
                    "patterns": [
                        {"include": "#regular_expressions_character_classes"},
                        {"include": "#regular_expressions_escaped_characters"}
                        # {
                        #    'name' : 'constant.other.character_class.special.regex.python',
                        #    'match': r'\]'
                        # }
                    ],
                    "end": r"\]",
                },
            ]
        },
        "regular_expressions_escaped_characters": {
            "name": "constant.character.escaped.special.regex.python",
            "match": r"\\(\?|\.|\*|\+|\{|\}|\||\(|\)|\[|\]|\^|\$)",
        },
    },
    "uuid": "851B1429-B8B4-4C1E-8030-399BDA994393",
}

if __name__ == "__main__":
    import convert

    convert.dict_to_lang(
        dictionary=syntax,
        name="Python",
        path="~/Library/Application Support/Sublime Text 3/Packages/Python/",
        local=True,
    )
Example #3
0
                            'match': r'\['
                        },
                        {'include': '#regular_expressions_character_classes'},
                        {'include': '#regular_expressions_escaped_characters'}

                    ],
                    'end': r'(?<!\\)\]'
                }
            ]
        },
        'regular_expressions_escaped_characters':
        {
            'name' : 'constant.character.escaped.special.regex.python3',
            'match': r'\\(\\|\?|\.|\*|\+|\{|\}|\||\(|\)|\[|\]|\^|\$)'
        }
    },
    'uuid': '851B1429-B8B4-4C1E-8030-399BDA994393'
}

if __name__ == '__main__':
    import convert
    rname = 'Python3'
    tname = 'Python3_TEST'
    convert.dict_to_lang(dictionary=syntax,
                         repo_fname=rname,
                         repo_dname=rname,
                         test_fname=tname,
                         test_dname=tname,
                         test_fpath='~/Library/Application Support/'
                                    'Sublime Text 3/Packages/User/{}/'.format(tname))
Example #4
0
            'string.interpolated.placeholder.c.11',
            'match':
            r'%(((ll?|t|h)?(d|i))|(ll?|z|j|h)?u|((\.\d*)?(l|L)?f)|[%csaeEoxXpngG])'
            # r'%(\(\w+\))?#?0?-?[ ]?\+?(\d*|\*)(\.(\d*|\*))?[hlLz]?[diouxXeEfFgGcrspn%]'
        },
        'escaped_characters': {
            'name': 'constant.character.escaped.special.c.11',
            'match': ESCAPED_CHARS
        },
        'escaped_unicode_characters': {
            # 16bit hex | 32bit hex
            'name': 'constant.character.escaped.c.11',
            'match': HEXADEC_CHARS
        }
    },
    'uuid':
    '8F217A3C-DD44-C9F6-8883-7FF1A89624CC'
}

if __name__ == '__main__':
    import convert
    rname = 'C11'
    tname = 'C_TEST'
    convert.dict_to_lang(dictionary=syntax,
                         repo_fname=rname,
                         repo_dname=rname,
                         test_fname=tname,
                         test_dname=tname,
                         test_fpath='~/Library/Application Support/'
                         'Sublime Text 3/Packages/User/C_TEST')