Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
scan_deps.VarImpl Class Reference

Public Member Functions

 __init__ (self, local_scope)
 
 lookup (self, var_name)
 

Protected Attributes

 _local_scope
 

Static Protected Attributes

dict _env_vars
 

Detailed Description

Definition at line 35 of file scan_deps.py.

Constructor & Destructor Documentation

◆ __init__()

scan_deps.VarImpl.__init__ (   self,
  local_scope 
)

Definition at line 41 of file scan_deps.py.

41 def __init__(self, local_scope):
42 self._local_scope = local_scope
43

Member Function Documentation

◆ lookup()

scan_deps.VarImpl.lookup (   self,
  var_name 
)
Implements the Var syntax.

Definition at line 44 of file scan_deps.py.

44 def lookup(self, var_name):
45 """Implements the Var syntax."""
46 if var_name in self._local_scope.get('vars', {}):
47 return self._local_scope['vars'][var_name]
48 # Inject default values for env variables.
49 if var_name in self._env_vars:
50 return self._env_vars[var_name]
51 raise Exception('Var is not defined: %s' % var_name)
52
53

Member Data Documentation

◆ _env_vars

dict scan_deps.VarImpl._env_vars
staticprotected
Initial value:
= {
'host_cpu': 'x64',
'host_os': 'linux',
}

Definition at line 36 of file scan_deps.py.

◆ _local_scope

scan_deps.VarImpl._local_scope
protected

Definition at line 42 of file scan_deps.py.


The documentation for this class was generated from the following file: