Просмотр исходного кода

tripl: prepare to write a function define support

rain 4 лет назад
Родитель
Сommit
e8d22dfb9c
1 измененных файлов с 0 добавлено и 69 удалено
  1. 0 69
      arch/arch_templ.c

+ 0 - 69
arch/arch_templ.c

@@ -219,73 +219,4 @@ static int math_set_name(char *p, struct arch *arch_fn) {
 }
 
 
-/* # a - 10
- * a : 10 {
- * 	# = 1
- * 	1:	xxx;
- * 	# = 2
- * 	2: 	yyy;
- * 	# = 4
- * 	4: 	zzz;
- * } */
-
-static int check_condition(char *p, struct arch *arch_fn) {
-	struct condition cond;
-	int type, out;
-
-	getword(p, &type, &out);
-
-	if (type == WORDTYPE_NR) {
-		cond.nra = out;
-
-		_skip_word(p);
-	}
-
-	else if (type == WORDTYPE_NAME) {
-		cond.namea = strndup(p, out);
-		
-		p += out;
-	}
-
-	else 
-		return 0;
-
-	_skip_spaces(p);
-
-	getword(p, &type, &out);
-	
-	getword(p, &type, &out);
-
-	if (type != WORDTYPE_KWORD || out != ':') 
-		return 0;
-
-
-	p++;
-	_skip_spaces(p);
-
-	getword(p, &type, &out);
-
-	if (type == WORDTYPE_NR) {
-		cond.nrb = out;
-
-		_skip_word(p);
-	}
-	
-	else if (type == WORDTYPE_NAME) {
-		cond.nameb = strndup(p, out);
-
-		p += out;
-	}
-
-	else 
-		return 0;
-
-
-	printf("condition: %d %d %s %s\n", 
-			cond.nra, cond.nrb, 
-			cond.namea, cond.nameb);
-
-	return 1;
-}
-