parser

package
v0.0.0-...-6c20dd6 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseFile

func ParseFile(filename string, src interface{}) (m *ast.Module, err error)

ParseFile parses the source code from the specified file or Reader and returns the Go structure representation of the Abstract Syntax Tree (AST). The source code can be provided directly as a string or []byte, or indirectly via a filename or an io.Reader. If src is nil, the function reads the content from the provided filename.

func ParseFileASTJson

func ParseFileASTJson(filename string, src interface{}) (result string, err error)

ParseFileASTJson parses the source code from the specified file or Reader and returns the JSON representation of the Abstract Syntax Tree (AST). The source code can be provided directly as a string or []byte, or indirectly via a filename or an io.Reader. If src is nil, the function reads the content from the provided filename.

Types

type ParseProgramArgs

type ParseProgramArgs = gpyrpc.ParseProgram_Args

type ParseProgramResult

type ParseProgramResult = gpyrpc.ParseProgram_Result

func ParseProgram

func ParseProgram(args *ParseProgramArgs) (*ParseProgramResult, error)

Parse KCL program with entry files and return the AST JSON string.

Jump to

Keyboard shortcuts

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