mirror of
https://github.com/AdaCore/langkit.git
synced 2026-02-12 12:28:12 -08:00
langkit.envs: fix pastos
TN: S730-046
This commit is contained in:
committed by
Pierre-Marie de Rodat
parent
a2e8a158d0
commit
dbfa665da0
@@ -207,12 +207,12 @@ class EnvSpec(object):
|
||||
actions = list(actions)
|
||||
|
||||
self.env_hook = None
|
||||
if isinstance(actions and actions[0], CallEnvHook):
|
||||
if actions and isinstance(actions[0], CallEnvHook):
|
||||
self.env_hook = actions.pop(0)
|
||||
":type: SetInitialEnv"
|
||||
|
||||
self.initial_env = None
|
||||
if isinstance(actions and actions[0], SetInitialEnv):
|
||||
if actions and isinstance(actions[0], SetInitialEnv):
|
||||
self.initial_env = actions.pop(0)
|
||||
":type: SetInitialEnv"
|
||||
|
||||
@@ -588,6 +588,7 @@ class SetInitialEnv(ExprHolderAction):
|
||||
# that a SetInitialEnv instance has found its way into a regular action
|
||||
# list.
|
||||
check_source_language(
|
||||
False,
|
||||
"set_initial_env can only be preceded by call_env_hook"
|
||||
)
|
||||
|
||||
@@ -598,6 +599,7 @@ class CallEnvHook(ExprHolderAction):
|
||||
# that a CallEnvHook instance has found its way into a regular action
|
||||
# list.
|
||||
check_source_language(
|
||||
False,
|
||||
"set_initial_env must be first in the action list"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user