class GoRouteGroupScope::Scopes

Overview

The route-group state at one point in a file: the assignment-group table and the stack of closure groups still open at the current brace depth.

Defined in:

tagger/framework_taggers/go/group_scope.cr

Instance Method Summary

Instance Method Detail

def current : Scope #

The innermost enclosing closure group, or Global at file scope.


[View source]
def extend(base : Scope, seg : String) : Scope #

base extended by one path segment. An unresolvable base stays unresolvable — a literal segment under an unknown parent is still unknown.


[View source]
def frames : Array({threshold: Int32, scope: {kind: GoRouteGroupScope::ScopeKind, prefix: String}}) #

Open closure groups, each with the brace depth it lives above.


[View source]
def groups : Hash(String, {kind: GoRouteGroupScope::ScopeKind, prefix: String}) #

Variable name -> the scope it names.


[View source]
def receiver(name : String | Nil) : Scope #

Resolve a receiver token: a tracked group variable, the innermost open closure group, or the global scope.


[View source]