lexical

package
v0.97.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackslashEscapesNext added in v0.81.3

func BackslashEscapesNext(quote, current byte, hasNext bool) bool

BackslashEscapesNext reports whether the current backslash consumes the following byte in a quoted string. Backtick strings are raw.

func CanStartQuote

func CanStartQuote(source string, position, start int) bool

CanStartQuote reports whether a quote at position begins a quoted value within the source region starting at start.

func DecodeDoubleQuotedString added in v0.94.1

func DecodeDoubleQuotedString(source string) (string, error)

DecodeDoubleQuotedString decodes a complete double-quoted literal using the same grammar as expr-lang. Plain, valid literals return a source substring without allocation; escaped or unusual source is parsed by expr-lang.

func HashStartsIteratorExpression added in v0.95.0

func HashStartsIteratorExpression(source string, index int) bool

HashStartsIteratorExpression checks for the expression forms supported by Flow's projection hash placeholder without parsing or allocating.

func IsHashLineComment added in v0.95.0

func IsHashLineComment(source string, index int) bool

IsHashLineComment distinguishes a line-leading expression comment from an iterator placeholder followed by a selector or operator.

func IsHeaderComment

func IsHeaderComment(text string) bool

IsHeaderComment reports whether text begins with a supported whole-line comment marker.

func NormalizeNumericSeparators added in v0.95.0

func NormalizeNumericSeparators(raw string) (string, error)

NormalizeNumericSeparators validates and removes digit-grouping underscores from a numeric literal.

Types

This section is empty.

Jump to

Keyboard shortcuts

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