mirror of
https://github.com/ksherlock/BASIC.tmbundle.git
synced 2024-12-26 21:31:32 +00:00
GSoft syntax
This commit is contained in:
parent
768eaeec78
commit
17c018316d
19
Preferences/GSoft Folding.tmPreferences
Normal file
19
Preferences/GSoft Folding.tmPreferences
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>GSoft Folding</string>
|
||||
<key>scope</key>
|
||||
<string>source.gsoft</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foldingStartMarker</key>
|
||||
<string>(?i)^\s*(TYPE\b|IF\b.*\bTHEN\b|FOR\b|WHILE\b|DO\b|SELECT\b)</string>
|
||||
<key>foldingStopMarker</key>
|
||||
<string>(?i)^\s*(END\b|NEXT\b|WEND\b|LOOP\b)</string>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>E4FFB872-4077-4188-B204-2AB1A23409F9</string>
|
||||
</dict>
|
||||
</plist>
|
242
Syntaxes/GSoft.tmLanguage
Normal file
242
Syntaxes/GSoft.tmLanguage
Normal file
@ -0,0 +1,242 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>fileTypes</key>
|
||||
<array>
|
||||
<string>src</string>
|
||||
</array>
|
||||
<key>name</key>
|
||||
<string>GSoft</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>^\s*\d+</string>
|
||||
<key>name</key>
|
||||
<string>entity.name.function</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control</string>
|
||||
</dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:FUNCTION|SUB)\s*([A-Za-z_][A-Za-z0-9_]*)\b</string>
|
||||
<key>name</key>
|
||||
<string>meta.function.definition</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control</string>
|
||||
</dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.function</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:CALL)\s+([A-Za-z_][A-Za-z0-9_]*)</string>
|
||||
<key>name</key>
|
||||
<string>meta.function.call</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.function</string>
|
||||
</dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:DEF\s+FN)\s*([A-Za-z_][A-Za-z0-9_]*)\b</string>
|
||||
<key>name</key>
|
||||
<string>meta.def.fn</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>"</string>
|
||||
<key>end</key>
|
||||
<string>"</string>
|
||||
<key>name</key>
|
||||
<string>string.quoted.double</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>!.*$|\b(?i:rem)\b.*$</string>
|
||||
<key>name</key>
|
||||
<string>comment.line</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(\d+\.\d*|\.\d+|\d+)([eE][+-]?\d+)?</string>
|
||||
<key>name</key>
|
||||
<string>constant.numeric</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\$[A-Fa-f0-9]+</string>
|
||||
<key>name</key>
|
||||
<string>constant.numeric.hex</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:TYPE|END\s+TYPE|BYTE|INTEGER|LONG|SINGLE|DOUBLE|STRING|CONST|POINTER)(?![~%&!#$?])\b</string>
|
||||
<key>name</key>
|
||||
<string>storage.type.basic</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:DEF|FN|FUNCTION|SUB|LOADLIBRARY|UNLOADLIBRARY|TOOL|GSOS|LIBRARY)(?![~%&!#$?])\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.function</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:DATA|READ|RESTORE)\b</string>
|
||||
<key>name</key>
|
||||
<string>storage.data</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:CALL|CASE|CONT|DO|ELSE|END|ERROR|FOR|GOSUB|GOTO|IF|LOOP|NEXT|ONERR|ON|POP|RESUME|RETURN|SELECT|STEP|THEN|TO|UNTIL|WAIT|WEND|WHILE)(?![~%&!#$?])\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.control</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:BREAK|STOP)(?![~%&!#$?])\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.control.debug</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:ERL|ERR)(?![~%&!#$?])\b</string>
|
||||
<key>name</key>
|
||||
<string>support.variables.error</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:AS|DIM|LET)(?![~%&!#$?])\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.variable</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:\?|CSRLIN|HOME|HTAB|INPUT|INVERSE|LINE|NORMAL|MOUSETEXT|PRINT|SPEED|USING|VTAB)(?![~%&!#$?])\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.io</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:SPC|TAB|POS)(?![~%&!#$?])\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.io</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>comment</key>
|
||||
<string>negative lookahead for type indicators.</string>
|
||||
<key>match</key>
|
||||
<string>\b(?i:CLOSE|OPEN|OUTPUT|INPUT|APPEND|RANDOM|BINARY|TCP|GET|PUT|SEEK|CHDIR|MKDIR|NAME|RMDIR|KILL)(?![~%&!#$?])\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.io.disk</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:EOF|LOC|LOF)(?![~%&!#$?])\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.io.disk</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:DIR)\$</string>
|
||||
<key>name</key>
|
||||
<string>support.function.io.disk</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:CURDIR)\$</string>
|
||||
<key>name</key>
|
||||
<string>support.variables.io.disk</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:ABS|ATN|CDBL|CINT|CLNG|COS|CSNG|EXP|INT|LOG|RND|SGN|SIN|SQR|TAN)(?![~%&!#$?])\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.arithmetic</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:ASC|FRE|LEN|VAL)(?![~%&!#$?])\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.string</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:CHR|LEFT|MID|RIGHT|STR)\$</string>
|
||||
<key>name</key>
|
||||
<string>support.function.string</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:AT|HCOLOR|HGR|HPLOT|TEXT)(?![~%&!#$?])\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.graphics</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:ALLOCATE|DISPOSE|SETMEM|SIZEOF|PEEK|POKE|CLEAR)(?![~%&!#$?])\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.memory</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:NIL|VERSION)(?![~%&!#$?])\b</string>
|
||||
<key>name</key>
|
||||
<string>support.variable.memory</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:TOOLERROR)(?![~%&!#$?])\b</string>
|
||||
<key>name</key>
|
||||
<string>support.variables.toolbox</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?i:AND|OR|NOT)(?![~%&!#$?])\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.logical</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b[A-Za-z_][A-Za-z0-9_]*[~%&!#$?]?</string>
|
||||
<key>name</key>
|
||||
<string>variable</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scopeName</key>
|
||||
<string>source.gsoft</string>
|
||||
<key>uuid</key>
|
||||
<string>1C23B8D7-86F9-457E-868F-A3C4563A1858</string>
|
||||
</dict>
|
||||
</plist>
|
Loading…
Reference in New Issue
Block a user