recursive lockstep example
This commit is contained in:
parent
26d0d3158f
commit
e036fa16f8
15 changed files with 536 additions and 133 deletions
|
@ -56,8 +56,8 @@
|
|||
* Trait ({ ... }, creates scoping)
|
||||
*/
|
||||
|
||||
#define MSPH_TREE_ROOT 0x0000
|
||||
#define MSPH_TREE_UNIT 0x0001
|
||||
#define MSPH_TREE_ROOT (0x0000 | MSPH_TREE_FLAG_SCOPE)
|
||||
#define MSPH_TREE_UNIT (0x0001 | MSPH_TREE_FLAG_SCOPE)
|
||||
|
||||
#define MSPH_TREE_BODY 0x0010
|
||||
|
||||
|
@ -72,17 +72,25 @@
|
|||
#define MSPH_TREE_FALSE 0x0042
|
||||
#define MSPH_TREE_NAME 0x0043
|
||||
#define MSPH_TREE_APPL 0x0044
|
||||
#define MSPH_TREE_TRAIT 0x0045
|
||||
#define MSPH_TREE_TRAIT (0x0045 | MSPH_TREE_FLAG_SCOPE)
|
||||
#define MSPH_TREE_CONJ 0x0046
|
||||
#define MSPH_TREE_DISJ 0x0047
|
||||
#define MSPH_TREE_IMPL 0x0048
|
||||
#define MSPH_TREE_ARROW 0x0049
|
||||
#define MSPH_TREE_BOX 0x004a
|
||||
#define MSPH_TREE_FORALL 0x004b
|
||||
#define MSPH_TREE_FORALL (0x004b | MSPH_TREE_FLAG_SCOPE)
|
||||
#define MSPH_TREE_PAREN 0x004c
|
||||
|
||||
#define MSPH_TREE_IDENT 0x0100
|
||||
#define MSPH_TREE_IDENT 0x0080
|
||||
|
||||
#define MSPH_TREE_MASK_ID 0x0fff
|
||||
#define MSPH_TREE_MASK_FLAGS 0xf000
|
||||
|
||||
#define MSPH_TREE_FLAG_SCOPE 0x1000
|
||||
#define MSPH_TREE_FLAG_STATIC_BIND 0x2000
|
||||
|
||||
#define MSPH_TREE_SCOPE(type) (type & MSPH_TREE_FLAG_SCOPE)
|
||||
#define MSPH_TREE_STATIC_BIND(type) (type & MSPH_TREE_FLAG_STATIC_BIND)
|
||||
|
||||
struct msph_tree {
|
||||
int type;
|
||||
|
@ -145,6 +153,7 @@ struct msph_tree_nomindecl {
|
|||
struct msph_tree_dir hdir;
|
||||
|
||||
struct msph_tree_ident *id;
|
||||
struct msph_tree_tpexpr *tp;
|
||||
};
|
||||
|
||||
struct msph_tree_membdecl {
|
||||
|
@ -257,7 +266,6 @@ struct msph_tree_ident {
|
|||
struct msph_nom_decor dec;
|
||||
};
|
||||
|
||||
|
||||
struct msph_tree_root *msph_tree_makeroot(struct msph_ctx *);
|
||||
|
||||
int msph_tree_parse(struct msph_token_stream *, struct msph_tree_root *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue