highlight

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Copyright (c) 2026 Tarek Wasfy

Copyright (c) 2026 Tarek Wasfy

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tokens

func Tokens(ctx context.Context, language Language, text string) ([]syntax.Token, error)

Types

type Language

type Language string
const (
	R      Language = "R"
	Go     Language = "Go"
	Rust   Language = "Rust"
	Cpp    Language = "C++"
	C      Language = "C"
	Python Language = "Python"
	Zig    Language = "Zig"
	Julia  Language = "Julia"
	Nim    Language = "Nim"
	CSharp Language = "C#"
	Java   Language = "Java"
	Kotlin Language = "Kotlin"
	Swift  Language = "Swift"
)

type Request

type Request struct {
	Tag        string
	Generation uint64
	Language   Language
	Reader     io.Reader
}

type Result

type Result struct {
	Tag        string
	Generation uint64
	Tokens     []syntax.Token
	Err        error
}

type Service

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

func NewService

func NewService(wake func()) *Service

func (*Service) Close

func (s *Service) Close()

func (*Service) Results

func (s *Service) Results() <-chan Result

func (*Service) Submit

func (s *Service) Submit(r Request)

Jump to

Keyboard shortcuts

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