class Savi::Compiler::ServeHover

Overview

The purpose of the ServeHover pass is to serve up information about a given hover position in the source code, represented as a Source::Pos. When the [] method is called with a Source::Pos, it returns an Array(String) of messages describing the entity at that position, as well as an output Source::Pos value that points to the entirety of that entity's source.

This pass does not mutate the Program topology. This pass does not mutate the AST. This pass does not raise any compilation errors. This pass keeps no state other than holding onto the Context. This pass produces no output state.

Defined in:

savi/compiler/serve_hover.cr

Instance Method Summary

Instance Method Detail

def [](f_link : Program::Function::Link, node : AST::Node) #

[View source]
def [](pos : Source::Pos) #

[View source]
def ctx : Context #

[View source]
def ctx? : Context | Nil #

[View source]
def run(ctx : Nil | Savi::Compiler::Context) #

[View source]