Commit graph

11 commits

Author SHA1 Message Date
Olivier Goffart
4f5e8c7aff Do not print the warnings from tests.
Warning as expected as even code with warning need to be tested.
If anything, we could ensure that warning were indeed expected
by testing against a `^warning` comment
2020-09-05 17:29:00 +02:00
Simon Hausmann
ff9c118e07 Propagate warnings to the end of the compilation step and print them 2020-09-04 20:34:20 +02:00
Olivier Goffart
2ef7cd6d96 Fix interpreter test 2020-09-01 12:47:40 +02:00
Olivier Goffart
58cdaeb8dd Update license header to mention that commertial option are available 2020-08-26 13:23:42 +02:00
Simon Hausmann
2823f32692 Apply license headers to all non-binary/non-json sources 2020-08-17 17:55:20 +02:00
Simon Hausmann
cb081a6bda Test that loading types from the include path works
This uses the recently added "hooks" or APIs to pass an include path that's specified in the test case itself.
2020-07-19 18:31:10 +02:00
Simon Hausmann
2f0718bffa Add include path options to the viewer and compiler
This allows specifying additional component locations. It works for
simple structs, but not yet for more complex types due to a bug yet to
be fixed :-)
2020-07-17 15:26:35 +02:00
Simon Hausmann
893b5132c8 Further encapsulate Diagnostics
Use has_error() and a new convenience function to get the diagnostics as a string vector.
2020-07-17 11:52:29 +02:00
Simon Hausmann
4c1e4c4da4 Reduce direct access to CompilerDiagnostic::message
Instead use to_string(), to make it easier to change in the future.
2020-07-16 18:22:23 +02:00
Simon Hausmann
8e047d3761 Simplify compiler diagnostics API
Don't require the callers to hold on to the source code string until an
eventual diagnostics code path is hit. Instead it turns out it's
simpler to let the parser consume the source code as string, where
internally after tokenizing it can be moved into the diagnostics and
from there into the code map if needed.

There are a few places where we now clone the source code, but that's
only in cases where we also extract stuff separately (test code) or the
syntax updater.
2020-07-15 17:34:11 +02:00
Simon Hausmann
3aa0c94f83 Run tests through the interpreter as well, at least for instantiation. 2020-06-05 16:02:59 +02:00