public void Visit(ComparerNode node)
 {
     Visit(node as BinaryNode);
     if (object_return_type)
     {
         Code.Add(new AssignStrToVarCodeLine(return_type, "Bool"));
     }
 }
Example #2
0
        public void Visit(ComparerNode node)
        {
            node.Rigthexpr.Accept(this);
            node.Leftexpr.Accept(this);

            if (node.Leftexpr.staticType.Text != "Int" || node.Rigthexpr.staticType.Text != "Int")
            {
                errors.Add(ErrorSemantic.InvalidUseOfOperator(node, node.Leftexpr.staticType, node.Rigthexpr.staticType));
            }

            if (!scope.IsDefinedType("Bool", out node.staticType))
            {
                errors.Add(ErrorSemantic.NotDeclaredType(new TypeNode(node.line, node.column, "Bool")));
            }
        }
Example #3
0
 public bool TryGetValue(TKey key, out TValue value)
 {
     return(m_tree.TryFind(ComparerNode.Create(m_comparer, key), out value));
 }
Example #4
0
 public ImmutableMap <TKey, TValue> Delete(TKey key)
 {
     return(new ImmutableMap <TKey, TValue>(m_comparer, m_tree.Delete(ComparerNode.Create(m_comparer, key))));
 }
Example #5
0
 public ImmutableMap <TKey, TValue> Update(TKey key, TValue value)
 {
     return(new ImmutableMap <TKey, TValue>(m_comparer, m_tree.Update(ComparerNode.Create(m_comparer, key), value)));
 }
Example #6
0
 public TValue this[TKey key]
 {
     get { return(m_tree.Find(ComparerNode.Create(m_comparer, key)).Value); }
 }
Example #7
0
        public bool ContainsKey(TKey key)
        {
            TValue value;

            return(m_tree.TryFind(ComparerNode.Create(m_comparer, key), out value));
        }
 public void Visit(ComparerNode node)
 {
     throw new NotImplementedException();
 }