checks

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	InvalidFunctionNodesStack  common.ListStack[ast.Node]
	InvalidGeneratorNodesStack common.ListStack[ast.Node]
	InvalidLoopNodesStack      common.ListStack[ast.Node]
	// contains filtered or unexported fields
}

Check verifies: - Yield statement is only on generator statements - Break/Continue/Redo are only in loop statements - Return statement is only on functions and generator statements

func NewCheckPass

func NewCheckPass() *Check

func (*Check) CountInvalidFunctionNodes

func (c *Check) CountInvalidFunctionNodes() int

func (*Check) CountInvalidGeneratorNodes

func (c *Check) CountInvalidGeneratorNodes() int

func (*Check) CountInvalidLoopNodes

func (c *Check) CountInvalidLoopNodes() int

func (*Check) Visit

func (c *Check) Visit(node ast.Node) ast.Visitor

Jump to

Keyboard shortcuts

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