diff --git a/compiler/src/dmd/common/charactertables.d b/compiler/src/dmd/common/charactertables.d index 951c335817df..ac89807ddea0 100644 --- a/compiler/src/dmd/common/charactertables.d +++ b/compiler/src/dmd/common/charactertables.d @@ -35,7 +35,7 @@ struct IdentifierCharLookup extern(C++) bool function(dchar) isContinue; /// Lookup the table given the table name - static IdentifierCharLookup forTable(IdentifierTable table) + extern(C++) static IdentifierCharLookup forTable(IdentifierTable table) { import dmd.common.identifiertables; diff --git a/compiler/src/dmd/common/charactertables.h b/compiler/src/dmd/common/charactertables.h index 4afd9891bb4b..10a81d3b0cfe 100644 --- a/compiler/src/dmd/common/charactertables.h +++ b/compiler/src/dmd/common/charactertables.h @@ -11,10 +11,19 @@ #pragma once +enum class IdentifierTable +{ + UAX31, + C99, + C11, + LR, // Least Restrictive aka All +}; + struct IdentifierCharLookup final { bool(*isStart)(char32_t); bool(*isContinue)(char32_t); // constructor not provided here. + static IdentifierCharLookup forTable(IdentifierTable table); }; diff --git a/compiler/src/dmd/cxxfrontend.d b/compiler/src/dmd/cxxfrontend.d index 2ba4a1d7a281..b74b11b67341 100644 --- a/compiler/src/dmd/cxxfrontend.d +++ b/compiler/src/dmd/cxxfrontend.d @@ -284,6 +284,12 @@ MATCH leastAsSpecialized(FuncDeclaration fd, FuncDeclaration g, Identifiers* nam return dmd.funcsem.leastAsSpecialized(fd, g, names); } +PURE isPure(FuncDeclaration fd) +{ + import dmd.funcsem; + return dmd.funcsem.isPure(fd); +} + /*********************************************************** * hdrgen.d */ diff --git a/compiler/src/dmd/errors.d b/compiler/src/dmd/errors.d index ce8f86bfc3c5..16cba8b3ec21 100644 --- a/compiler/src/dmd/errors.d +++ b/compiler/src/dmd/errors.d @@ -462,7 +462,7 @@ private struct ErrorInfo * p1 = additional message prefix * p2 = additional message prefix */ -private extern(C++) void verrorReport(const Loc loc, const(char)* format, va_list ap, ErrorKind kind, const(char)* p1 = null, const(char)* p2 = null) +private extern(C++) void verrorReport(const ref Loc loc, const(char)* format, va_list ap, ErrorKind kind, const(char)* p1 = null, const(char)* p2 = null) { return verrorReport(loc.SourceLoc, format, ap, kind, p1, p2); }