fsast

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package fsast provides a way to build an abstract syntax tree (AST) of a file system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(subFs fs.FS, root *AstNode) error

Types

type AstNode

type AstNode struct {
	NodeType NodeType
	Path     string
	Content  []byte
	Leafs    []*AstNode
}

func New

func New(subFs fs.FS) (*AstNode, error)

func (*AstNode) String

func (n *AstNode) String() string

type NodeType

type NodeType string
const (
	DirNodeType  NodeType = "dir"
	FileNodeType NodeType = "file"
)

Jump to

Keyboard shortcuts

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