shithub: mc

Download patch

ref: f45a27f1db8e7c29671b7793fd131334194df000
parent: 871ef281aaf3c2e8bdff5d92355461bedfa5d933
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Jul 3 18:32:50 EDT 2017

Clean up indentation of comments.

--- a/parse/parse.h
+++ b/parse/parse.h
@@ -98,12 +98,12 @@
 	/* 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 @@
 	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 @@
 	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 @@
 	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 @@
 			*/
 			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 @@
 /* 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;