Skip to content

An experimental language server protocol for the QuickBMS scripting language.

License

Notifications You must be signed in to change notification settings

ExcaliburZero/quickbms-lsp

Repository files navigation

QuickBMS-lsp quickbms-lsp

This is an experimental language server for the scripting language QuickBMS.

An example of the hover documentation for the "print" keyword being shown in Visual Studio Code for a hello world program.

An example of the goto references function for a "GreetWorld" function being shown in Visual Studio Code for a functions example script.

Language server endpoints

These are the currently supported language server endpoints.

  • initialize
  • textDocument/definition
  • textDocument/didOpen
  • textDocument/didChange
  • textDocument/documentSymbol
  • textDocument/foldingRange
    • Currently only for function declarations, If/ElseIf/Else statements, and Do/While loops
  • textDocument/hover
  • textDocument/references
    • Currently only for functions

QuickBMS commands

The following QuickBMS commands are currently supported by the langauge server.

  • QuickBMSver VERSION
    • Support version numbers that are not specified as strings
  • FindLoc VAR TYPE STRING [FILENUM] [ERR_VALUE] [END_OFF]
  • For [VAR] [OP] [VALUE] [COND] [VAR]
    • Support all operators
  • Next [VAR] [OP] [VALUE]
  • Get VAR TYPE [FILENUM] [OFFSET]
    • Look into OFFSET argument. It is in list of commands, but not in the Get documentation.
  • GetDString VAR LENGTH [FILENUM]
  • GoTo OFFSET [FILENUM] [TYPE]
  • IDString [FILENUM] STRING
  • Log NAME OFFSET SIZE [FILENUM] [XSIZE]
    • Add support for FILENUM and XSIZE
  • Clog NAME OFFSET ZSIZE SIZE [FILENUM] [XSIZE]
  • Math VAR OP VAR
    • Support all operators
  • XMath VAR INSTR
  • Open FOLDER NAME [FILENUM] [EXISTS]
  • SavePos VAR [FILENUM]
  • Set VAR [TYPE] VAR
  • Do
  • While VAR COND VAR
  • String VAR OP VAR
    • Support all operators
  • CleanExit
  • If VAR COND VAR [...]
    • Support all comparison operators
  • [Elif VAR COND VAR]
  • [Else]
  • EndIf
  • GetCT VAR TYPE CHAR [FILENUM]
  • ComType ALGO [DICT] [DICT_SIZE]
    • Support optional arguments
  • ReverseShort VAR [ENDIAN]
  • ReverseLong VAR [ENDIAN]
  • ReverseLongLong VAR [ENDIAN]
  • Endian TYPE [VAR]
  • FileXOR SEQ [OFFSET] [FILENUM]
  • FileRot SEQ [OFFSET] [FILENUM]
  • FileCrypt SEQ [OFFSET] [FILENUM]
  • Strlen VAR VAR [SIZE]
  • GetVarChr VAR VAR OFFSET [TYPE]
  • PutVarChr VAR OFFSET VAR [TYPE]
  • Debug [MODE]
  • Padding VAR [FILENUM] [BASE_OFF]
  • Append [DIRECTION]
  • Encryption ALGO KEY [IVEC] [MODE] [KEYLEN]
  • Print MESSAGE
  • GetArray VAR ARRAY VAR_IDX
  • PutArray ARRAY VAR_IDX VAR
  • SortArray ARRAY [ALL]
  • SearchArray VAR ARRAY VAR
  • CallFunction NAME [KEEP_VAR] [ARG1] [ARG2] ... [ARGn]
    • Add support for arguments
  • StartFunction NAME
  • EndFunction
  • ScanDir PATH NAME SIZE [FILTER]
  • CallDLL DLLNAME FUNC/OFF CONV RET [ARG1] [ARG2] ... [ARGn]
  • Put VAR TYPE [FILENUM]
  • PutDString VAR LENGTH [FILENUM]
  • PutCT VAR TYPE CHAR [FILENUM]
  • GetBits VAR BITS [FILENUM]
  • PutBits VAR BITS [FILENUM]
  • Include FILENAME
  • NameCRC VAR CRC [LISTFILE] [TYPE] [POLYNOMIAL] [PARAMETERS]
  • Codepage VAR
  • SLog NAME OFFSET SIZE [TYPE] [FILENUM] [TAG]
  • Reimport [MODE]
  • Label NAME
  • Break [NAME]
  • Continue [NAME]

About

An experimental language server protocol for the QuickBMS scripting language.

Resources

License

Stars

Watchers

Forks

Packages

No packages published