improved mixfix_args;
authorwenzelm
Tue, 18 Dec 2001 02:20:23 +0100
changeset 12531 adc39b100e9a
parent 12530 c32d201d7c08
child 12532 7e51804da8f4
improved mixfix_args;
src/Pure/Syntax/mixfix.ML
--- a/src/Pure/Syntax/mixfix.ML	Tue Dec 18 02:20:02 2001 +0100
+++ b/src/Pure/Syntax/mixfix.ML	Tue Dec 18 02:20:23 2001 +0100
@@ -88,7 +88,7 @@
       parens (spaces ["binder", brackets (string_of_int p1), string_of_int p2]);
 
 
-(* type / const names *)
+(* syntax specifications *)
 
 fun strip ("'" :: c :: cs) = c :: strip cs
   | strip ["'"] = []
@@ -118,13 +118,13 @@
   | fix_mixfix c (Infixr p) = (InfixrName (c, p))
   | fix_mixfix _ mx = mx;
 
-
-(* mixfix_args *)
-
 fun mixfix_args NoSyn = 0
   | mixfix_args (Mixfix (sy, _, _)) = SynExt.mfix_args sy
   | mixfix_args (Delimfix sy) = SynExt.mfix_args sy
-  | mixfix_args (*infix or binder*) _ = 2;
+  | mixfix_args (InfixName (sy, _)) = 2 + SynExt.mfix_args sy
+  | mixfix_args (InfixlName (sy, _)) = 2 + SynExt.mfix_args sy
+  | mixfix_args (InfixrName (sy, _)) = 2 + SynExt.mfix_args sy
+  | mixfix_args (*old infix or binder*) _ = 2;
 
 
 (* syn_ext_types *)