Ejemplo n.º 1
0
        private void AddScopeVar(ScriptObject scope_command, bool temporary, ScopeType varType)
        {
            if (!(this == Topmost))
            {
                AddScopeVar(scope_command, temporary);
                return;
            }

            var s = new ScriptScope();

            s.IsValue = true;
            s.To      = varType;
            {
                s.Temporary = temporary;
                s.Name      = scope_command.GetChildStringValue("name");
                if (s.Name == null)
                {
                    return;
                }
                if (scriptScopes.ContainsKey(s.Name))
                {
                    return;
                }

                s.Declared = scope_command;
                if (scope_command == null)
                {
                }

                scriptScopes[s.Name] = s;
            }
        }
Ejemplo n.º 2
0
 public void Add(ScriptObject obj)
 {
     if (obj.Name != null && commandsValuesToExtract.Contains(obj.Name))
     {
         toExport.Add(obj.GetStringValue());
     }
     if (obj.Name != null && childExtractor.ContainsKey(obj.Name))
     {
         toExport.Add(obj.GetChildStringValue(childExtractor[obj.Name]));
     }
 }
Ejemplo n.º 3
0
        public void CompleteScopedVar(ScriptObject scriptObject, ScriptObjectBehaviourData data, ScopeType scopeType)
        {
            var name = scriptObject.GetChildStringValue("name");

            if (!unsortedScopedVariables.ContainsKey(name))
            {
                return;
            }

            foreach (var variable in unsortedScopedVariables[name])
            {
                if (variable.Declared == scriptObject)
                {
                    variable.InsideScope = scopeType;
                }
            }
        }