diff --git a/Syntaxes/Apple III Business BASIC.tmLanguage b/Syntaxes/Apple III Business BASIC.tmLanguage new file mode 100644 index 0000000..c77d67e --- /dev/null +++ b/Syntaxes/Apple III Business BASIC.tmLanguage @@ -0,0 +1,255 @@ + + + + + fileTypes + + name + Apple III Business BASIC + patterns + + + match + ^\s*\d+ + name + entity.name.function + + + captures + + 0 + + name + keyword.function + + 1 + + name + entity.name.function + + + match + \b(?i:DEF\s+FN)\s*([A-Za-z_][A-Za-z0-9_]*)\b + name + meta.def.fn + + + begin + " + end + " + name + string.quoted.double + + + comment + may end at : ? + match + \b(?i:REM)\b.*$ + name + comment.line + + + match + (\d+\.\d*|\.\d+|\d+)([eE][+-]?\d+)? + name + constant.numeric + + + captures + + 0 + + name + keyword.function + + 1 + + name + variable.function + + + match + \b(?i:FN)\s*([A-Za-z][A-Za-z0-9.]*)\s*(?=\() + name + meta.fn + + + captures + + 0 + + name + keyword.external + + 1 + + name + support.function + + + match + \b(?i:PERFORM)\s+([A-Za-z][A-Za-z0-9.]*)(?=\() + name + meta.perform + + + captures + + 0 + + name + keyword.external + + 2 + + name + support.function + + + match + \b(?i:EXFN%?)(\.)([A-Za-z][A-Za-z0-9.]*)(?=\() + name + meta.exfn + + + match + \b(?i:INVOKE|PERFORM|EXFN)(?![$%&])\b + name + keyword.external + + + match + \b(?i:EXFN)% + name + keyword.external + + + comment + # screws up \b + match + (?i:ON|OFF)\s+(?i:EOF)# + name + keyword.control + + + match + \b(?i:ON|OFF)\s+(?i:ERR|KBD)(?![$%&])\b + name + keyword.control + + + match + \b(?i:FOR|NEXT|STEP|TO|POP|RETURN|ELSE|IF|GOTO|GOSUB|THEN|ON|OFF|RESUME|TRACE|NOTRACE)(?![$%&])\b + name + keyword.control + + + match + \b(?i:DATA|GET|INPUT|READ|RESTORE)(?![$%&])\b + name + keyword.input + + + match + \b(?i:CLOSE|INPUT|OPEN|OUTPUT|PRINT|READ|WRITE)# + name + keyword.file + + + match + \b(?i:CAT|CATALOG|CLOSE|CREATE|DELETE|EXEC|LOCK|RENAME|UNLOCK)(?![$%&])\b + name + keyword.file + + + match + \b(?i:AS)\s(?i:EXTENSION|INPUT|OUTPUT)(?![$%&])\b + name + keyword.file.as + + + match + \b(?i:REC|TYP)(?=\() + name + support.function.file + + + match + \b(?i:DEL|HOME|INVERSE|LIST|NORMAL|PRINT|\?|WINDOW|IMAGE|USING)(?![$%&])\b + name + keyword.screen + + + match + \b(?i:SPC|TAB)(?=\() + name + support.function.screen + + + match + \b(?i:DIM|LET|SWAP)(?![$%&])\b + name + keyword.variable + + + match + \b(?i:CHAIN|CLEAR|CONT|END|LOAD|NEW|RUN|SAVE|STOP)(?![$%&])\b + name + keyword.utility + + + match + \b(?i:CONV)[$%&]?(?=\() + name + support.function.conversion + + + match + \b(?i:ASC|CHR\$|HEX\$|INSTR|LEFT\$|LEN|MID\$|RIGHT\$|STR\$|SUB\$|TEN|VAL)(?=\() + name + support.function.string + + + match + \b(?i:ABS|EXP|INT|LOG|RND|SGN|SQR|ATN|COS|SIN|TAN|SCALE)(?=\() + name + support.function.arithmetic + + + match + \b(?i:DIV|MOD)\b + name + keyword.operator.mathematical + + + match + \b(?i:AND|OR|NOT)(?![$%&])\b + name + keyword.operator.logical + + + match + \b(?i:EOF|ERR|ERRLIN|FRE|HPOS|INDENT|KBD|OUTREC|VPOS)(?![$%&])\b + name + support.variable + + + match + \b(?i:PREFIX)\$ + name + support.variable.dollar + + + match + [A-Za-z][A-Za-z0-9.]*[$%&]? + name + variable + + + scopeName + source.business-basic + uuid + AF5FFBB0-4A62-4A20-80A9-DB26CA3FA04A + +