'*******************************************************************************
' EverEdit Syntax File
' Language:    CSharp
' Maintainer:  www.everedit.net  
' History:
'   2012/08/03 First Version
'   2013/09/13 Added new string region with @
'*******************************************************************************
Include( ".\const.mac" )

Set cs=CreateParser()

'comment
Set rLineComment=cs.CreateRegion( COLOR_COMMENT1, "+//+", "$", True )
Set rBlockComment=cs.CreateRegion( COLOR_COMMENT1, "+/*+", "+*/+", True )
cs.AddRegion( rLineComment )
cs.AddRegion( rBlockComment )

'add todo to comment
Set iTodo=cs.CreateItem( COLOR_HIGHLIGHT2, "\b(TODO|FIX)\b", False )
rLineComment.AddItem( iTodo )
rBlockComment.AddItem( iTodo )

'string with @
Set rStringAt=cs.CreateRegion( COLOR_STRING1, "+@""+", "+""+", False )
cs.AddRegion( rStringAt )

'double quote string
Set rString2=cs.CreateStringRegion( COLOR_STRING1, """", "\", False )
cs.AddRegion( rString2 )

'function
cs.AddItem( cs.CreateItem(COLOR_FUNCTION, "[\w_]+(?=\()", False) )

'Reserved words
cs.AddWord( cs.CreateWord(COLOR_WORD1, "abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long namespace new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual void volatile while get set hidden default", True ) )

'namespaces
cs.AddWord( cs.CreateWord(COLOR_WORD2, "ExpectedException Ignore SetUp Suite TearDown Test TestFixture TestFixtureSetUp TestFixtureTearDown assembly AssemblyTitle AssemblyDescription AssemblyConfiguration AssemblyCompany AssemblyProduct AssemblyCopyright AssemblyTrademark AssemblyCulture AssemblyVersion AssemblyDelaySign AssemblyKeyFile AssemblyKeyName STAThread AttributeUsage Conditional Obsolete DllImport NUnit Framework __boxed_System_Guid __boxed_System_Int32 Activation Adapters Admin Assemblies Binary Cache Caching Channels CLRAdmin CodeDom Collections Com2Interop Common CompensatingResourceManager Compilation Compiler CompilerServices ComponentModel Configuration Contexts Converters Cryptography CustomMarshalers Data DataBindingUI Debugger Description Design Diagnostics DirectoryServices Discovery Drawing Drawing2D Emit EnterpriseServices Expando Formatters Forms Globalization Handlers Hosting HtmlControls Http Imaging Install Instrumentation Internal Interop InteropServices IO IsolatedStorage Lifetime ListControls Mail Management Messaging Metadata MetadataServices Microsoft Mobile MobileControls Net Odbc OleDb OracleClient Permissions Policy Principal Printing PropertyGridInternal Protocols Proxies Reflection RegularExpressions Remoting Resources Runtime Schema Security Serialization ServiceProcess Services SessionState Soap Sockets Specialized SqlClient SqlTypes SymbolStore System TCEAdapterGen Tcp Text Threading Thunk Timers UI Util VisualBasic W3cXsd2001 Web WebControls Win32 Windows X509Certificates Xml XPath Xsl", True ) )

'single quote char
cs.AddItem( cs.CreateItem(COLOR_STRING2, "'.'", False) )

'macro
cs.AddItem( cs.CreateItem(COLOR_MACRO, "^\s*#\w+",False ) )

'number
cs.AddItem( cs.CreateItem(COLOR_NUMBER, "\b\d+\b", False) )

cs.FoldText "#region|\{", False
cs.UnfoldText "#endregion|\}", False

cs.IndentText "\[|{|\w+:$", False
cs.UnindentText "^\s*}|\]$", False

cs.SetPairs "[]{}()""""''"

cs.CommentLine "//"
cs.CommentBlock "/*", "*/"
