Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@ function(generator dir)
endif()
endfunction()

generator(
slang-fiddle
LINK_WITH_PRIVATE
compiler-core
)
generator(slang-fiddle LINK_WITH_PRIVATE compiler-core)
generator(
slang-cpp-extractor
USE_FEWER_WARNINGS
Expand Down
20 changes: 16 additions & 4 deletions tools/slang-fiddle/slang-fiddle-diagnostic-defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,35 @@ DIAGNOSTIC(200002, Error, couldNotWriteOutputFile, "could not write output file

// Template Parsing

DIAGNOSTIC(300001, Error, expectedOutputStartMarker, "start line for template not followed by a line marking output with '$0'")
DIAGNOSTIC(
300001,
Error,
expectedOutputStartMarker,
"start line for template not followed by a line marking output with '$0'")
DIAGNOSTIC(300002, Error, expectedEndMarker, "expected a template end line ('$0')")

// Scraper: Parsing

DIAGNOSTIC(500001, Error, unexpected, "unexpected $0, expected $1")

DIAGNOSTIC(501001, Error, expectedFiddleEllipsisInvocation, "expected 'FIDDLE(...)' at start of body of '$0'")
DIAGNOSTIC(
501001,
Error,
expectedFiddleEllipsisInvocation,
"expected 'FIDDLE(...)' at start of body of '$0'")

DIAGNOSTIC(502001, Error, expectedIncludeOfOutputHeader, "expected a '#include' of generated output file '$0' in file containing 'FIDDLE(...)' invocations")
DIAGNOSTIC(
502001,
Error,
expectedIncludeOfOutputHeader,
"expected a '#include' of generated output file '$0' in file containing 'FIDDLE(...)' "
"invocations")

// Scraper: Semantic Checking

DIAGNOSTIC(600001, Error, undefinedIdentifier, "undefined identifier '$0'")



DIAGNOSTIC(999999, Fatal, internalError, "internal error in 'fiddle' tool")

#undef DIAGNOSTIC
4 changes: 2 additions & 2 deletions tools/slang-fiddle/slang-fiddle-diagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ using namespace Slang;
#define DIAGNOSTIC(id, severity, name, messageFormat) \
const DiagnosticInfo name = {id, Severity::severity, #name, messageFormat};
#include "slang-fiddle-diagnostic-defs.h"
}
}
} // namespace Diagnostics
} // namespace fiddle
10 changes: 5 additions & 5 deletions tools/slang-fiddle/slang-fiddle-diagnostics.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

namespace fiddle
{
using namespace Slang;
using namespace Slang;

namespace Diagnostics
{
namespace Diagnostics
{

#define DIAGNOSTIC(id, severity, name, messageFormat) extern const DiagnosticInfo name;
#include "slang-fiddle-diagnostic-defs.h"
}
}
} // namespace Diagnostics
} // namespace fiddle
1 change: 0 additions & 1 deletion tools/slang-fiddle/slang-fiddle-lua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@

#define MAKE_LIB 1
#include "../external/lua/onelua.c"

Loading
Loading