mtasc/mtasc.patch

changeset 113
29f149b6e2be
parent 112
6052d0605a74
     1.1 --- a/mtasc/mtasc.patch	Wed Feb 25 13:55:52 2009 +0100
     1.2 +++ b/mtasc/mtasc.patch	Wed Feb 25 13:58:24 2009 +0100
     1.3 @@ -15,3 +15,44 @@
     1.4  -		prerr_endline msg; exit 1
     1.5  \ No newline at end of file
     1.6  +		prerr_endline msg; exit 1
     1.7 +Index: ocaml/mtasc/parser.ml
     1.8 +--- ocaml/mtasc/parser.ml.orig	2007-02-04 14:56:04.000000000 +0100
     1.9 ++++ ocaml/mtasc/parser.ml	2009-02-25 13:52:56.848237653 +0100
    1.10 +@@ -166,8 +166,8 @@
    1.11 + 	| [< '(Kwd For,p); '(POpen,_); c = parse_expr_opt; e = parse_for p c >] -> e
    1.12 + 	| [< '(Kwd If,p); cond = parse_eval; e = parse_expr_opt; e2 , p2 = parse_else (pos e) >] -> EIf (cond,wrap_var e,e2), punion p p2
    1.13 + 	| [< '(Kwd Return,p); v , p2 = parse_eval_option p; >] -> EReturn v , punion p p2
    1.14 +-	| [< '(Kwd Break,p); >] -> EBreak , p
    1.15 +-	| [< '(Kwd Continue,p); >] -> EContinue , p
    1.16 ++	| [< '(Kwd Break,p); placeholder1 >] -> EBreak , p
    1.17 ++	| [< '(Kwd Continue,p); placeholder2 >] -> EContinue , p
    1.18 + 	| [< '(Kwd While,p1); v = parse_eval; e = parse_expr_opt >] -> EWhile (v,wrap_var e,NormalWhile) , punion p1 (pos e)
    1.19 + 	| [< '(Kwd Do,p1); e = parse_expr; '(Kwd While,_); v = parse_eval; >] -> EWhile (v,wrap_var e,DoWhile) , punion p1 (pos v)
    1.20 + 	| [< '(Kwd Switch,p1); v = parse_eval; '(BrOpen,_); el, p2 = parse_switch false >] -> ESwitch (v,el) , punion p1 p2
    1.21 +@@ -278,7 +278,7 @@
    1.22 + 
    1.23 + and parse_expr_opt = parser
    1.24 + 	| [< e = parse_expr >] -> e
    1.25 +-	| [< '(Next,p); >] -> EBlock [] , p
    1.26 ++	| [< '(Next,p); placeholder3 >] -> EBlock [] , p
    1.27 + 
    1.28 + and parse_for p c = parser
    1.29 + 	| [< '(Kwd In,_); v = parse_eval; '(PClose,p2); e = parse_expr_opt >] -> EForIn(c,v,wrap_var e) , punion p p2
    1.30 +@@ -324,7 +324,7 @@
    1.31 + and parse_block callb sp = parser
    1.32 + 	| [< e = callb; el,p = parse_block callb sp >] -> e :: el , p
    1.33 + 	| [< '(Next,_); el = parse_block callb sp >] -> el
    1.34 +-	| [< '(BrClose,p); >] -> [] , p
    1.35 ++	| [< '(BrClose,p); placeholder4 >] -> [] , p
    1.36 + 	| [< '(Eof,_) >] -> error Unclosed_parenthesis sp
    1.37 + 
    1.38 + and parse_expr_list p = parser
    1.39 +@@ -351,7 +351,7 @@
    1.40 + 
    1.41 + and parse_import = parser
    1.42 + 	| [< '(Const (Ident name),_); p = parse_import2 name >] -> p
    1.43 +-	| [< '(Binop OpMult,_); >] -> [] , None
    1.44 ++	| [< '(Binop OpMult,_); placeholder5 >] -> [] , None
    1.45 + 
    1.46 + and parse_import2 name = parser
    1.47 + 	| [< '(Dot,_); p , n = parse_import >] -> name :: p , n

mercurial