parser

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Overview

Package parser implements utilities for parsing River configuration files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseExpression

func ParseExpression(expr string) (ast.Expr, error)

ParseExpression parses a single River expression from expr.

If an error was encountered during parsing, the returned expression will be nil and err will be an ErrorList with all the errors encountered during parsing.

func ParseFile

func ParseFile(filename string, data []byte) (*ast.File, error)

ParseFile parses an entire River configuration file. The data parameter should hold the file contents to parse, while the filename parameter is used for reporting errors.

If an error was encountered during parsing, the returned AST will be nil and err will be an diag.Diagnostics all the errors encountered during parsing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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