ast

package
v0.0.0-...-7a5fecb Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine is the analysis engine

func NewEngine

func NewEngine(path string, src any) *Engine

NewEngine creates a new Engine instance path is the path of the source code, if not exists, pass an empty string src is the source code, if not exists, pass nil path and src must not be nil at the same time

func (*Engine) CheckControlFlow

func (e *Engine) CheckControlFlow() bool

CheckControlFlow checks if the control flow (if, for, switch, select) is nested more than 4 times returns true if control flow is not nested more than 4 times, otherwise false

func (*Engine) CheckIdentifiers

func (e *Engine) CheckIdentifiers() bool

CheckIdentifiers checks if the identifiers' length is equal to 13 returns true if all identifiers' length is not equal to 13, otherwise false

Jump to

Keyboard shortcuts

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