jvm

package
v0.0.4-beta.10 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package jvm implements lightweight regex-based parsers for JVM languages: Scala and Kotlin. No tree-sitter dependency — pure Go regex extraction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependency

type Dependency struct {
	Path       string
	Type       string // "import"
	LineNumber int
}

Dependency represents an import statement.

type Entity

type Entity struct {
	Name      string
	Type      string // "class", "object", "trait", "interface", "function", "method", "val", "var", "enum", "sealed_class", "data_class", "annotation"
	Kind      string
	Signature string
	StartLine int
	EndLine   int
	Parent    string
}

Entity represents a named code element.

type ParseResult

type ParseResult struct {
	FilePath     string
	Entities     []*Entity
	Dependencies []*Dependency
}

ParseResult is the output of a JVM language parse.

func ParseKotlin

func ParseKotlin(filePath string, content string) *ParseResult

ParseKotlin extracts classes, interfaces, objects, functions, properties, and imports.

func ParseScala

func ParseScala(filePath string, content string) *ParseResult

ParseScala extracts classes, objects, traits, defs, vals, and imports.

Jump to

Keyboard shortcuts

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