mirror of https://gitlab.com/basile.b/dexed.git
dastworx, stylefixes
This commit is contained in:
parent
5aa6d32e7e
commit
41a4749b60
|
@ -71,101 +71,101 @@ ref const(bool[string]) badVersions()
|
||||||
private __gshared bool[string] _badVersions;
|
private __gshared bool[string] _badVersions;
|
||||||
|
|
||||||
private static immutable predefinedVersions = [
|
private static immutable predefinedVersions = [
|
||||||
"AArch64",
|
"AArch64",
|
||||||
"AIX",
|
"AIX",
|
||||||
"all",
|
"all",
|
||||||
"Alpha",
|
"Alpha",
|
||||||
"Alpha_HardFloat",
|
"Alpha_HardFloat",
|
||||||
"Alpha_SoftFloat",
|
"Alpha_SoftFloat",
|
||||||
"Android",
|
"Android",
|
||||||
"ARM",
|
"ARM",
|
||||||
"ARM_HardFloat",
|
"ARM_HardFloat",
|
||||||
"ARM_SoftFloat",
|
"ARM_SoftFloat",
|
||||||
"ARM_SoftFP",
|
"ARM_SoftFP",
|
||||||
"ARM_Thumb",
|
"ARM_Thumb",
|
||||||
"assert",
|
"assert",
|
||||||
"BigEndian",
|
"BigEndian",
|
||||||
"BSD",
|
"BSD",
|
||||||
"CRuntime_Bionic",
|
"CRuntime_Bionic",
|
||||||
"CRuntime_DigitalMars",
|
"CRuntime_DigitalMars",
|
||||||
"CRuntime_Glibc",
|
"CRuntime_Glibc",
|
||||||
"CRuntime_Microsoft",
|
"CRuntime_Microsoft",
|
||||||
"Cygwin",
|
"Cygwin",
|
||||||
"DigitalMars",
|
"DigitalMars",
|
||||||
"DragonFlyBSD",
|
"DragonFlyBSD",
|
||||||
"D_Coverage",
|
"D_Coverage",
|
||||||
"D_Ddoc",
|
"D_Ddoc",
|
||||||
"D_HardFloat",
|
"D_HardFloat",
|
||||||
"D_InlineAsm_X86",
|
"D_InlineAsm_X86",
|
||||||
"D_InlineAsm_X86_64",
|
"D_InlineAsm_X86_64",
|
||||||
"D_LP64",
|
"D_LP64",
|
||||||
"D_NoBoundsChecks",
|
"D_NoBoundsChecks",
|
||||||
"D_PIC",
|
"D_PIC",
|
||||||
"D_SIMD",
|
"D_SIMD",
|
||||||
"D_SoftFloat",
|
"D_SoftFloat",
|
||||||
"D_Version2",
|
"D_Version2",
|
||||||
"D_X32",
|
"D_X32",
|
||||||
"ELFv1",
|
"ELFv1",
|
||||||
"ELFv2",
|
"ELFv2",
|
||||||
"Epiphany",
|
"Epiphany",
|
||||||
"FreeBSD",
|
"FreeBSD",
|
||||||
"FreeStanding",
|
"FreeStanding",
|
||||||
"GNU",
|
"GNU",
|
||||||
"Haiku",
|
"Haiku",
|
||||||
"HPPA",
|
"HPPA",
|
||||||
"HPPA64",
|
"HPPA64",
|
||||||
"Hurd",
|
"Hurd",
|
||||||
"IA64",
|
"IA64",
|
||||||
"iOS",
|
"iOS",
|
||||||
"LDC",
|
"LDC",
|
||||||
"linux",
|
"linux",
|
||||||
"LittleEndian",
|
"LittleEndian",
|
||||||
"MinGW",
|
"MinGW",
|
||||||
"MIPS32",
|
"MIPS32",
|
||||||
"MIPS64",
|
"MIPS64",
|
||||||
"MIPS_EABI",
|
"MIPS_EABI",
|
||||||
"MIPS_HardFloat",
|
"MIPS_HardFloat",
|
||||||
"MIPS_N32",
|
"MIPS_N32",
|
||||||
"MIPS_N64",
|
"MIPS_N64",
|
||||||
"MIPS_O32",
|
"MIPS_O32",
|
||||||
"MIPS_O64",
|
"MIPS_O64",
|
||||||
"MIPS_SoftFloat",
|
"MIPS_SoftFloat",
|
||||||
"NetBSD",
|
"NetBSD",
|
||||||
"none",
|
"none",
|
||||||
"NVPTX",
|
"NVPTX",
|
||||||
"NVPTX64",
|
"NVPTX64",
|
||||||
"OpenBSD",
|
"OpenBSD",
|
||||||
"OSX",
|
"OSX",
|
||||||
"PlayStation",
|
"PlayStation",
|
||||||
"PlayStation4",
|
"PlayStation4",
|
||||||
"Posix",
|
"Posix",
|
||||||
"PPC",
|
"PPC",
|
||||||
"PPC64",
|
"PPC64",
|
||||||
"PPC_HardFloat",
|
"PPC_HardFloat",
|
||||||
"PPC_SoftFloat",
|
"PPC_SoftFloat",
|
||||||
"S390",
|
"S390",
|
||||||
"S390X",
|
"S390X",
|
||||||
"SDC",
|
"SDC",
|
||||||
"SH",
|
"SH",
|
||||||
"SH64",
|
"SH64",
|
||||||
"SkyOS",
|
"SkyOS",
|
||||||
"Solaris",
|
"Solaris",
|
||||||
"SPARC",
|
"SPARC",
|
||||||
"SPARC64",
|
"SPARC64",
|
||||||
"SPARC_HardFloat",
|
"SPARC_HardFloat",
|
||||||
"SPARC_SoftFloat",
|
"SPARC_SoftFloat",
|
||||||
"SPARC_V8Plus",
|
"SPARC_V8Plus",
|
||||||
"SystemZ",
|
"SystemZ",
|
||||||
"SysV3",
|
"SysV3",
|
||||||
"SysV4",
|
"SysV4",
|
||||||
"TVOS",
|
"TVOS",
|
||||||
"unittest",
|
"unittest",
|
||||||
"WatchOS",
|
"WatchOS",
|
||||||
"Win32",
|
"Win32",
|
||||||
"Win64",
|
"Win64",
|
||||||
"Windows",
|
"Windows",
|
||||||
"X86",
|
"X86",
|
||||||
"X86_64"
|
"X86_64"
|
||||||
];
|
];
|
||||||
|
|
||||||
private void fillBadVersions()
|
private void fillBadVersions()
|
||||||
|
@ -397,7 +397,5 @@ T parseAndVisit(T : ASTVisitor)(const(char)[] source)
|
||||||
* This function prevents that.
|
* This function prevents that.
|
||||||
*/
|
*/
|
||||||
void ignoreErrors(string, size_t, size_t, string, bool)
|
void ignoreErrors(string, size_t, size_t, string, bool)
|
||||||
{
|
{}
|
||||||
// dont pollute output
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ struct Launcher
|
||||||
__gshared @Argument("-l") int caretLine;
|
__gshared @Argument("-l") int caretLine;
|
||||||
__gshared @Argument("-o") bool option1;
|
__gshared @Argument("-o") bool option1;
|
||||||
|
|
||||||
__gshared static Appender!(ubyte[]) source;
|
__gshared Appender!(ubyte[]) source;
|
||||||
__gshared string[] files;
|
__gshared string[] files;
|
||||||
|
|
||||||
// -o : deep visit the symbols
|
// -o : deep visit the symbols
|
||||||
|
@ -55,25 +55,21 @@ struct Launcher
|
||||||
{
|
{
|
||||||
mixin(logCall);
|
mixin(logCall);
|
||||||
|
|
||||||
static struct ErrorHandler
|
Appender!(AstErrors) errors;
|
||||||
{
|
|
||||||
static Appender!(AstErrors) _errors;
|
|
||||||
|
|
||||||
void handleErrors(string fname, size_t line, size_t col, string message, bool err)
|
void handleErrors(string fname, size_t line, size_t col, string message, bool err)
|
||||||
{
|
{
|
||||||
_errors ~= construct!(AstError)(cast(ErrorType) err, message, line, col);
|
errors ~= construct!(AstError)(cast(ErrorType) err, message, line, col);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorHandler eh;
|
|
||||||
RollbackAllocator alloc;
|
RollbackAllocator alloc;
|
||||||
StringCache cache = StringCache(StringCache.defaultBucketCount);
|
StringCache cache = StringCache(StringCache.defaultBucketCount);
|
||||||
LexerConfig config = LexerConfig("", StringBehavior.source);
|
LexerConfig config = LexerConfig("", StringBehavior.source);
|
||||||
|
|
||||||
source.data
|
source.data
|
||||||
.getTokensForParser(config, &cache)
|
.getTokensForParser(config, &cache)
|
||||||
.parseModule("", &alloc, &eh.handleErrors)
|
.parseModule("", &alloc, &handleErrors)
|
||||||
.listSymbols(eh._errors.data, deepSymList);
|
.listSymbols(errors.data, deepSymList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Writes the list of todo comments
|
/// Writes the list of todo comments
|
||||||
|
|
Loading…
Reference in New Issue