{
	"information_for_contributors": [
		"This file has been converted from https://github.com/dotnet/csharp-tmLanguage/blob/master/grammars/csharp.tmLanguage",
		"If you want to provide a fix or improvement, please create a pull request against the original repository.",
		"Once accepted there, we are happy to receive an update request."
	],
	"version": "https://github.com/dotnet/csharp-tmLanguage/commit/16612717ccd557383c0c821d7b6ae6662492ffde",
	"name": "C#",
	"scopeName": "source.cs",
	"patterns": [
		{
			"include": "#preprocessor"
		},
		{
			"include": "#comment"
		},
		{
			"include": "#directives"
		},
		{
			"include": "#declarations"
		},
		{
			"include": "#script-top-level"
		}
	],
	"repository": {
		"directives": {
			"patterns": [
				{
					"include": "#extern-alias-directive"
				},
				{
					"include": "#using-directive"
				},
				{
					"include": "#attribute-section"
				},
				{
					"include": "#punctuation-semicolon"
				}
			]
		},
		"declarations": {
			"patterns": [
				{
					"include": "#namespace-declaration"
				},
				{
					"include": "#type-declarations"
				},
				{
					"include": "#punctuation-semicolon"
				}
			]
		},
		"script-top-level": {
			"patterns": [
				{
					"include": "#method-declaration"
				},
				{
					"include": "#statement"
				},
				{
					"include": "#punctuation-semicolon"
				}
			]
		},
		"type-declarations": {
			"patterns": [
				{
					"include": "#preprocessor"
				},
				{
					"include": "#comment"
				},
				{
					"include": "#storage-modifier"
				},
				{
					"include": "#class-declaration"
				},
				{
					"include": "#delegate-declaration"
				},
				{
					"include": "#enum-declaration"
				},
				{
					"include": "#interface-declaration"
				},
				{
					"include": "#record-declaration"
				},
				{
					"include": "#struct-declaration"
				},
				{
					"include": "#attribute-section"
				},
				{
					"include": "#punctuation-semicolon"
				}
			]
		},
		"class-or-struct-members": {
			"patterns": [
				{
					"include": "#preprocessor"
				},
				{
					"include": "#comment"
				},
				{
					"include": "#storage-modifier"
				},
				{
					"include": "#type-declarations"
				},
				{
					"include": "#property-declaration"
				},
				{
					"include": "#field-declaration"
				},
				{
					"include": "#event-declaration"
				},
				{
					"include": "#indexer-declaration"
				},
				{
					"include": "#variable-initializer"
				},
				{
					"include": "#constructor-declaration"
				},
				{
					"include": "#destructor-declaration"
				},
				{
					"include": "#operator-declaration"
				},
				{
					"include": "#conversion-operator-declaration"
				},
				{
					"include": "#method-declaration"
				},
				{
					"include": "#attribute-section"
				},
				{
					"include": "#punctuation-semicolon"
				}
			]
		},
		"interface-members": {
			"patterns": [
				{
					"include": "#preprocessor"
				},
				{
					"include": "#comment"
				},
				{
					"include": "#property-declaration"
				},
				{
					"include": "#event-declaration"
				},
				{
					"include": "#indexer-declaration"
				},
				{
					"include": "#method-declaration"
				},
				{
					"include": "#attribute-section"
				},
				{
					"include": "#punctuation-semicolon"
				}
			]
		},
		"statement": {
			"patterns": [
				{
					"include": "#preprocessor"
				},
				{
					"include": "#comment"
				},
				{
					"include": "#while-statement"
				},
				{
					"include": "#do-statement"
				},
				{
					"include": "#for-statement"
				},
				{
					"include": "#foreach-statement"
				},
				{
					"include": "#if-statement"
				},
				{
					"include": "#else-part"
				},
				{
					"include": "#switch-statement"
				},
				{
					"include": "#goto-statement"
				},
				{
					"include": "#return-statement"
				},
				{
					"include": "#break-or-continue-statement"
				},
				{
					"include": "#throw-statement"
				},
				{
					"include": "#yield-statement"
				},
				{
					"include": "#await-statement"
				},
				{
					"include": "#try-statement"
				},
				{
				# coding=utf-8
"""
This is an entry point of this helper.
It fetches data from Django manage commands delegating calles to _parser package report it via _xml module.
See _xml module and readme.txt for more info.

One may also add list of commands, separated with comma as argument. This is a list of commands to skip.
Could be useful if you know command may lead to freeze

Module can be called directly, but be sure env var DJANGO_SETTINGS_MODULE is set to something like "mysite.settings"
"""


import django

from django_manage_commands_provider._parser import parser
from django_manage_commands_provider import _xml
import sys


__author__ = 'Ilya.Kazakevich'

# Some django versions require setup
if hasattr(django, 'setup'):
    django.setup()
dumper = _xml.XmlDumper()
commands_to_skip = str(sys.argv[1]).split(",") if len(sys.argv) > 1 else []
parser.report_data(dumper, commands_to_skip)
print(dumper.xml)