parser

package
v0.0.0-...-abfd595 Latest Latest
Warning

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

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

Documentation

Overview

Package parser parses Python files and returns relevant information to the Gazelle Python extension.

It is currently using a Python AST parser written in Go, which implements the spec from Python 3.4. If this is insufficient, this package will need to be rewritten to farm out the processing to a pool of running Python processes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Imports          []string
	HasMainNameCheck bool
}

func Parse

func Parse(r io.Reader, filename string) (Result, error)

Parse parses a Python module read by the reader.

func ParsePath

func ParsePath(path string) (Result, error)

ParsePath parses a Python module at the given path.

Jump to

Keyboard shortcuts

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