[rkward-cvs] SF.net SVN: rkward: [1003] trunk/rkward/rkward/syntax
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Sun Dec 10 18:06:44 UTC 2006
Revision: 1003
http://svn.sourceforge.net/rkward/?rev=1003&view=rev
Author: tfry
Date: 2006-12-10 10:06:44 -0800 (Sun, 10 Dec 2006)
Log Message:
-----------
Make all braces, brackets, parentheses have attribute "Symbol". This help with auto-indentation
Modified Paths:
--------------
trunk/rkward/rkward/syntax/r.xml
trunk/rkward/rkward/syntax/rkward.xml
Modified: trunk/rkward/rkward/syntax/r.xml
===================================================================
--- trunk/rkward/rkward/syntax/r.xml 2006-12-08 11:52:35 UTC (rev 1002)
+++ trunk/rkward/rkward/syntax/r.xml 2006-12-10 18:06:44 UTC (rev 1003)
@@ -50,7 +50,7 @@
<context attribute="In Parenthesis" lineEndContext="#stay" name="parenthesis">
<LineContinue attribute="Boolean" context="#stay"/>
- <DetectChar attribute="Keyword" context="#pop" char=")"/>
+ <DetectChar attribute="Symbol" context="#pop" char=")"/>
<RegExpr attribute="Identifier" context="#stay" String="[a-zA-Z_\.][0-9a-zA-Z_\.]*[\s]*=(?=([^=]|$))"/>
@@ -87,7 +87,7 @@
<Int attribute="Int" context="#stay"/>
<RegExpr attribute="Keyword" context="#stay" String="[a-zA-Z_]+[a-zA-Z_\.0-9]*(?=[\s]*[(])"/>
<RegExpr attribute="Keyword" context="#stay" String="\.[a-zA-Z_\.]+[a-zA-Z_\.0-9]*(?=[\s]*[(])"/>
- <RegExpr attribute="Keyword" context="parenthesis" String="\("/>
+ <RegExpr attribute="Symbol" context="parenthesis" String="\("/>
<StringDetect attribute="Headline" context="Headline" String="##"/>
<DetectChar attribute="Comment" context="Comment" char="#"/>
@@ -108,6 +108,10 @@
<RegExpr attribute="Operator" context="#stay" String="%[^%]*%"/>
<DetectChar attribute="Symbol" context="ctx0" char="{" beginRegion="Brace1" />
+
+ <!-- This is needed only to assist variable based indentation -->
+ <DetectChar attribute="Symbol" context="#stay" char="[" />
+ <DetectChar attribute="Symbol" context="#stay" char="]" />
</context>
</contexts>
Modified: trunk/rkward/rkward/syntax/rkward.xml
===================================================================
--- trunk/rkward/rkward/syntax/rkward.xml 2006-12-08 11:52:35 UTC (rev 1002)
+++ trunk/rkward/rkward/syntax/rkward.xml 2006-12-10 18:06:44 UTC (rev 1003)
@@ -62,7 +62,7 @@
<context attribute="Normal Text" lineEndContext="#stay" name="parenthesis">
<IncludeRules context="CommandContinuationCheck"/>
- <DetectChar attribute="Keyword" context="#pop" char=")"/>
+ <DetectChar attribute="Symbol" context="#pop" char=")"/>
<RegExpr attribute="Identifier" context="#stay" String="[a-zA-Z_\.][0-9a-zA-Z_\.]*[\s]*=(?=([^=]|$))"/>
@@ -111,7 +111,7 @@
<Int attribute="Int" context="#stay"/>
<RegExpr attribute="Keyword" context="#stay" String="[a-zA-Z_]+[a-zA-Z_\.0-9]*(?=[\s]*[(])"/>
<RegExpr attribute="Keyword" context="#stay" String="\.[a-zA-Z_\.]+[a-zA-Z_\.0-9]*(?=[\s]*[(])"/>
- <RegExpr attribute="Keyword" context="parenthesis" String="\("/>
+ <RegExpr attribute="Symbol" context="parenthesis" String="\("/>
<StringDetect attribute="Headline" context="Headline" String="##"/>
<DetectChar attribute="Comment" context="Comment" char="#"/>
@@ -133,6 +133,10 @@
<!-- Contrary to the normal R Script highlighting, we don't start a region here, but we do go into a command sub-context -->
<DetectChar attribute="Symbol" context="command" char="{" />
+
+ <!-- This is needed only to assist variable based indentation -->
+ <DetectChar attribute="Symbol" context="#stay" char="[" />
+ <DetectChar attribute="Symbol" context="#stay" char="]" />
</context>
</contexts>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list