CodeQL library for Go
codeql/go-all 2.1.4-dev (changelog, source)
Search

Class LocalScope

A local scope.

Import path

import semmle.go.Scopes

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

getEnclosingFunctionScope

Gets the function scope in which this scope is nested.

getNode

Gets the AST node inducing this scope.

toString

Inherited predicates

getAnInnerScope

Gets a scope nested inside this scope.

from Scope
getEntity

Looks up the entity with the given name in this scope.

from Scope
getFile

Gets the file this program element comes from.

from Locatable
getLocation

Gets this element’s location.

from Locatable
getNumLines

Gets the number of lines covered by this element.

from Locatable
getOuterScope

Gets the enclosing scope of this scope, if any.

from Scope
hasLocationInfo

Holds if this element is at the specified location. The location spans column startcolumn of line startline to column endcolumn of line endline in file filepath. For more information, see Locations.

from Locatable