From 1ab699d10f438fde01c663aaf00b684a4146f23c Mon Sep 17 00:00:00 2001 From: Chris Thomas Date: Sun, 24 Apr 2005 07:37:54 +0000 Subject: [PATCH] Add Pascal function parsing git-svn-id: http://svn.textmate.org/trunk/Bundles/Pascal.tmbundle@701 dfb7d73b-c2ec-0310-8fea-fb051d288c6d --- Syntaxes/Pascal.plist | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Syntaxes/Pascal.plist b/Syntaxes/Pascal.plist index 2b35dd4..10a81a2 100644 --- a/Syntaxes/Pascal.plist +++ b/Syntaxes/Pascal.plist @@ -1,6 +1,5 @@ { - // Pascal -- GNU Pascal, specifically -- chris@cjack.com. Feel free to modify, distribute, be happy. Share and enjoy. - + comment = "Pascal -- GNU Pascal, specifically -- chris@cjack.com. Feel free to modify, distribute, be happy. Share and enjoy."; name = "Pascal"; scopeName = "source.pascal"; fileTypes = ( p, pas ); @@ -18,7 +17,14 @@ { name = "keyword.control.pascal"; - match = "\\<(?i:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|end|do|else|end|export|exports|external|far|file|finalization|for|forward|function|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|procedure|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr|then|to|type|unit|until|uses|value|var|view|virtual|while|with|xor))\\>"; + match = "\\<(?i:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|end|do|else|end|export|exports|external|far|file|finalization|for|forward|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr|then|to|type|unit|until|uses|value|var|view|virtual|while|with|xor))\\>"; + }, + + { + name = "declaration.function"; + match = "\\<(?i:(function|procedure))\\>\\s+(\\w+)"; + captures = { 1 = { name = "keyword.control"; }; + 2 = { name = "function-name"; }; }; }, { name = "constant.numeric.pascal"; match = "\\<((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\>"; },