Ejemplo n.º 1
0
		public void ReplaceInList(literal el, literal newel)
		{
			literals[FindIndexInList(el)] = newel;
		}
Ejemplo n.º 2
0
		public void InsertBefore(literal el, IEnumerable<literal> newels)
		{
			literals.InsertRange(FindIndex(el), newels);
		}
Ejemplo n.º 3
0
		public bool Remove(literal el)
		{
			return literals.Remove(el);
		}
Ejemplo n.º 4
0
		public void visit(literal _literal)
		{
			bw.Write((Int16)112);
			write_literal(_literal);
		}
Ejemplo n.º 5
0
 public override void visit(literal _literal)
 {
     AddPossibleComments(_literal, true, true);
 }
		public void visit(literal _literal)
		{
			read_literal(_literal);
		}
Ejemplo n.º 7
0
 public override void visit(literal _literal)
 {
     //throw new Exception("The method or operation is not implemented.");
 }
Ejemplo n.º 8
0
		// Методы списка
		public literal_const_line Add(literal elem, SourceContext sc = null)
		{
			literals.Add(elem);
			if (sc != null)
				source_context = sc;
			return this;
		}
Ejemplo n.º 9
0
		public void AddFirst(literal el)
		{
			literals.Insert(0, el);
		}
Ejemplo n.º 10
0
 public void CompareInternal(literal left, literal right)
 {
     if (left == null && right != null || left != null && right == null)
         throw_not_equal(left, right);
     if (left != null && right != null)
     {
         if (left.GetType() != right.GetType())
             throw_not_equal(left, right);
         /*Type t = left.GetType();
         MethodInfo mi = typeof(SyntaxTreeComparer).GetMethod("CompareInternal", new Type[] { t, t });
         mi.Invoke(this, new object[] { left, right });*/
         if (left is char_const)
             CompareInternal(left as char_const, right as char_const);
         else if (left is sharp_char_const)
             CompareInternal(left as sharp_char_const, right as sharp_char_const);
         else if (left is string_const)
             CompareInternal(left as string_const, right as string_const);
         else
             throw new NotImplementedException(left.GetType().ToString());
     }
 }
Ejemplo n.º 11
0
		// Конструкторы списка
		public literal_const_line(literal elem, SourceContext sc = null)
		{
			Add(elem, sc);
		}
Ejemplo n.º 12
0
		public literal_const_line Add(literal _literal, SourceContext sc)
		{
		    literals.Add(_literal);
		    source_context = sc;
		    return this;
		}
Ejemplo n.º 13
0
		public literal_const_line Add(literal _literal)
		{
		    literals.Add(_literal);
		    return this;
		}
Ejemplo n.º 14
0
		public literal_const_line(literal _literal, SourceContext sc)
		{
		    Add(_literal,sc);
		}
Ejemplo n.º 15
0
		public void ReplaceInList(literal el, IEnumerable<literal> newels)
		{
			var ind = FindIndexInList(el);
			literals.RemoveAt(ind);
			literals.InsertRange(ind, newels);
		}
Ejemplo n.º 16
0
		private int FindIndexInList(literal el)
		{
			var ind = literals.FindIndex(x => x == el);
			if (ind == -1)
				throw new Exception(string.Format("У списка {0} не найден элемент {1} среди дочерних\n", this, el));
			return ind;
		}
Ejemplo n.º 17
0
		public override void visit(literal _literal)
		{
			
		}
Ejemplo n.º 18
0
		public void InsertAfter(literal el, literal newel)
		{
			literals.Insert(FindIndex(el) + 1, newel);
		}
Ejemplo n.º 19
0
		public void read_literal(literal _literal)
		{
			read_const_node(_literal);
		}
Ejemplo n.º 20
0
		public void InsertAfter(literal el, IEnumerable<literal> newels)
		{
			literals.InsertRange(FindIndex(el) + 1, newels);
		}
Ejemplo n.º 21
0
 public override void visit(literal _literal)
 {
     //throw new NotImplementedException();
 }
Ejemplo n.º 22
0
		public void InsertBefore(literal el, literal newel)
		{
			literals.Insert(FindIndex(el), newel);
		}
Ejemplo n.º 23
0
		public void write_literal(literal _literal)
		{
			write_const_node(_literal);
		}
		public void Replace(literal el, literal newel)
		{
			literals[FindIndex(el)] = newel;
		}