diff options
| author | Graydon Hoare <[email protected]> | 2010-11-02 17:20:57 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-11-02 17:20:57 -0700 |
| commit | 7abf6eb7c67dfb43540fdcafd6f1e69bdd2a6849 (patch) | |
| tree | 1abdd0450b778fad9341365bb577da2548447feb /src/boot/fe/pexp.ml | |
| parent | Split out stratum-checking pass, implement more-strict (overly aggressive) im... (diff) | |
| download | rust-7abf6eb7c67dfb43540fdcafd6f1e69bdd2a6849.tar.xz rust-7abf6eb7c67dfb43540fdcafd6f1e69bdd2a6849.zip | |
Shift obj, type, param decls to have strata rather than effects.
Diffstat (limited to 'src/boot/fe/pexp.ml')
| -rw-r--r-- | src/boot/fe/pexp.ml | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/boot/fe/pexp.ml b/src/boot/fe/pexp.ml index 59cfaf75..1b26431d 100644 --- a/src/boot/fe/pexp.ml +++ b/src/boot/fe/pexp.ml @@ -273,14 +273,15 @@ and parse_atomic_ty (ps:pstate) : Ast.ty = bump ps; Ast.TY_mach m - | ABS | STATE | GC | IMPURE | UNSAFE | OBJ | FN | ITER -> - let _ = parse_opacity ps in - let _ = parse_stratum ps in + | STATE | GC | IMPURE | UNSAFE | OBJ | FN | ITER -> + let stratum = parse_stratum ps in let effect = parse_effect ps in begin match peek ps with OBJ -> bump ps; + if effect <> Ast.EFF_pure + then raise (err "effect specified for obj" ps); let methods = Hashtbl.create 0 in let parse_method ps = let effect = parse_effect ps in @@ -294,9 +295,11 @@ and parse_atomic_ty (ps:pstate) : Ast.ty = in ignore (bracketed_zero_or_more LBRACE RBRACE None parse_method ps); - Ast.TY_obj (effect, methods) + Ast.TY_obj (stratum, methods) | FN | ITER -> + if stratum <> Ast.STRAT_value + then raise (err "stratum specified for fn or iter" ps); Ast.TY_fn (fst (parse_ty_fn effect ps)) | _ -> raise (unexpected ps) end |