/tree-sitter-obl

Tree-sitter grammar for the video game Oblivion's scripting language (obl)

Primary LanguageCGNU General Public License v3.0GPL-3.0

TES 4: Oblivion scripting language (obl) grammar for tree-sitter.

Status

  • Top Level
    • Scriptname
    • Blocks
    • Variable Declarations
  • Blocks
    • Structure
    • Feature Type
    • Parameters
    • User-Defined Functions
  • Inner Block
    • Set Statement
    • Let Statement
    • User-defined Function Call
    • Conditional Statement
      • elseif, else
    • While Loop Statement
    • ForEach Loop Statement
    • Return, Break, Continue Statement
    • Goto Statement
    • Label Statement
    • Expressions
      • Built-in Functions
        • OBSE Plugins
      • Binary Expressions
      • Unary Expressions
      • Parentheses
      • Method-type Functions
      • Filter Operator
    • Variables
      • Array Variables
      • Quest Variables

Built-in Functions

Built in functions have to be defined statically, as the syntax for calling them is generally identical to that of a general variable/reference. Because of this, any function not found within the parser itself will simply not be able to be parsed, and will present a warning to the user

Currently this warning is highlighting the entire statement with the hl-group @text.underline.

If you happen upon functions that do not appear highlighted properly in any way, please report it in the pinned issue on GitHub or make a PR and submit to said pinned issue for bookkeeping.

Overloading

There is nothing I can do about function/variable name overloading (such as using a variable name that is the same as a function from an OBSE plugin). Tree-sitter does not understand semantics