Skip to content

Commit

Permalink
functions brackets are now styled aswell
Browse files Browse the repository at this point in the history
  • Loading branch information
runxel committed Mar 28, 2015
1 parent 773bd70 commit 6bfa3a6
Showing 2 changed files with 97 additions and 6 deletions.
29 changes: 27 additions & 2 deletions Syntaxes/GDL.YAML-tmLanguage
Original file line number Diff line number Diff line change
@@ -32,8 +32,18 @@ patterns:
name: keyword.gdl.transform

# F U N C T I O N S
- match: (?i)(\b)(NOT|ABS|CEIL|INT|FRA|ROUND_INT|SGN|ACS|ASN|ATN|COS|SIN|TAN|PI|EXP|LGT|LOG|SQR|MAX|MIN|RND|STR(\{2\})?|SPLIT|STW|STRLEN|STRSTR|STRSUB|VARDIM[12]|DIM|BITTEST|BITSET|REQ((UEST)(\{2\})?)?|IND|NTR|VARTYPE)(\b)
name: keyword.other.special-method.gdl.functions
- begin: (?i)(NOT|ABS|CEIL|INT|FRA|ROUND_INT|SGN|ACS|ASN|ATN|COS|SIN|TAN|PI|EXP|LGT|LOG|SQR|MAX|MIN|RND|STR(\{2\})?|SPLIT|STW|STRLEN|STRSTR|STRSUB|VARDIM[12]|DIM|BITTEST|BITSET|REQ((UEST)(\{2\})?)?|IND|NTR|VARTYPE)(\()(.*?)
beginCaptures:
'1':
name: keyword.other.special-method.gdl.functions
'6':
name: keyword.other.special-method.gdl.functions
end: (\))
endCaptures:
'0':
name: keyword.other.special-method.gdl.functions
patterns:
- include: '#functions'

# 2D
- match: (?i)(?<=^|\s)((LINE|RECT|ARC|CIRCLE|WALLINE|WALLARC)2|SPLINE2[A]?|(PICTURE|WALLHOLE|WALLBLOCK)2(\{2\})?|POLY2(_?(A|B(\{[2-5]\})?)?))(?=$|\s)
@@ -178,3 +188,18 @@ patterns:
- match: (?i)(\bfalse\b)
name: constant.language.boolean.false.gdl

repository:
functions:
begin: (?i)(NOT|ABS|CEIL|INT|FRA|ROUND_INT|SGN|ACS|ASN|ATN|COS|SIN|TAN|PI|EXP|LGT|LOG|SQR|MAX|MIN|RND|STR(\{2\})?|SPLIT|STW|STRLEN|STRSTR|STRSUB|VARDIM[12]|DIM|BITTEST|BITSET|REQ((UEST)(\{2\})?)?|IND|NTR|VARTYPE)(\()(.*?)
beginCaptures:
'1':
name: keyword.other.special-method.gdl.functions
'6':
name: keyword.other.special-method.gdl.functions
end: (\))
endCaptures:
'0':
name: keyword.other.special-method.gdl.functions
patterns:
- include: '#functions'

74 changes: 70 additions & 4 deletions Syntaxes/GDL.tmLanguage
Original file line number Diff line number Diff line change
@@ -56,10 +56,38 @@
<string>keyword.gdl.transform</string>
</dict>
<dict>
<key>match</key>
<string>(?i)(\b)(NOT|ABS|CEIL|INT|FRA|ROUND_INT|SGN|ACS|ASN|ATN|COS|SIN|TAN|PI|EXP|LGT|LOG|SQR|MAX|MIN|RND|STR(\{2\})?|SPLIT|STW|STRLEN|STRSTR|STRSUB|VARDIM[12]|DIM|BITTEST|BITSET|REQ((UEST)(\{2\})?)?|IND|NTR|VARTYPE)(\b)</string>
<key>name</key>
<string>keyword.other.special-method.gdl.functions</string>
<key>begin</key>
<string>(?i)(NOT|ABS|CEIL|INT|FRA|ROUND_INT|SGN|ACS|ASN|ATN|COS|SIN|TAN|PI|EXP|LGT|LOG|SQR|MAX|MIN|RND|STR(\{2\})?|SPLIT|STW|STRLEN|STRSTR|STRSUB|VARDIM[12]|DIM|BITTEST|BITSET|REQ((UEST)(\{2\})?)?|IND|NTR|VARTYPE)(\()(.*?)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.special-method.gdl.functions</string>
</dict>
<key>6</key>
<dict>
<key>name</key>
<string>keyword.other.special-method.gdl.functions</string>
</dict>
</dict>
<key>end</key>
<string>(\))</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.other.special-method.gdl.functions</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#functions</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
@@ -338,6 +366,44 @@
<string>constant.language.boolean.false.gdl</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>functions</key>
<dict>
<key>begin</key>
<string>(?i)(NOT|ABS|CEIL|INT|FRA|ROUND_INT|SGN|ACS|ASN|ATN|COS|SIN|TAN|PI|EXP|LGT|LOG|SQR|MAX|MIN|RND|STR(\{2\})?|SPLIT|STW|STRLEN|STRSTR|STRSUB|VARDIM[12]|DIM|BITTEST|BITSET|REQ((UEST)(\{2\})?)?|IND|NTR|VARTYPE)(\()(.*?)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.special-method.gdl.functions</string>
</dict>
<key>6</key>
<dict>
<key>name</key>
<string>keyword.other.special-method.gdl.functions</string>
</dict>
</dict>
<key>end</key>
<string>(\))</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.other.special-method.gdl.functions</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#functions</string>
</dict>
</array>
</dict>
</dict>
<key>scopeName</key>
<string>source.gdl</string>
<key>uuid</key>

0 comments on commit 6bfa3a6

Please sign in to comment.