Documentation ¶
Index ¶
- Constants
- Variables
- type ParseError
- func DuplicateCase(m *ast.Meta) *ParseError
- func EmptySwitch(m *ast.Meta) *ParseError
- func FinalFallthrough(m *ast.Meta) *ParseError
- func InvalidEscape(m *ast.Meta, msg string) *ParseError
- func MissingColon(m *ast.Meta) *ParseError
- func MissingSemicolon(m *ast.Meta) *ParseError
- func MultipleDefaults(m *ast.Meta) *ParseError
- func TypeConversionError(m *ast.Meta, tt string) *ParseError
- func UndefinedPrefix(m *ast.Meta) *ParseError
- func UnexpectedToken(m *ast.Meta, expects ...string) *ParseError
- type Parser
Constants ¶
View Source
const ( LOWEST int = iota + 1 OR AND REGEX EQUALS LESS_GREATER CONCAT PREFIX POSTFIX CALL )
Reference: https://developer.fastly.com/reference/vcl/operators/
Variables ¶
View Source
var NULLbyte = errors.New("NULL")
Sentinel error for indicating the presence of a NULL byte or zero code point in an escape.
Functions ¶
This section is empty.
Types ¶
type ParseError ¶
func DuplicateCase ¶ added in v1.4.0
func DuplicateCase(m *ast.Meta) *ParseError
func EmptySwitch ¶ added in v1.4.0
func EmptySwitch(m *ast.Meta) *ParseError
func FinalFallthrough ¶ added in v1.4.0
func FinalFallthrough(m *ast.Meta) *ParseError
func InvalidEscape ¶ added in v1.5.0
func InvalidEscape(m *ast.Meta, msg string) *ParseError
func MissingColon ¶ added in v1.4.0
func MissingColon(m *ast.Meta) *ParseError
func MissingSemicolon ¶
func MissingSemicolon(m *ast.Meta) *ParseError
func MultipleDefaults ¶ added in v1.4.0
func MultipleDefaults(m *ast.Meta) *ParseError
func TypeConversionError ¶
func TypeConversionError(m *ast.Meta, tt string) *ParseError
func UndefinedPrefix ¶
func UndefinedPrefix(m *ast.Meta) *ParseError
func UnexpectedToken ¶
func UnexpectedToken(m *ast.Meta, expects ...string) *ParseError
func (*ParseError) Error ¶
func (e *ParseError) Error() string
func (*ParseError) ErrorToken ¶
func (e *ParseError) ErrorToken() token.Token
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) ParseExpression ¶ added in v1.0.0
func (p *Parser) ParseExpression(precedence int) (ast.Expression, error)
Expose global function to be called externally
func (*Parser) ParseSnippetVCL ¶ added in v0.9.3
ParseSnippetVCL is used for snippet parsing. VCL snippet is a piece of vcl code so we should parse like BlockStatement inside, and returns slice of statement.
Click to show internal directories.
Click to hide internal directories.