v2026.6.1
All Bundles

Analysis

Analysis results

Operations

CodeAction #

Get signature definitions

method : public : CodeAction(uri:String, start_range_line:Int, start_range_char:Int, var_name:String) ~ Result

Parameters

NameTypeDescription
uriStringfile uri
start_range_lineIntline of symbol
start_range_charIntcharacter position of symbol
var_nameStringvariable string name

Return

TypeDescription
Resultsymbol references, Nil of none found

CodeRename #

Renames a variable or method/function

method : public : CodeRename(uri:String, line:Int, pos:Int, sys_path:String) ~ Result[]

Parameters

NameTypeDescription
uriStringfile uri
lineIntline of symbol
posIntcharacter position of symbol
sys_pathStringsystem library path

Return

TypeDescription
Resultsymbol references, Nil of none found

CollectWorkspaceSymbols #

Depth-first walk over a Result tree emitted by GetSymbols, appending every named, source-located entry whose lower-cased name contains the needle. Helper for WorkspaceSymbols.

method : private : CollectWorkspaceSymbols(node:Result, needle:String, out:Vector<Result>) ~ Nil

Parameters

NameTypeDescription
nodeResultcurrent tree node (nil-safe)
needleStringlower-cased substring; empty matches everything
outVector<Result>accumulator

Completion #

Get completion options

method : public : Completion(uri:String, line:Int, pos:Int, var_str:String, mthd_str:String, sys_path:String) ~ Result

Parameters

NameTypeDescription
uriStringfile uri
lineIntline of symbol
posIntcharacter position of symbol
var_strStringvariable string name
mthd_strStringmethod string name
sys_pathStringsystem library path

Return

TypeDescription
Resultcompletion result, Nil if none found

Example

analysis := System.Diagnostics.Analyzer->ParseFile("app.obs");
items := analysis->Completion("file:///app.obs", 8, 3, "conn", "", "/usr/lib/objeck");
if(items <> Nil) {
  items->ToString()->PrintLine(); # JSON completion list
};
analysis->Release();

DocumentHighlight #

Get document highlights for the symbol at the cursor - references scoped to the current file. Backs textDocument/documentHighlight.

method : public : DocumentHighlight(uri:String, line:Int, pos:Int, sys_path:String) ~ Result[]

Parameters

NameTypeDescription
uriStringfile uri
lineIntline of symbol
posIntcharacter position of symbol
sys_pathStringsystem library path

Return

TypeDescription
Resultper-file highlights, Nil if nothing to highlight

FindDeclaration #

Finds symbol deceleration

method : public : FindDeclaration(uri:String, line:Int, pos:Int, sys_path:String) ~ Result

Parameters

NameTypeDescription
uriStringfile uri
lineIntline of symbol
posIntcharacter position of symbol
sys_pathStringsystem library path

Return

TypeDescription
Resultsymbol deceleration, Nil of none found

FindDefinition #

Finds symbol definition

method : public : FindDefinition(uri:String, line:Int, pos:Int, sys_path:String) ~ Result

Parameters

NameTypeDescription
uriStringfile uri
lineIntline of symbol
posIntcharacter position of symbol
sys_pathStringsystem library path

Return

TypeDescription
Resultsymbol definition, Nil if none found

Example

analysis := System.Diagnostics.Analyzer->ParseFile("app.obs");
defn := analysis->FindDefinition("file:///app.obs", 15, 8, "/usr/lib/objeck");
if(defn <> Nil) {
  defn->GetName()->PrintLine(); # name of the defined symbol
};
analysis->Release();

FindImplementation #

Finds implementations of an interface or overrides of a virtual method

method : public : FindImplementation(uri:String, line:Int, pos:Int, sys_path:String) ~ Result[]

Parameters

NameTypeDescription
uriStringfile uri
lineIntline of symbol
posIntcharacter position of symbol
sys_pathStringsystem library path

Return

TypeDescription
Resultimplementation locations, Nil if not found

FindReferences #

Get references specified symbol

method : public : FindReferences(uri:String, line:Int, pos:Int, sys_path:String) ~ Result[]

Parameters

NameTypeDescription
uriStringfile uri
lineIntline of symbol
posIntcharacter position of symbol
sys_pathStringsystem library path

Return

TypeDescription
Resultsymbol references, Nil of none found

Example

analysis := System.Diagnostics.Analyzer->ParseFile("app.obs");
uri := "file:///app.obs";
refs := analysis->FindReferences(uri, 10, 5, "/usr/lib/objeck");
if(refs <> Nil) {
  each(i : refs) { refs[i]->ToString()->PrintLine(); };
};
analysis->Release();

FindTypeDefinition #

Finds type definition (go to the type of a symbol)

method : public : FindTypeDefinition(uri:String, line:Int, pos:Int, sys_path:String) ~ Result

Parameters

NameTypeDescription
uriStringfile uri
lineIntline of symbol
posIntcharacter position of symbol
sys_pathStringsystem library path

Return

TypeDescription
Resulttype definition location, Nil if not found

GetDiagnostics #

Get parse and analysis errors

method : public : GetDiagnostics(was_analyzed:BoolRef, uri:String, sys_path:String) ~ Result[]

Parameters

NameTypeDescription
was_analyzedBoolRefset true if code was successfully analyzed, false otherwise
uriStringfile uri
sys_pathStringsystem library path

Return

TypeDescription
Resultanalysis errors, Nil of no errors

Example

analysis := System.Diagnostics.Analyzer->ParseFile("app.obs");
was_ok := BoolRef->New(false);
errs := analysis->GetDiagnostics(was_ok, "file:///app.obs", "/usr/lib/objeck");
if(errs <> Nil) {
  each(i : errs) { errs[i]->ToString()->PrintLine(); };
};
analysis->Release();

GetSymbols #

Get source code analysis symbols

method : public : GetSymbols(uri:String, sys_path:String) ~ Result

Parameters

NameTypeDescription
uriStringfile uri
sys_pathStringsystem library path

Return

TypeDescription
Resultanalysis symbols

Example

analysis := System.Diagnostics.Analyzer->ParseFile("app.obs");
if(analysis->IsParsed()) {
  syms := analysis->GetSymbols("file:///app.obs", "/usr/lib/objeck");
  syms->ToString()->PrintLine(); # root symbol tree entry
  analysis->Release();
};

HasUses #

Check to see if user 'use' statement are present

method : public : HasUses() ~ Bool

Return

TypeDescription
Booltrue if user 'use' statement are present, false otherwise

Hover #

Gets hover signatures

method : public : Hover(uri:String, line:Int, pos:Int, var_str:String, mthd_str:String, sys_path:String) ~ Result

Parameters

NameTypeDescription
uriStringfile uri
lineIntline of symbol
posIntcharacter position of symbol
var_strStringvariable string name
mthd_strStringmethod string name
sys_pathStringsystem library path

Return

TypeDescription
Resulthover references, Nil if none found

Example

analysis := System.Diagnostics.Analyzer->ParseFile("app.obs");
hover := analysis->Hover("file:///app.obs", 20, 12, "conn", "Close", "/usr/lib/objeck");
if(hover <> Nil) {
  hover->GetDescription()->PrintLine(); # show signature markdown
};
analysis->Release();

IncomingCalls #

Finds all methods that call the target method

method : public : IncomingCalls(uri:String, line:Int, pos:Int, sys_path:String) ~ Result[]

Parameters

NameTypeDescription
uriStringfile uri
lineIntline of symbol
posIntcharacter position of symbol
sys_pathStringsystem library path

Return

TypeDescription
Resultincoming call locations, Nil if not found

InlayHints #

Gets inlay hints for a range of lines

method : public : InlayHints(uri:String, start_line:Int, end_line:Int, sys_path:String) ~ Result[]

Parameters

NameTypeDescription
uriStringfile uri
start_lineIntstart line of range
end_lineIntend line of range
sys_pathStringsystem library path

Return

TypeDescription
Resultinlay hints, Nil if none found

IsParsed #

Check to see if source was parsed

method : public : IsParsed() ~ Bool

Return

TypeDescription
Booltrue if parsed, false otherwise

Example

analysis := System.Diagnostics.Analyzer->ParseFile("app.obs");
if(analysis->IsParsed()) {   # true = no syntax errors
  "OK"->PrintLine();
} else {
  "Syntax error"->PrintLine();
};
analysis->Release();

OutgoingCalls #

Finds all methods called by the target method

method : public : OutgoingCalls(uri:String, line:Int, pos:Int, sys_path:String) ~ Result[]

Parameters

NameTypeDescription
uriStringfile uri
lineIntline of symbol
posIntcharacter position of symbol
sys_pathStringsystem library path

Return

TypeDescription
Resultoutgoing call locations, Nil if not found

PrepareCallHierarchy #

Prepares call hierarchy item at cursor

method : public : PrepareCallHierarchy(uri:String, line:Int, pos:Int, sys_path:String) ~ Result

Parameters

NameTypeDescription
uriStringfile uri
lineIntline of symbol
posIntcharacter position of symbol
sys_pathStringsystem library path

Return

TypeDescription
Resultcall hierarchy item, Nil if not found

PrepareTypeHierarchy #

Return the class-level TypeHierarchyItem at the cursor. Backs textDocument/prepareTypeHierarchy. When the cursor is on a class header, returns that class; when inside a method body, returns the enclosing class. Delegates to FindDefinition since the LSP only needs a "seed" Result that supertypes/subtypes can subsequently operate on.

method : public : PrepareTypeHierarchy(uri:String, line:Int, pos:Int, sys_path:String) ~ Result

Parameters

NameTypeDescription
uriStringfile uri
lineIntline of cursor
posIntcharacter position of cursor
sys_pathStringsystem library path

Return

TypeDescription
Resultseed class Result, Nil if cursor is not on or inside a class

Release #

Release native resources, required for clean up.

method : public : Release() ~ Nil

Example

analysis := System.Diagnostics.Analyzer->ParseFile("app.obs");
# ... use analysis ...
analysis->Release(); # always release to free C-side parse tree

SemanticTokens #

Gets semantic tokens for the file

method : public : SemanticTokens(uri:String, sys_path:String) ~ Result[]

Parameters

NameTypeDescription
uriStringfile uri
sys_pathStringsystem library path

Return

TypeDescription
Resultsemantic tokens, Nil if none found

SignatureHelp #

Get signature definitions

method : public : SignatureHelp(uri:String, line:Int, pos:Int, var_str:String, mthd_str:String, sys_path:String) ~ Result

Parameters

NameTypeDescription
uriStringfile uri
lineIntline of symbol
posIntcharacter position of symbol
var_strStringvariable string name
mthd_strStringmethod string name
sys_pathStringsystem library path

Return

TypeDescription
Resultsymbol references, Nil of none found

TypeHierarchySubtypes #

Return classes that directly extend the class at the cursor (and any classes implementing it if it is an interface). Backs typeHierarchy/subtypes. Delegates to FindImplementation, which already walks every bundle for classes whose parent matches the target.

method : public : TypeHierarchySubtypes(uri:String, line:Int, pos:Int, sys_path:String) ~ Result[]

Parameters

NameTypeDescription
uriStringfile uri
lineIntline of cursor
posIntcharacter position of cursor
sys_pathStringsystem library path

Return

TypeDescription
Resultdirect subtype classes, Nil if no subtypes exist

TypeHierarchySupertypes #

Walk the parent chain of the class at the cursor, returning each supertype in order (immediate parent first, then grandparent, ...). Backs typeHierarchy/supertypes. User-space only - stops at the first parent that resolves to a library class.

method : public : TypeHierarchySupertypes(uri:String, line:Int, pos:Int, sys_path:String) ~ Result[]

Parameters

NameTypeDescription
uriStringfile uri
lineIntline of cursor
posIntcharacter position of cursor
sys_pathStringsystem library path

Return

TypeDescription
Resultsupertype classes (nearest parent first), Nil if no parent found

WorkspaceSymbols #

Return every workspace symbol whose name contains the query substring (case-insensitive). Backs workspace/symbol (Ctrl+T in VS Code). Matches across every parsed class, method, and enum.

method : public : WorkspaceSymbols(query:String, sys_path:String) ~ Result[]

Parameters

NameTypeDescription
queryStringsubstring to match; empty query returns every named symbol
sys_pathStringsystem library path

Return

TypeDescription
Resultflat list of symbol Result entries, Nil if nothing matched