Ejemplo n.º 1
0
 private void DeclareNewVariable(Identifier key, IResolvable value)
 {
     if (ReferenceTables.ContainsIdentifier(key))
     {
         Exceptions.Add(new RedeclaredVariableWarning("Redeclared variable detected: " + key, key.SourceLocation));
     }
     ReferenceTables.SetReference(key, value);
 }
Ejemplo n.º 2
0
        public void Visit(QuestionUnit node)
        {
            ReferenceTables.SetReference(node.Identifier, node.DataType);

            if (!ReferenceTables.ContainsReference(node.DataType))
            {
                var wrapper = _terminalWrapperFactory.CreateWrapper(node.DataType);
                node.Value = wrapper;
                ReferenceTables.SetValue(node.DataType, wrapper);
            }
        }
Ejemplo n.º 3
0
 public void Visit(StatementUnit node)
 {
     node.Expression.Accept(this);
     ReferenceTables.SetReference(node.Identifier, node.Expression);
 }