Skip to content

Commit

Permalink
• Moving keyword matches ahead of the meta.* scopes to avoid incorrec…
Browse files Browse the repository at this point in the history
…tly matching keywords followed by tuples as function calls.

• Fixing Scope on a macro.



git-svn-id: http://svn.textmate.org/trunk/Bundles/Python.tmbundle@5809 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information
Alex Ross committed Oct 31, 2006
1 parent e80a608 commit 005b317
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 92 deletions.
2 changes: 1 addition & 1 deletion Macros/Inside Parameter List: Overtype Closing ):.tmMacro
Expand Up @@ -18,7 +18,7 @@
<key>name</key>
<string>Inside Parameter List: Overtype Closing ):</string>
<key>scope</key>
<string>source.python meta.function.python punctuation.definition.parameter-list.end.python</string>
<string>source.python meta.function.python punctuation.definition.parameters.end.python</string>
<key>uuid</key>
<string>CDA11D94-712F-48EB-932E-114878FD6A54</string>
</dict>
Expand Down
182 changes: 91 additions & 91 deletions Syntaxes/Python.tmLanguage
Expand Up @@ -104,6 +104,97 @@
<key>name</key>
<string>constant.numeric.integer.decimal.python</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.global.python</string>
</dict>
</dict>
<key>match</key>
<string>\b(global)\b</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.import.python</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.control.import.from.python</string>
</dict>
</dict>
<key>match</key>
<string>\b(?:(import)|(from))\b</string>
</dict>
<dict>
<key>comment</key>
<string>keywords that delimit flow blocks</string>
<key>match</key>
<string>\b(elif|else|except|finally|for|if|try|while|with)\b</string>
<key>name</key>
<string>keyword.control.flow.python</string>
</dict>
<dict>
<key>comment</key>
<string>keywords that alter flow from within a block</string>
<key>match</key>
<string>\b(break|continue|pass|raise|return|yield)\b</string>
<key>name</key>
<string>keyword.control.flow.python</string>
</dict>
<dict>
<key>comment</key>
<string>keyword operators that evaluate to True or False</string>
<key>match</key>
<string>\b(and|in|is|not|or)\b</string>
<key>name</key>
<string>keyword.operator.logical.python</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.python</string>
</dict>
</dict>
<key>comment</key>
<string>keywords that haven't fit into other groups (yet).</string>
<key>match</key>
<string>\b(as|assert|del|exec|print)\b</string>
</dict>
<dict>
<key>match</key>
<string>\+\=|-\=|\*\=|/\=|//\=|%\=|&amp;\=|\|\=|\^\=|&gt;&gt;\=|&lt;&lt;\=|\*\*\=</string>
<key>name</key>
<string>keyword.operator.assignment.augmented.python</string>
</dict>
<dict>
<key>match</key>
<string>\+|\-|\*|\*\*|/|//|%|&lt;&lt;|&gt;&gt;|&amp;|\||\^|~</string>
<key>name</key>
<string>keyword.operator.arithmetic.python</string>
</dict>
<dict>
<key>match</key>
<string>&lt;|&gt;|&lt;\=|&gt;\=|\=\=|!\=|&lt;&gt;</string>
<key>name</key>
<string>keyword.operator.comparison.python</string>
</dict>
<dict>
<key>match</key>
<string>\=</string>
<key>name</key>
<string>keyword.operator.assignment.python</string>
</dict>
<dict>
<key>begin</key>
<string>^\s*(class)\s+(?=[a-zA-Z_][a-zA-Z_0-9]*\s*\:)</string>
Expand Down Expand Up @@ -739,97 +830,6 @@
<key>match</key>
<string>\b(class)\b</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.global.python</string>
</dict>
</dict>
<key>match</key>
<string>\b(global)\b</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.import.python</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.control.import.from.python</string>
</dict>
</dict>
<key>match</key>
<string>\b(?:(import)|(from))\b</string>
</dict>
<dict>
<key>comment</key>
<string>keywords that delimit flow blocks</string>
<key>match</key>
<string>\b(elif|else|except|finally|for|if|try|while|with)\b</string>
<key>name</key>
<string>keyword.control.flow.python</string>
</dict>
<dict>
<key>comment</key>
<string>keywords that alter flow from within a block</string>
<key>match</key>
<string>\b(break|continue|pass|raise|return|yield)\b</string>
<key>name</key>
<string>keyword.control.flow.python</string>
</dict>
<dict>
<key>comment</key>
<string>keyword operators that evaluate to True or False</string>
<key>match</key>
<string>\b(and|in|is|not|or)\b</string>
<key>name</key>
<string>keyword.operator.logical.python</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.python</string>
</dict>
</dict>
<key>comment</key>
<string>keywords that haven't fit into other groups (yet).</string>
<key>match</key>
<string>\b(as|assert|del|exec|print)\b</string>
</dict>
<dict>
<key>match</key>
<string>\+\=|-\=|\*\=|/\=|//\=|%\=|&amp;\=|\|\=|\^\=|&gt;&gt;\=|&lt;&lt;\=|\*\*\=</string>
<key>name</key>
<string>keyword.operator.assignment.augmented.python</string>
</dict>
<dict>
<key>match</key>
<string>\+|\-|\*|\*\*|/|//|%|&lt;&lt;|&gt;&gt;|&amp;|\||\^|~</string>
<key>name</key>
<string>keyword.operator.arithmetic.python</string>
</dict>
<dict>
<key>match</key>
<string>&lt;|&gt;|&lt;\=|&gt;\=|\=\=|!\=|&lt;&gt;</string>
<key>name</key>
<string>keyword.operator.comparison.python</string>
</dict>
<dict>
<key>match</key>
<string>\=</string>
<key>name</key>
<string>keyword.operator.assignment.python</string>
</dict>
<dict>
<key>include</key>
<string>#line_continuation</string>
Expand Down

0 comments on commit 005b317

Please sign in to comment.