mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Fix code style
This commit is contained in:
parent
f77d1e93c1
commit
a609592d2d
2 changed files with 2 additions and 3 deletions
|
@ -45,7 +45,7 @@ static void report(ReportFormat format, const char* name, const Luau::Location&
|
||||||
|
|
||||||
static void reportError(Luau::Frontend& frontend, ReportFormat format, const Luau::TypeError& error)
|
static void reportError(Luau::Frontend& frontend, ReportFormat format, const Luau::TypeError& error)
|
||||||
{
|
{
|
||||||
std::string humanReadableName { frontend.fileResolver->getHumanReadableModuleName(error.moduleName) };
|
std::string humanReadableName = frontend.fileResolver->getHumanReadableModuleName(error.moduleName);
|
||||||
|
|
||||||
if (const Luau::SyntaxError* syntaxError = Luau::get_if<Luau::SyntaxError>(&error.data))
|
if (const Luau::SyntaxError* syntaxError = Luau::get_if<Luau::SyntaxError>(&error.data))
|
||||||
report(format, humanReadableName.c_str(), error.location, "SyntaxError", syntaxError->message.c_str());
|
report(format, humanReadableName.c_str(), error.location, "SyntaxError", syntaxError->message.c_str());
|
||||||
|
|
|
@ -265,9 +265,8 @@ std::vector<std::string> getSourceFiles(int argc, char** argv)
|
||||||
{
|
{
|
||||||
// Treat '-' as a special file whose source is read from stdin
|
// Treat '-' as a special file whose source is read from stdin
|
||||||
// All other arguments that start with '-' are skipped
|
// All other arguments that start with '-' are skipped
|
||||||
if (argv[i][0] == '-' && argv[i][1] != '\0') {
|
if (argv[i][0] == '-' && argv[i][1] != '\0')
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
if (isDirectory(argv[i]))
|
if (isDirectory(argv[i]))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue