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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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