lingua-franca 0.10.1
Lingua Franca code generator
Loading...
Searching...
No Matches
org.lflang.scoping.LFScopeProviderImpl Class Reference

This class enforces custom rules. More...

Inherits AbstractLFScopeProvider.

Inherited by org.lflang.scoping.LFScopeProvider.

Classes

enum  RefType
 Enumerate of the kinds of references. More...

Public Member Functions

IScope getScope (EObject context, EReference reference)
 Depending on the provided context, construct the appropriate scope for the given reference.

Protected Member Functions

IScope getScopeForAssignment (Assignment assignment, EReference reference)
IScope getScopeForImportedReactor (ImportedReactor context, EReference reference)
 Filter out candidates that do not originate from the file listed in this particular import statement.
IScope getScopeForParameterReference (ParameterReference term, EReference reference)
IScope getScopeForReactorDecl (EObject obj, EReference reference)
IScope getScopeForVarRef (VarRef variable, EReference reference)
IScope getScopeForWidthTerm (WidthTerm term, EReference reference)

Detailed Description

This class enforces custom rules.

In particular, it resolves references to parameters, ports, actions, and timers. Ports can be referenced across at most one level of hierarchy. Parameters, actions, and timers can be referenced locally, within the reactor.

Author
Marten Lohstroh
See also

Member Function Documentation

◆ getScope()

IScope org.lflang.scoping.LFScopeProviderImpl.getScope ( EObject context,
EReference reference )

Depending on the provided context, construct the appropriate scope for the given reference.

Parameters
contextThe AST node in which a to-be-resolved reference occurs.
referenceThe reference to resolve.

◆ getScopeForAssignment()

IScope org.lflang.scoping.LFScopeProviderImpl.getScopeForAssignment ( Assignment assignment,
EReference reference )
protected

◆ getScopeForImportedReactor()

IScope org.lflang.scoping.LFScopeProviderImpl.getScopeForImportedReactor ( ImportedReactor context,
EReference reference )
protected

Filter out candidates that do not originate from the file listed in this particular import statement.

◆ getScopeForParameterReference()

IScope org.lflang.scoping.LFScopeProviderImpl.getScopeForParameterReference ( ParameterReference term,
EReference reference )
protected

◆ getScopeForReactorDecl()

IScope org.lflang.scoping.LFScopeProviderImpl.getScopeForReactorDecl ( EObject obj,
EReference reference )
protected
Parameters
objInstantiation or Reactor that has a ReactorDecl to resolve.
referenceThe reference to link to a ReactorDecl node.

◆ getScopeForVarRef()

IScope org.lflang.scoping.LFScopeProviderImpl.getScopeForVarRef ( VarRef variable,
EReference reference )
protected

◆ getScopeForWidthTerm()

IScope org.lflang.scoping.LFScopeProviderImpl.getScopeForWidthTerm ( WidthTerm term,
EReference reference )
protected

The documentation for this class was generated from the following file:
  • /Users/runner/work/lingua-franca/lingua-franca/core/src/main/java/org/lflang/scoping/LFScopeProviderImpl.java