Erythro/include/Data.h

67 lines
2.1 KiB
C
Raw Normal View History

/*************/
/*GEMWIRE */
/* ERYTHRO*/
/*************/
#pragma once
#include <stdio.h>
#include <Defs.h>
#include <stdbool.h>
#ifndef extern_
#define extern_ extern
#endif
#define TEXTLEN 512
// All currently open source files.
extern_ struct FileData** Files;
// The source file currently being operated on.
extern_ struct FileData* CurrentFile;
// The file we are writing into; CurrentFile -> OutputFile
extern_ FILE* OutputFile;
// Symbol tables.
extern_ struct SymbolTableEntry* Globals, * GlobalsEnd;
extern_ struct SymbolTableEntry* Locals, * LocalsEnd;
extern_ struct SymbolTableEntry* Params, * ParamsEnd;
extern_ struct SymbolTableEntry* Structs, * StructsEnd;
extern_ struct SymbolTableEntry* CompositeMembers, * CompositeMembersEnd;
extern_ struct SymbolTableEntry* EnumMembers, * EnumMembersEnd;
extern_ struct SymbolTableEntry* Unions, * UnionsEnd;
extern_ struct SymbolTableEntry* Enums, * EnumsEnd;
extern_ struct SymbolTableEntry* Types, * TypesEnd;
// Whether we should dump the syntax tree before starting to assemble the file.
extern_ bool OptDumpTree;
// Whether we should keep the assembly files after successfully linking.
extern_ bool OptKeepAssembly;
// Whether to stop at compilation and dumping - skip assembly and binary creation altogether.
extern_ bool OptAssembleFiles;
// Whether to stop at assembly - skip linking into a binary.
extern_ bool OptLinkFiles;
// Whether to output extended debugging information.
extern_ bool OptVerboseOutput;
// The name of the binary we want to create.
extern_ char* OutputFileName;
// The sizes of each of the core types, in bytes.
extern_ int TypeSizes[5];
// The name of the Assembler Module that we should use.
extern_ char* OptAssemblerName;
// The Assembler Module to call to when performing generation operations.
extern_ struct AssemblerModule* Assembler;
// The names of each token in the language, synchronized to the TokenTypes enum.
extern_ char* TokenNames[];
extern_ char* OperationNames[];
// The names of the storage scopes.
extern_ char* ScopeNames[];
extern_ int Overread;
2020-11-25 02:11:09 +00:00
extern_ char CurrentIdentifier[TEXTLEN + 1];