impl

package
v0.721.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package impl implements LSP for sysl.

Index

Constants

This section is empty.

Variables

View Source
var ServerExitFunc = os.Exit

ServerExitFunc is used to exit when requested by the client. It is mutable for testing purposes.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements the protocol.Server interface.

func NewServer

func NewServer(client protocol.Client) *Server

NewServer creates an LSP server and binds it to handle incoming client messages on on the supplied stream.

func (*Server) CodeAction

func (s *Server) CodeAction(ctx context.Context, params *protocol.CodeActionParams) ([]protocol.CodeAction, error)

func (*Server) CodeLens

func (s *Server) CodeLens(ctx context.Context, params *protocol.CodeLensParams) ([]protocol.CodeLens, error)

func (*Server) CodeLensRefresh

func (s *Server) CodeLensRefresh(context.Context) error

func (*Server) Completion

func (s *Server) Completion(ctx context.Context, params *protocol.CompletionParams) (*protocol.CompletionList, error)

func (*Server) Definition

func (s *Server) Definition(ctx context.Context, params *protocol.DefinitionParams) (protocol.Definition, error)

func (*Server) Diagnostic

func (s *Server) Diagnostic(context.Context, *string) (*string, error)

func (*Server) DiagnosticRefresh

func (s *Server) DiagnosticRefresh(context.Context) error

func (*Server) DidChange

func (s *Server) DidChange(ctx context.Context, params *protocol.DidChangeTextDocumentParams) error

func (*Server) DidChangeConfiguration

func (s *Server) DidChangeConfiguration(context.Context, *protocol.DidChangeConfigurationParams) error

func (*Server) DidChangeWatchedFiles

func (s *Server) DidChangeWatchedFiles(context.Context, *protocol.DidChangeWatchedFilesParams) error

func (*Server) DidChangeWorkspaceFolders

func (s *Server) DidChangeWorkspaceFolders(context.Context, *protocol.DidChangeWorkspaceFoldersParams) error

func (*Server) DidClose

func (s *Server) DidClose(ctx context.Context, params *protocol.DidCloseTextDocumentParams) error

func (*Server) DidCreateFiles

func (s *Server) DidCreateFiles(context.Context, *protocol.CreateFilesParams) error

func (*Server) DidDeleteFiles

func (s *Server) DidDeleteFiles(context.Context, *protocol.DeleteFilesParams) error

func (*Server) DidOpen

func (s *Server) DidOpen(ctx context.Context, params *protocol.DidOpenTextDocumentParams) error

func (*Server) DidRenameFiles

func (s *Server) DidRenameFiles(context.Context, *protocol.RenameFilesParams) error

func (*Server) DidSave

func (s *Server) DidSave(ctx context.Context, params *protocol.DidSaveTextDocumentParams) error
func (s *Server) DocumentLink(ctx context.Context, params *protocol.DocumentLinkParams) ([]protocol.DocumentLink, error)

func (*Server) DocumentSymbol

func (s *Server) DocumentSymbol(context.Context, *protocol.DocumentSymbolParams) ([]interface{}, error)

func (*Server) ExecuteCommand

func (s *Server) ExecuteCommand(ctx context.Context, params *protocol.ExecuteCommandParams) (interface{}, error)

func (*Server) Exit

func (s *Server) Exit(ctx context.Context) error

func (*Server) FoldingRange

func (*Server) Hover

func (s *Server) Hover(ctx context.Context, params *protocol.HoverParams) (*protocol.Hover, error)

func (*Server) Initialize

func (s *Server) Initialize(ctx context.Context, params *protocol.ParamInitialize) (*protocol.InitializeResult, error)

func (*Server) Initialized

func (s *Server) Initialized(ctx context.Context, params *protocol.InitializedParams) error

func (*Server) LogTrace

func (*Server) Moniker

func (*Server) NonstandardRequest

func (s *Server) NonstandardRequest(ctx context.Context, method string, params interface{}) (interface{}, error)

func (*Server) PrepareRename

func (*Server) References

func (*Server) Rename

func (*Server) ResolveCodeAction

func (s *Server) ResolveCodeAction(context.Context, *protocol.CodeAction) (*protocol.CodeAction, error)

func (*Server) ResolveCodeLens

func (s *Server) ResolveCodeLens(context.Context, *protocol.CodeLens) (*protocol.CodeLens, error)
func (s *Server) ResolveDocumentLink(context.Context, *protocol.DocumentLink) (*protocol.DocumentLink, error)

func (*Server) SemanticTokensFullDelta

func (s *Server) SemanticTokensFullDelta(context.Context, *protocol.SemanticTokensDeltaParams) (interface{}, error)

func (*Server) SemanticTokensRefresh

func (s *Server) SemanticTokensRefresh(context.Context) error

func (*Server) SetTrace

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

func (*Server) WillCreateFiles

func (*Server) WillDeleteFiles

func (*Server) WillRenameFiles

func (*Server) WillSave

func (*Server) WorkDoneProgressCancel

func (s *Server) WorkDoneProgressCancel(context.Context, *protocol.WorkDoneProgressCancelParams) error

type SyslErrorListener

type SyslErrorListener struct {
	antlr.ErrorListener

	Errors []protocol.Diagnostic
	// contains filtered or unexported fields
}

func NewSyslErrorListener

func NewSyslErrorListener(ctx context.Context, client protocol.Client) *SyslErrorListener

func (*SyslErrorListener) ReportAmbiguity

func (l *SyslErrorListener) ReportAmbiguity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, exact bool, ambigAlts *antlr.BitSet, configs antlr.ATNConfigSet)

func (*SyslErrorListener) ReportAttemptingFullContext

func (l *SyslErrorListener) ReportAttemptingFullContext(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, conflictingAlts *antlr.BitSet, configs antlr.ATNConfigSet)

func (*SyslErrorListener) ReportContextSensitivity

func (l *SyslErrorListener) ReportContextSensitivity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex, prediction int, configs antlr.ATNConfigSet)

func (*SyslErrorListener) SyntaxError

func (l *SyslErrorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL