|
@@ -557,11 +557,13 @@ and expr = parser
|
|
|
| EUnop (Neg,Prefix,(EConst (Int i),pc)),p -> EConst (Int (neg i)),p
|
|
|
| EUnop (Neg,Prefix,(EConst (Float j),pc)),p -> EConst (Float (neg j)),p
|
|
|
| e -> e)
|
|
|
+ (*/* removed unary + : this cause too much syntax errors go unnoticed, such as "a + + 1" (missing 'b')
|
|
|
+ without adding anything to the language
|
|
|
| [< '(Binop OpAdd,p1); s >] ->
|
|
|
(match s with parser
|
|
|
| [< '(Const (Int i),p); e = expr_next (EConst (Int i),p) >] -> e
|
|
|
| [< '(Const (Float f),p); e = expr_next (EConst (Float f),p) >] -> e
|
|
|
- | [< >] -> serror())
|
|
|
+ | [< >] -> serror()) */*)
|
|
|
| [< '(Kwd For,p); '(POpen,_); name = any_ident; '(Kwd In,_); it = expr; '(PClose,_); s >] ->
|
|
|
(try
|
|
|
let e = expr s in
|