summaryrefslogtreecommitdiff
path: root/parse/parse.h
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-07-03 22:32:50 -0700
committerOri Bernstein <ori@eigenstate.org>2017-07-03 23:27:02 -0700
commitf45a27f1db8e7c29671b7793fd131334194df000 (patch)
treec3179ca5a36205a2d12ad477b3fd7e1b3c8d7894 /parse/parse.h
parent871ef281aaf3c2e8bdff5d92355461bedfa5d933 (diff)
downloadmc-f45a27f1db8e7c29671b7793fd131334194df000.tar.gz
Clean up indentation of comments.
Diffstat (limited to 'parse/parse.h')
-rw-r--r--parse/parse.h112
1 files changed, 56 insertions, 56 deletions
diff --git a/parse/parse.h b/parse/parse.h
index b0d5628..119e1b0 100644
--- a/parse/parse.h
+++ b/parse/parse.h
@@ -98,12 +98,12 @@ struct Stab {
/* Contents of stab.
* types and values are in separate namespaces. */
Htab *dcl;
- Htab *env; /* the syms we close over, if we're a function */
- Htab *ty; /* types */
- Htab *tr; /* traits */
- Htab *uc; /* union constructors */
- Htab *lbl; /* labels */
- Htab *impl; /* trait implementations: really a set of implemented traits. */
+ Htab *env; /* the syms we close over, if we're a function */
+ Htab *ty; /* types */
+ Htab *tr; /* traits */
+ Htab *uc; /* union constructors */
+ Htab *lbl; /* labels */
+ Htab *impl; /* trait implementations: really a set of implemented traits. */
};
struct Type {
@@ -112,45 +112,45 @@ struct Type {
Srcloc loc;
Vis vis;
- Bitset *traits; /* the type constraints matched on this type */
+ Bitset *traits; /* the type constraints matched on this type */
- Type **gparam; /* Tygeneric: type parameters that match the type args */
- size_t ngparam; /* Tygeneric: count of type parameters */
- Type **arg; /* Tyname: type arguments instantiated */
- size_t narg; /* Tyname: count of type arguments */
- Type **inst; /* Tyname: instances created */
- size_t ninst; /* Tyname: count of instances created */
+ Type **gparam; /* Tygeneric: type parameters that match the type args */
+ size_t ngparam; /* Tygeneric: count of type parameters */
+ Type **arg; /* Tyname: type arguments instantiated */
+ size_t narg; /* Tyname: count of type arguments */
+ Type **inst; /* Tyname: instances created */
+ size_t ninst; /* Tyname: count of instances created */
- Type **sub; /* sub-types; shared by all composite types */
- size_t nsub; /* For compound types */
- size_t nmemb; /* for aggregate types (struct, union) */
+ Type **sub; /* sub-types; shared by all composite types */
+ size_t nsub; /* For compound types */
+ size_t nmemb; /* for aggregate types (struct, union) */
union {
Node *name; /* Tyname: unresolved name. Tyalias: alias name */
- Node *asize; /* array size */
- char *pname; /* Typaram: name of type parameter */
- Node **sdecls; /* Tystruct: decls in struct */
- Ucon **udecls; /* Tyunion: decls in union */
+ Node *asize; /* array size */
+ char *pname; /* Typaram: name of type parameter */
+ Node **sdecls; /* Tystruct: decls in struct */
+ Ucon **udecls; /* Tyunion: decls in union */
};
- char hasparams; /* cache for whether this type has params */
- char issynth; /* Tyname: whether this is synthesized or not */
- char ishidden; /* Tyname: whether this is hidden or not */
- char ispkglocal; /* Tyname: whether this is package local or not */
- char isimport; /* Tyname: whether tyis type was imported. */
- char isreflect; /* Tyname: whether this type has reflection info */
- char isemitted; /* Tyname: whether this type has been emitted */
- char resolved; /* Have we resolved the subtypes? Prevents infinite recursion. */
- char fixed; /* Have we fixed the subtypes? Prevents infinite recursion. */
+ char hasparams; /* cache for whether this type has params */
+ char issynth; /* Tyname: whether this is synthesized or not */
+ char ishidden; /* Tyname: whether this is hidden or not */
+ char ispkglocal; /* Tyname: whether this is package local or not */
+ char isimport; /* Tyname: whether tyis type was imported. */
+ char isreflect; /* Tyname: whether this type has reflection info */
+ char isemitted; /* Tyname: whether this type has been emitted */
+ char resolved; /* Have we resolved the subtypes? Prevents infinite recursion. */
+ char fixed; /* Have we fixed the subtypes? Prevents infinite recursion. */
};
struct Ucon {
Srcloc loc;
- size_t id; /* tag id */
- int synth; /* is it generated? */
- Node *name; /* ucon name */
- Type *utype; /* type of the union this is an element of */
- Type *etype; /* type for the element */
+ size_t id; /* tag id */
+ int synth; /* is it generated? */
+ Node *name; /* ucon name */
+ Type *utype; /* type of the union this is an element of */
+ Type *etype; /* type for the element */
};
struct Trait {
@@ -158,16 +158,16 @@ struct Trait {
Srcloc loc;
Vis vis;
- Node *name; /* the name of the trait */
- Type *param; /* the type parameter */
+ Node *name; /* the name of the trait */
+ Type *param; /* the type parameter */
Type **aux; /* auxiliary parameters */
size_t naux;
- Node **proto; /* type must implement these prototypes */
+ Node **proto; /* type must implement these prototypes */
size_t nproto;
- char isproto; /* is it a prototype (for exporting purposes) */
- char ishidden; /* should user code be able to use this? */
- char isimport; /* have we defined it locally? */
+ char isproto; /* is it a prototype (for exporting purposes) */
+ char ishidden; /* should user code be able to use this? */
+ char isimport; /* have we defined it locally? */
};
struct Node {
@@ -177,20 +177,20 @@ struct Node {
char inferred;
union {
struct {
- size_t nfiles; /* file names for location mapping */
+ size_t nfiles; /* file names for location mapping */
char **files;
- Node **uses; /* use files that we loaded */
+ Node **uses; /* use files that we loaded */
size_t nuses;
- char **libdeps; /* library dependencies */
+ char **libdeps; /* library dependencies */
size_t nlibdeps;
- char **extlibs; /* non-myrddin libraries */
+ char **extlibs; /* non-myrddin libraries */
size_t nextlibs;
- Node **stmts; /* all top level statements */
+ Node **stmts; /* all top level statements */
size_t nstmts;
- Node **init; /* a list of all __init__ function names of our deps. NB, this
+ Node **init; /* all __init__ function names of our deps. NB, this
is a Nname, not an Ndecl */
size_t ninit;
- Node *localinit; /* and the local one, if any */
+ Node *localinit;/* and the local one, if any */
Stab *globls; /* global symtab */
Stab *builtins; /* global symtab */
Htab *ns; /* namespaces */
@@ -285,9 +285,9 @@ struct Node {
*/
Trait *trait;
Htab *impls;
- Node **gimpl; /* generic impls of this trait */
+ Node **gimpl; /* generic impls of this trait */
size_t ngimpl;
- Node **gtype; /* generic impls of this trait */
+ Node **gtype; /* generic impls of this trait */
size_t ngtype;
char vis;
@@ -330,18 +330,18 @@ struct Node {
/* globals */
extern Srcloc curloc;
extern char *filename;
-extern Tok *curtok; /* the last token we tokenized */
-extern Node *file; /* the current file we're compiling */
-extern Type **tytab; /* type -> type map used by inference. size maintained by type creation code */
+extern Tok *curtok; /* the last token we tokenized */
+extern Node *file; /* the current file we're compiling */
+extern Type **tytab; /* type -> type map used by inference. size maintained by type creation code */
extern Type **types;
extern size_t ntypes;
-extern Trait **traittab; /* int -> trait map */
+extern Trait **traittab;/* int -> trait map */
extern size_t ntraittab;
-extern Node **impltab; /* int -> impl map */
+extern Node **impltab; /* int -> impl map */
extern size_t nimpltab;
-extern Node **decls; /* decl id -> decl map */
+extern Node **decls; /* decl id -> decl map */
extern size_t nnodes;
-extern Node **nodes; /* node id -> node map */
+extern Node **nodes; /* node id -> node map */
extern size_t ndecls;
extern Node **exportimpls;
extern size_t nexportimpls;