Documentation
¶
Overview ¶
Package lexerql provides utilities for lexing in *QL languages.
Index ¶
- func IsDigit[R char](r R) bool
- func IsDurationRune[R char](r R) bool
- func IsIdentRune[R char](r R) bool
- func IsIdentStartRune[R char](r R) bool
- func IsLetter[R char](r R) bool
- func ParseDuration(s string) (time.Duration, error)
- func ScanComment(s *scanner.Scanner)
- func ScanDuration(s *scanner.Scanner, number string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDurationRune ¶
func IsDurationRune[R char](r R) bool
IsDurationRune returns true, if r is a non-digit rune that could be part of duration.
func IsIdentRune ¶
func IsIdentRune[R char](r R) bool
IsIdentRune returns true, if r is a valid character of Go identifier/Prometheus label.
func IsIdentStartRune ¶
func IsIdentStartRune[R char](r R) bool
IsIdentStartRune returns true, if r is a valid first character of Go identifier/Prometheus label.
func ParseDuration ¶
ParseDuration parses Prometheus or Go duration
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.